PSPICE-FOR-TI: PGA Pspice Model Error

Part Number: PSPICE-FOR-TI

Tool/software:

Hi Team,

I received a PGA model from C2000 team. 

Customer use this model to do the simulation but it have some errors. Could you please check the potential reason here?

Error:

**** 08/31/25 18:24:31 **** PSpice 23.1.0 (30 January 2024) *** ID# 0 ********

** Profile: "SCHEMATIC1-2" [ D:\Project\Temp\Project_Temp\project_temp-pspicefiles\schematic1\2.sim ]


**** CIRCUIT DESCRIPTION


******************************************************************************


** Creating circuit file "2.cir"
** WARNING: THIS AUTOMATICALLY GENERATED FILE MAY BE OVERWRITTEN BY SUBSEQUENT SIMULATIONS

*Libraries:
* Profile Libraries :
* Local Libraries :
.LIB "../../../pga_pspice_model.lib"
* From [PSPICE NETLIST] section of C:\cds_spb_home\cdssetup\OrCAD_PSpiceTIPSpice_Install\23.1.0\PSpice.ini file:
.lib "nom_pspti.lib"
.lib "nom.lib"

*Analysis directives:
.TRAN 0 2m 0 100u SKIPBP
.OPTIONS ADVCONV
.OPTIONS FILEMODELSEARCH
.PROBE64 V(alias(*)) I(alias(*)) W(alias(*)) D(alias(*)) NOISE(alias(*))
.INC "..\SCHEMATIC1.net"

**** INCLUDING SCHEMATIC1.net ****
* source PROJECT_TEMP
R_R1 N00661 VDD 10k TC=0,0
C_C1 N00987 N00974 100p TC=0,0
V_V1 VDD 0 3.3Vdc
R_R2 0 N00395 1 TC=0,0
R_R3 N00696 VDD 10k TC=0,0
I_I1 N00395 0 DC 0Adc AC 0Aac
+SIN 0 1 5k 0 0 0
R_R4 N00661 N00395 10k TC=0,0
R_R5 N00696 0 10k TC=0,0
R_R6 N00987 N00696 100 TC=0,0
R_R7 N00974 N00661 100 TC=0,0
C_C2 N00974 0 100p TC=0,0
C_C3 0 N00987 100p TC=0,0
V_V2 CTRL 0 1.5Vdc
X_U2 N00974 N00987 CTRL OUT_P OUT_N VDD 0 PGA

**** RESUMING 2.cir ****
.END


INFO(ORPSIM-15423): Unable to find index file nom_pspti.ind for library file nom_pspti.lib.

INFO(ORPSIM-15422): Making new index file nom_pspti.ind for library file nom_pspti.lib.
b2e4e117ac3ae9d81b0a9590344b9f0be3a13d734fc0d5d3bc0ae1622ce0f1f9be7002c9257815a723e6968b7ce9d1912158f221a9c6c7f774db6896643a33b0
$CDNENCFINISH_ADV2
.ENDS
*$
.SUBCKT VC_RES1_68k 1 2 4 5
$CDNENCSTART_ADV2
17f62b1fb318c25603aeb85644ae98a5d179ef807807791f6459efacb9d7ffc37a831b146dc0f06bb1ef275619162e6d8f7ad0dc708bf15ae1a1d5bd0ae623b2
4338d7c6b789b936510049641c41694601a828b94bca95e37d9595892e84fe4adde61b3186a8a4ced614ffd7534112da752ebe196261f5fadbdc1df943f8b053
b2e4e117ac3ae9d81b0a9590344b9f0be3a13d734fc0d5d3bc0ae1622ce0f1f9be7002c9257815a723e6968b7ce9d1912158f221a9c6c7f774db6896643a33b0
$CDNENCFINISH_ADV2
.ENDS
*$
.model Mbreakp PMOS_SIMPLE
$CDNENCSTART_ADV2
17f62b1fb318c25603aeb85644ae98a5d179ef807807791f6459efacb9d7ffc37a831b146dc0f06bb1ef275619162e6d8f7ad0dc708bf15ae1a1d5bd0ae623b2
d0a62a7eecff332c2c1a7f28e691e8355b0d507d4d4167bdded4599b6b3f07ed49ca0bf013e9ee48384f4a7c200902eb9bd5e11d04cca5bd57a5eb5ba1dfe8a6
$CDNENCFINISH_ADV2
*$

WARNING(ORPSIM-15195): Model type unknown

Index has 123659 entries from 5487 file(s).


