• 回复
  • 收藏
  • 点赞
  • 分享
  • 发新帖

SIMetix中怎么导入TI的芯片spice模型?

SIMetix中怎么导入TI的芯片spice模型?

我从TI的官网上下了个LM5021的PSPICE模型。打开之后发现LIB文件下面包含了三个SUBCKT。导入到SIMetrix里的时候,就有三个symbol。

 

.SUBCKT LM5021_1 COMP VIN VCC OUT CS RT SS

Gvcc1         VCC3 0 VALUE { {exp((V(VCC3)-36)/0.05)}  }
Gpwm1         0 SS VALUE { if( V(hiccup)<=2.5  & V(DriverOff)<=2.5  , 22u,0)
+  }
Gpwm2         0 SS VALUE { if( V(hiccup)<=2.5 & V(COMP)>4.7& V(SS)>4.5
+  ,-32u,0) }
Gpwm3         0 SS VALUE { if( V(hiccup)>2.5 ,-15u,0) }

Evcc4         VCC7 0 VALUE { IF(V(VCC)>7,5,0) }
Ehic1         HICCUPRESET 0 VALUE { if(V(DriverOff) > 2.5 | V(SS)<=0.3,5,0) }
Ehic2         HICCUPTRIGGER 0 VALUE { if(V(COMP)>4.5 & V(SS)<= 4.7 &
+  V(Driveroff)<=2.5 & V(MaxDuty)>2.5,5,0) }
Ehic4         HIC3 0 VALUE { if(V(COMP_1p25)<=0.125 & V(Driveroff)<=2.5,5,0)
+  }
Evcc6         VCC5 0 VALUE { IF(V(VIN)>20,5,0) }
Evcc5         VCC8 0 VALUE { IF(V(VCC)<=5.8,5,0) }
Evcc2         VDD 0 VALUE { IF(V(VCCUV_B)>2.5,5.2,0) }
Evcc1         VCC1 VCC VALUE { IF(V(VCCEN)>2.5,MIN((8.5-V(VCC))*200,5),0) }
Evcc7         VCC6 0 VALUE { IF(V(VIN)<=7.25,5,0) }
Evcc3         VCC4 0 VALUE { IF(V(VDD)>4.5,2,0) }
Eleb1         LEB2 0 VALUE { if(V(CLK)>2.5 ,5,0) }
Eosc1         CLK1 0 VALUE { if(V(MAXDUTY)<=2.5,5,0) }
Eramp2         RAMP4 0 VALUE { if(V(LEB)>2.5 ,5,0) }
Eramp3         RAMP7 0 VALUE { if(V(LEB)>2.5 | V(DriverOFF)>2.5,5,0) }
Epwm4         PWM6 0 VALUE { if(V(MAXDUTY)>2.5 & V(DriverOFF)<=2.5 & V(Q)
+  >2.5 & V(hiccup)<=2.5,5,0) }
Epwm6         PWM3 0 SS 0 1
Epwm3         RESET 0 VALUE { if(V(CSint)>V(COMPint) | V(CSint)>0.5 |
+  V(LatchedSkipCycle)>2.5,5,0) }
Epwm5         PWM8 PWM7 VALUE { if(V(PWM)>2.5 & V(DriverOFF)<=2.5, 7.5, -7.5)
+  }
Epwm1         COMP_1P25 0 PWM1 0 1
Epwm2         SSLOW 0 VALUE { if( V(SS)<=0.2 & V(DriverOff)<=2.5,5,0) }
Ehic3         HIC2 0 VALUE { if(V(COMP_1p25)>0.130,5,0) }

XUvcc1         VCC5 VCC6 VCCEN_B VCCEN RSFF
XUvcc2         VCC7 VCC8 DRIVEROFF VCCUV_B RSFF
XUpwm1         SSLOW DRIVEROFF SSDISCHARGE SSDISCHARGEB RSFF
XUhic3         SKIPCYCLE CLK LATCHEDSKIPCYCLE LATCHDSKIPCYCLEB TFF
XUhic1         HICCUPRESET HIC1 HICCUP HICCUPB RSFF
XUhic2         HIC2 HIC3 SKIPCYCLE SKIPCYCLEB RSFF
XUpwm2         RESET CLK Q QZ RSFF

