diff --git a/library/AudioIC.lib b/library/AudioIC.lib index 9ea98345..702d8a7a 100644 --- a/library/AudioIC.lib +++ b/library/AudioIC.lib @@ -89,21 +89,21 @@ X1 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 lm386_sub - - - - + + - - + + - - + - - - - + + + + + + + <.PortSym 40 -80 1 0> <.PortSym 70 -80 8 0> <.PortSym 100 0 5 0> @@ -174,14 +174,12 @@ XUINPUT Vip Vin 22 21 GNDF INPUT_0 + PARAMS: RCM=1 CCM=1000F CDM=100F .ENDS - .SUBCKT ILOAD_PD_0 VDD VSS VIMON PD + PARAMS: VON = 0.5 G1 VDD 0 VALUE = {IF(V(VIMON) >= 0 & V(PD) < VON,V(VIMON),0)} G2 0 VSS VALUE = {IF(V(VIMON) < 0 & V(PD) < VON,V(VIMON),0)} .ENDS - .SUBCKT GBW_SLEW_SE_0 VIP VIM VO GNDF PD + PARAMS: AOL = 100 GBW = 1MEG SRP = 1MEG SRN = 1MEG IT = 1M + VON = 0.5 ROFF = 1M @@ -197,15 +195,12 @@ C1 VO GNDF {CC} GR1 VO GNDF VALUE = {IF(V(PD) >= VON,V(VO,GNDF)/RC,V(VO,GNDF)/ROFF)} .ENDS - - .SUBCKT OUT_CURRENT_CLAMP_PD_0 IN OUT PD +PARAMS: RON = 1 ROFF = 1G VON = 0.5 IMAX = 10M IMIN = -10M GRES IN OUT VALUE = {LIMIT(IF(V(PD) >= VON,1,0)*V(IN,OUT)/RON + + IF(V(PD) >= VON,0,1)*V(IN,OUT)/ROFF,IMAX,IMIN)} .ENDS - **** INVERTER ********************************************************************************************* *$ .SUBCKT IV110_0 A Y DVDD DVSS PARAMS: RDRV=10K RDLY=10K CDLY=0.1PF DIV=2 @@ -220,7 +215,6 @@ RO Y DVSS 1E11 .ENDS IV110_0 *$ - .SUBCKT PSRR_0 VDD VSS VI VO GNDF PARAMS: PSRR = 130 FPSRR = 1.6 .PARAM PI = 3.141592 .PARAM RPSRR = 1 @@ -233,7 +227,6 @@ E1 VO VI 1 GNDF 1 C2 VDD VSS 10P IC = 0 .ENDS - .SUBCKT TF_0 VI VO GNDF + PARAMS: FZ1 = 10G FZ2 = 10G FZ3 = 10G FZ4 = 10G FZ5 = 10G + FP1 = 1 FP2 = 10G FP3 = 10G FP4 = 10G @@ -279,35 +272,27 @@ LZ5 VX5 GNDF {RO/(2*PI*FZ5)} .ENDS - - - .SUBCKT IQ_IOFF_0 VDD VSS PD + PARAMS: VON = 0.5 IQQ = 1M IOFF = 1P G1 VDD VSS VALUE = {IF(V(PD) >= VON,IQQ,IOFF)} .ENDS - - .SUBCKT IDEAL_DIODE_0 A C +PARAMS: EMCO = 0.01 BRKV = 60 IBRKV = 1M) D1 A C IDIODE .MODEL IDIODE D(N = {EMCO} BV = {BRKV} IBV = {IBRKV}) .ENDS - .SUBCKT GND_FLOAT_0 VDD VSS GNDF EGNDF GNDF 0 VALUE = {(V(VDD)+V(VSS))*0.5} .ENDS - .SUBCKT AMETER_0 VI VO VIMON + PARAMS: GAIN = 1 VSENSE VI VO DC = 0 EMETER VIMON 0 VALUE = {I(VSENSE)*GAIN} .ENDS - .SUBCKT VCLAMP_W_SENSE_0 VDD VSS VI VO VIMON GNDF + PARAMS: VMAXIO = 0.1 VMINIO = 0.1 SLOPE = 20 EPCLIP VDD_CLP 0 VALUE = {V(VDD,GNDF) - SLOPE*V(VIMON) - VMAXIO} @@ -317,14 +302,10 @@ ENCLIP VSS_CLP 0 VALUE = {V(VSS,GNDF) - SLOPE*V(VIMON) + VMINIO} ECLAMP VO GNDF VALUE = {LIMIT(V(VI,GNDF), V(VDD_CLP), V(VSS_CLP))} .ENDS - - .SUBCKT VCLAMP_0 VDD VSS VI VO GNDF PARAMS: VMAX = 0.1 VMIN = 0.1 ECLAMP VO GNDF VALUE = {LIMIT(V(VI,GNDF),V(VDD,GNDF) - VMAX, V(VSS,GNDF) + VMIN)} .ENDS - - .SUBCKT CMRR_0 VI VO GNDF PARAMS: CMRR = 130 FCMRR = 1.6K .PARAM PI = 3.141592 .PARAM RCMRR = 1 @@ -336,7 +317,6 @@ L1 2 GNDF {LCMRR} IC = 0 E1 VI VO 1 GNDF 1 .ENDS - * BEGIN PROG NSE FEMTO AMP/RT-HZ .SUBCKT FEMT_0 1 2 PARAMS: NLFF = 0.1 FLWF = 0.001 NVRF = 0.1 * BEGIN SETUP OF NOISE GEN - FEMPTOAMPS/RT-HZ @@ -379,7 +359,6 @@ C3 1 2 1E-15 .ENDS * END PROG NSE FEMTO AMP/RT-HZ - * BEGIN PROG NSE NANO VOLT/RT-HZ .SUBCKT VNSE_0 1 2 PARAMS: NLF = 10 FLW = 4 NVR = 4.6 * BEGIN SETUP OF NOISE GEN - NANOVOLT/RT-HZ @@ -430,8 +409,6 @@ G1 VIP VOP VALUE = {V(VIP,VOP)/RCM} G2 VIN VON VALUE = {V(VIN,VON)/RCM} .ENDS - - .SUBCKT AudioIC_LM3886 gnd _net0 _net1 _net2 _net3 _net4 _net5 X1 _net0 _net1 _net2 _net3 _net4 _net5 lm3886_sub .ENDS @@ -444,17 +421,20 @@ X1 _net0 _net1 _net2 _net3 _net4 _net5 lm3886_sub - - + + + + + + + <.PortSym -40 -20 1 0> <.PortSym -40 20 2 0> <.PortSym 10 -40 3 0> <.PortSym 10 40 4 0> <.PortSym 60 0 5 0> - - <.PortSym 50 40 6 0> <.ID 30 -56 X> @@ -560,10 +540,12 @@ X1 _net0 _net1 _net2 _net3 _net4 TDA2003 - - + + + + <.ID 20 14 X> <.PortSym -40 -20 1 0> <.PortSym -40 20 2 0> @@ -621,8 +603,6 @@ Q2 12 3 14 QMOD2 .MODEL QMOD2 NPN(IS=8.0e-16 BF=3.947e+001 VAF=200) .ends - - .SUBCKT AudioIC_TDA2030 gnd _net0 _net2 _net4 _net3 _net1 X1 _net0 _net1 _net2 _net3 _net4 TDA2030__OPAMP__1 .ENDS @@ -635,16 +615,18 @@ X1 _net0 _net1 _net2 _net3 _net4 TDA2030__OPAMP__1 - - + + + + <.PortSym -40 -20 1 0> <.PortSym -40 20 5 0> <.PortSym 60 0 2 0> <.PortSym 10 -40 4 0> - <.ID 30 -66 X> <.PortSym 10 40 3 0> + <.ID 30 -66 X>