**** EXPANSION OF SUBCIRCUIT X_U2 ****
.PARAM TEMP_NOM 27
.PARAM VOS 2E-3
.PARAM CMRR 10000
.PARAM PSRR 30000
.PARAM SR 10E6
.PARAM GBW 7E6
.PARAM VNOISE 100E-9
X_U2.E_CM X_U2.CM 0 VALUE {(V(0#) + V(1#))/2}
X_U2.E_IN X_U2.INDIFF 0 VALUE {V(0#,1#) + VOS + V(CM)/CMRR}
X_U2.E_PSR X_U2.PSR 0 VALUE {(V(5#) - V(6#))/PSRR}

WARNING(ORPSIM-15210): Mismatched parentheses
.PARAM GAIN {IF(V(CTRL) < 1, 1, IF(V(CTRL) < 2, 2, IF(V(CTRL) < 3,
+ 4, IF(V(CTRL) < 4, 8,IF(V(CTRL) < 5, 16,IF(V(CTRL) < 6, 32,IF(V(CTRL)
+ < 7, 64,20))))}
------------$
ERROR(ORPSIM-16131): Expression - use previously defined parameters only
X_U2.EFREQ X_U2.FR 0 X_U2.INDIFF 0 LAPLACE
-----------------------------------$
ERROR(ORPSIM-16152): Invalid number: Error while converting token 'LAPLACE' to double value. Token can be a constant or expression
+ {GAIN/(1+s/(2*PI*GBW/GAIN))}
X_U2.ESR X_U2.SR 0 X_U2.FR 0 SLEW
-----------------------------$
ERROR(ORPSIM-16152): Invalid number: Error while converting token 'SLEW' to double value. Token can be a constant or expression

Model and File:

Project_Temp.zip

```spice
* Enhanced PGA PSPICE Model
.SUBCKT PGA IN+ IN- CTRL OUT+ OUT- VDD VSS
* Parameters
.PARAM TEMP_NOM = 27     ; Nominal temperature in celsius
.PARAM VOS = 2E-3        ; Input offset voltage
.PARAM CMRR = 10000     ; Common Mode Rejection Ratio
.PARAM PSRR = 30000    ; Power Supply Rejection Ratio
.PARAM SR = 10E6         ; Slew Rate (V/s)
.PARAM GBW = 7E6        ; Gain-Bandwidth product
.PARAM VNOISE = 100E-9    ; Input voltage noise density (V/√Hz)

* Input Stage with Common Mode Rejection
* Common mode voltage calculation
E_CM CM 0 VALUE = {(V(IN+) + V(IN-))/2}
* Differential input with offset and CMRR
E_IN INDIFF 0 VALUE = {V(IN+,IN-) + VOS + V(CM)/CMRR}

* Power Supply Rejection
E_PSR PSR 0 VALUE = {(V(VDD) - V(VSS))/PSRR}

* Gain Control Stage
.PARAM GAIN = {
+ IF(V(CTRL) < 1, 1,    
+ IF(V(CTRL) < 2, 2,    
+ IF(V(CTRL) < 3, 4,    
+ IF(V(CTRL) < 4, 8,
+ IF(V(CTRL) < 5, 16,
+ IF(V(CTRL) < 6, 32,
+ IF(V(CTRL) < 7, 64,
+ 20))))}

* Frequency Response and Slew Rate Limiting
* First order frequency response
EFREQ FR 0 INDIFF 0 LAPLACE = {GAIN/(1+s/(2*PI*GBW/GAIN))}

* Slew Rate Limiting
ESR SR 0 FR 0 SLEW = SR

* Temperature Effects
.PARAM TEMP_COEFF = 0E-6  ; Temperature coefficient (V/°C)
E_TEMP TEMP 0 VALUE = {(TEMP-TEMP_NOM)*TEMP_COEFF*V(SR)}

* Noise Sources
* Voltage noise
VN1 NOISE1 0 AC 1
RN1 NOISE1 0 1
HN1 VNOISE 0 VN1 0 {VNOISE}

* Output Stage
* Combine all effects
E_OUT OUT_INT 0 VALUE = {V(SR) + V(TEMP) + V(PSR) + V(VNOISE)}

* Output voltage limitations
E_LIMIT OUT+ OUT- VALUE = {
+ MIN(MAX(V(OUT_INT), V(VSS) + 0.1), 
+ V(VDD) - 0.1)}

* Output current limiting
.PARAM IMAX = 220uA       ; Maximum output current
G_OUT OUT+ OUT- VALUE = {
+ MIN(MAX(I(E_LIMIT), -IMAX), IMAX)}

* Input Protection
D1 IN+ VDD DIODE
D2 VSS IN+ DIODE
D3 IN- VDD DIODE
D4 VSS IN- DIODE

* Input impedance
RIN1 IN+ 0 10MEG
CIN1 IN+ 0 1pF
RIN2 IN- 0 10MEG
CIN2 IN- 0 1pF

* Output impedance
ROUT OUT+ OUT- 76m
COUT OUT+ OUT- 10pF

* Power Supply Pins
RPD VDD 0 100K
RPS VSS 0 100K

* Model for protection diodes
.MODEL DIODE D (IS=1E-14 RS=0.1)

.ENDS PGA

Thank you,

Yishan Chen