Vpwm1         COMP PWM1 1.25
VRT         VCC4 RT 0
V5V         V5V 0 5.2
Mpwm1         VCC PWM9 PWM7 PWM7 NMOSdriverH           
+ M=1
Mpwm2         0 PWM10 PWM7 PWM7 PMOSdriverL           
+ M=1
Mvcc1         VIN VCC2 VCC VCC NMOS1mAVCC           
+ M=15
Tleb1         LEB 0 LEB2 0 Z0=1 TD=90n 
Dpwm1         COMP PWM11 Dnom

Cosc1         CLK 0  2p IC=0
Cosc2         MAXDUTY 0  2p IC=0
Cramp1         VSLOPE 0  10p IC=0
Cramp7         RAMP3 0  10p IC=0
Cramp2         RAMP9 0  10p IC=0
Cramp3         CSINT 0  10p IC=0
Cramp5         CS 0  10p IC=0
Cramp6         RAMP6 0  10p IC=5
Cpwm2         PWM5 0  10p IC=5
Cpwm3         PWM 0  10p IC=0
Cpwm1         COMPINT 0  5p IC=0
Chic1         HIC1 0  10p IC=5
Cosc3         OSC1 0  2p IC=0

Rvinloss1         0 VIN  833k TC=0,0
Rvccloss1         0 VCC  3.4k TC=0,0
Rvinzener1         VCC3 VIN  40k TC=0,0
Rvcc1         VCC2 VCC1  1 TC=0,0
Rleb1         LEB 0  1 
Rosc1         CLK CLK1  500 
Rosc2         MAXDUTY MAXDUTY1  500 
Rramp6         CS 0  45k 
Rramp2         RAMP9 RAMP10  500
Rramp1         VSLOPE RAMP8  500 
Rramp9         RAMP3 RAMP4  500
Rramp3         RAMP2 CSINT  10 
Rramp4         CSINT CS  1800 
Rramp7         RAMP5 CS  36 
Rramp8         RAMP7 RAMP6  500 TC=0,0
Rpwm1         COMPINT COMP_1P25  10k 
Rpwm5         SSDISCHARGE PWM5  500 TC=0,0
Rpwm10         COMP VDD  5k 
Rpwm3         PWM3 PWM11  1 
Rpwm7         PWM8 PWM9  1 
Rpwm4         SS PWM4  60 
Rpwm2         0 COMPINT  5k 
Rpwm9         PWM7 OUT  1 
Rpwm8         PWM8 PWM10  1 
Rpwm6         PWM PWM6  500
Rhic1         HICCUPTRIGGER HIC1  1 TC=0,0
Rosc3         OSC1 OSC2  500 

Spwm1    PWM4 0 PWM5 0  S5K
Sramp3    RAMP5 0 RAMP6 0  S5K
Sramp2    RAMP2 CS RAMP3 0  S5K
Sramp1    RAMP8 0 RAMP9 0 S5K
Sclamp1    COMP V5V COMP V5V SWCLAMP
Sclamp2    SS V5V SS V5V SWCLAMP
Sclamp3    0 COMP 0 COMP SWCLAMP
Sclamp4    0 SS 0 SS SWCLAMP

Rgiga1 PWM5 0 1G
Rgiga2 RAMP6 0 1G
Rgiga3 RAMP3 0 1G
Rgiga4 RAMP9 0 1G
Rgiga5 COMP V5V 1G
Rgiga6 SS V5V 1G
Rgiga7 0 COMP 1G
Rgiga8 0 SS 1G

*21-1
Gramp1         0 CSINT VALUE { V(VSLOPE)*50E-6 }
Gramp2         0 VSLOPE VALUE { I(VRT)*0.03315 }
Eramp1         RAMP10 0 VALUE { if(V(MAXDUTY)<2.5 ,5,0) }
Eosc2         MAXDUTY1 0 VALUE { if(V(OSC1)>-0.92,5,0) }
Eosc3         OSC2 0 VALUE { if(V(VDD)>4.5,sin(2.082E10*i(VRT)*TIME),0) }
*21-2
*Gramp1         0 CSINT VALUE { V(VSLOPE)*50E-9 }
*Gramp2         0 VSLOPE VALUE { I(VRT)*0.03315/2 }
*Eramp1         RAMP10 0 VALUE { 5 }
*Eosc2         MAXDUTY1 0 VALUE { if(V(OSC1)>-0,5,0) }
*Eosc3         OSC2 0 VALUE { if(V(VDD)>4.5,sin(1.041E10*i(VRT)*TIME),0) }


*saturated@5Vgate
.MODEL NMOS100nA NMOS( LEVEL=3 KP=0.125E-7 RG=500 CGSO=4E-12 VTO=1)
.MODEL NMOS1uA NMOS( LEVEL=3 KP=0.125E-6 RG=500 CGSO=4E-12 VTO=1)
.MODEL NMOS10uA NMOS( LEVEL=3 KP=0.125E-5 RG=500 CGSO=4E-12 VTO=1)
.MODEL NMOS100uA NMOS( LEVEL=3 KP=0.125E-4 RG=500 CGSO=4E-12 VTO=1)
.MODEL NMOS1mA NMOS( LEVEL=3 KP=0.125E-3 RG=500 CGSO=4E-12 VTO=1)
.MODEL NMOS10mA NMOS( LEVEL=3 KP=0.125E-2 RG=500 CGSO=4E-12 VTO=1)
.MODEL NMOS100mA NMOS( LEVEL=3 KP=0.125E-1 RG=500 CGSO=4E-12 VTO=1)
.MODEL NMOS1A NMOS( LEVEL=3 KP=0.125 RG=500 CGSO=4E-12 VTO=1)

*300Ohm VCC regulator
.MODEL NMOS1mAVCC NMOS( LEVEL=3 KP=0.125E-3 RG=500 CGSO=4E-12 VTO=1 RD=300)

*12Ohm, 0.3A@half of 7.5Vcc
.MODEL NMOSdriverH NMOS( LEVEL=3 KP=0.0284 RG=500 CGSO=4E-12 VTO=1 RD=12)
*3Ohm, 0.7A@half of 7.5Vcc
.MODEL PMOSdriverL PMOS( LEVEL=3 KP=0.0662 RG=500 CGSO=4E-12 VTO=-1 RD=3)

.MODEL SWnom VSWITCH RON=0.001 ROFF=1MEG VON=2.5V VOFF=1V
.MODEL Dnom D IS=160n RS=35m N=1.1 BV=100 IBV=2m CJO=2p VJ=0.7 M=0.33 TT=1n
+EG=0.69 XTI=2
.MODEL SWtest VSWITCH RON=0.0001 ROFF=1MEG VON=1 VOFF=0.1
.MODEL S5K VSWITCH RON=1m ROFF=10MEG VON=2 VOFF=1V

.MODEL SWCLAMP VSWITCH RON=0.001 ROFF=100E6 VON=10m VOFF=0

.ENDS LM5021_1

.SUBCKT RSFF R S Q NQ
* Level Trigger
RFR R R1 500
RFS S S1 500
CFR R1 0 10p
CFS S1 0 10p
GQH 0 Q VALUE { IF(V(S1)>2.5 & V(R1)<=2.5, IF(V(Q)<=4,1,5-V(Q)), 0) }
GQL Q 0 VALUE { IF(V(R1)>2.5, IF(V(Q)>=1,1,V(Q)), 0) }
GNQH 0 NQ VALUE { IF(V(S1)<=2.5 & V(R1)>2.5, IF(V(NQ)<=4,1,5-V(NQ)), 0) }
GNQL NQ 0 VALUE { IF(V(S1)>2.5, IF(V(NQ)>=1,1,V(NQ)), 0) }
RQ Q 0 1G
RNQ NQ 0 1G
CQ NQ 0 4n IC=0
CNQ Q 0 4n IC=0
.ENDS RSFF

.SUBCKT TFF D C Q NQ
* Level Trigger Clock High Active
RFC C C1 500
RFD D D1 500
CFC C1 0 10p
CFD D1 0 10p
GQH 0 Q VALUE { IF(V(D1)>2.5 & V(C1)>2.5, IF(V(Q)<=4,1,5-V(Q)), 0) }
GQL Q 0 VALUE { IF(V(D1)<=2.5 & V(C1)>2.5, IF(V(Q)>=1,1,V(Q)), 0) }
GNQH 0 NQ VALUE { IF(V(D1)<=2.5 & V(C1)>2.5, IF(V(NQ)<=4,1,5-V(NQ)), 0) }
GNQL NQ 0 VALUE { IF(V(D1)>2.5 & V(C1)>2.5, IF(V(NQ)>=1,1,V(NQ)), 0) }
RQ Q 0 1G
RNQ NQ 0 1G
CQ NQ 0 4n IC=0
CNQ Q 0 4n IC=0
.ENDS TFF
这样的模型能用么?

全部回复(1)
正序查看
倒序查看
2013-10-23 23:02
 
0
回复