• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. Simulation error: "Line too long. Limit is 132 characters...

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 67
  • Views 8675
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Simulation error: "Line too long. Limit is 132 characters."

Minyu
Minyu over 10 years ago

I'm simulating a 3rd-party Spice model of a transistor using OrCAD PSpice. After I hit run, it starts to generate a .cir file which is when the following error shows up:

Line too long. Limit is 132 characters. 

By replacing the transistor model with a simpler one, the simulation goes well, so the error is somehow related to the transistor model. 

What I don't understand is that the .cir file is generated by the software. Why the software generates some code which doesn't follow its own rule? I mean, it could split a long expression into several lines to avoid the error. Indeed, what I care about is how to solve the problem. The complete output file of the simulation is in the following. Any suggestions or comments would be appreciated.


**** 02/06/15 15:12:39 ****** PSpice 16.5.0 (April 2011) ****** ID# 0 ********

** Profile: "SCHEMATIC1-sim" [ C:\Temp\02MyProject2\Pspice\inverter3_2\inverter1-pspicefiles\schematic1\sim.sim ]


**** CIRCUIT DESCRIPTION


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


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

*Libraries:
* Profile Libraries :
* Local Libraries :
* From [PSPICE NETLIST] section of C:\Cadence\SPB_16.5\tools\PSpice\PSpice.ini file:
.lib "C:\Cadence\SPB_16.5\tools\pspice\UserLib\00_UPDATED_Infineon_Simulation Model_PSpice_CoolMOSO_C7_650V_UPDATED.lib"
.lib "C:\Temp\02MyProject2\ARCP\Pspice\GaN device\GaN FET\EPC2010\EPC2010_V102_PSPICE.lib"
.lib "nom.lib"

*Analysis directives:
.TRAN 0 20us 0
.PROBE V(alias(*)) I(alias(*)) W(alias(*)) D(alias(*)) NOISE(alias(*))
.INC "..\SCHEMATIC1.net"

**** INCLUDING SCHEMATIC1.net ****
* source INVERTER1
V_V2 G1 OUT
+PULSE 0 15 0 0 0 9.5us 20us
V_V5 G2 0
+PULSE 0 15 10us 0 0 9.5us 20us
V_V4 N04438 0 DC 5
R_RG1 G1 N04464 10
I_I1 OUT 0 DC 0Adc
R_RG G2 N04426 10
X_U5 N04438 N04464 OUT IPW65R019C7_L1 PARAMS: DVTH=0 DRDSON=0
X_U6 OUT N04426 0 IPW65R019C7_L1 PARAMS: DVTH=0 DRDSON=0

**** RESUMING sim.cir ****
.END
.PARAM r2={(fpar1*SQRT(0.4)-fpar4)*Inn*r0}
.PARAM Rlim={(r1+2*r2*Rmax-SQRT(r1**2+4*r2))/(2*r2)}
.PARAM dRd={fpar18/a+if(dVth==0,limit(dR,0,1)*max(Rlim-fpar18/a-Rs-Rp,0),0)}
.PARAM bm={fpar4/((1/gmin-Rs)**2*Inn*a*(fpar21/fpar20)**fpar29)}
.PARAM bet={fpar14+(fpar14-bm)*if(dR==0,if(dVth==0,limit(dgfs,-1,0),0),0)}
.PARAM dC1={1+dCmax*limit(dC,0,1)}

.PARAM x0={(fpar35-fpar36)/fpar37} x1={fpar35/fpar37} dx={x1-x0} y1={(fpar40*a+fpar41)*dC1}
.PARAM a0={(fpar49-fpar50)/fpar51} a1={fpar49/fpar51} da={a1-a0}
*.PARAM aqc80={a*fpar49*dC1}
.PARAM aqc81={a*fpar50*dC1}
*.PARAM aqc82={a*fpar51*dC1}

.PARAM Cox1={fpar38*a*dC1}
.PARAM y0={fpar36*a*dC1}
.PARAM C0={fpar42*a*dC1}
.PARAM C1={fpar43*a*dC1}
.PARAM C2={fpar45*a*dC1}
.PARAM C3={fpar52*a*dC1}
.PARAM Cgs0={(fpar34+fpar33*a)*dC1}
.PARAM dRdi={fpar24/a}
.PARAM y2={fpar47*a*dC1}

.FUNC QCdg1(x) {y0*min(x,x1)+y1*max(x-x1,0)+y2/2*max(0, x-fpar48)**2+(y0-y1)*((limit(x,x0,x1)-x0)**3/(dx*dx)*((limit(x,x0,x1)-x0)/(2*
$
ERROR(ORPSIM-16366): Line too long. Limit is 132 characters.
.FUNC QCds1(x) {aqc81*min(x,a1)+aqc81*((limit(x,a0,a1)-a0)**3/(da*da)*((limit(x,a0,a1)-a0)/(2*da)-1))}
.FUNC I0(Uee,p,pp,z1,cc) {if(Uee>pp,(Uee-cc*z1)*z1,p*(pp-p)/cc*exp((Uee-pp)/p))}
.FUNC Ig(Uds,T,p,Uee,cc) {bet*(fpar21/T)**fpar29*I0(Uee,p,min(2*p,p+cc*Uds),min(Uds,Uee/(2*cc)),cc)}
.FUNC J(d,g,T,da,s)
+ {a*(s*((Ig(da,T,(fpar15+(fpar16+fpar17*T)*T)*fpar3*T,g-Vth+fpar6*(T-fpar20),fpar4)+1*exp(min(fpar12+(d-fpar13-fpar10*(T-fpar20))/fp
$
ERROR(ORPSIM-16366): Line too long. Limit is 132 characters.
.PARAM dRd {fpar18/a+if(dVth==0,limit(dR,0,1)*max(Rlim-fpar18/a-Rs-Rp,0),
+ 0)}
.PARAM bm {fpar4/((1/gmin-Rs)**2*Inn*a*(fpar21/fpar20)**fpar29)}
.PARAM bet {fpar14+(fpar14-bm)*if(dR==0,if(dVth==0,limit(dgfs,-1,0),0),
+ 0)}
.PARAM dC1 {1+dCmax*limit(dC,0,1)}
.PARAM x0 {(fpar35-fpar36)/fpar37} x1 {fpar35/fpar37} dx {x1-x0} y1 {(fpar40*a+fpar41)*dC1}
.PARAM a0 {(fpar49-fpar50)/fpar51} a1 {fpar49/fpar51} da {a1-a0}
.PARAM aqc81 {a*fpar50*dC1}
.PARAM Cox1 {fpar38*a*dC1}
.PARAM y0 {fpar36*a*dC1}
.PARAM C0 {fpar42*a*dC1}
.PARAM C1 {fpar43*a*dC1}
.PARAM C2 {fpar45*a*dC1}
.PARAM C3 {fpar52*a*dC1}
.PARAM Cgs0 {(fpar34+fpar33*a)*dC1}
.PARAM dRdi {fpar24/a}
.PARAM y2 {fpar47*a*dC1}
.FUNC QCds1(x) {aqc81*min(x,a1)+aqc81*((limit(x,a0,a1)-a0)**3/(da*da)*(
+ (limit(x,a0,a1)-a0)/(2*da)-1))}
.FUNC I0(Uee,p,pp,z1,cc) {if(Uee>pp,(Uee-cc*z1)*z1,p*(pp-p)/cc*exp((Uee-pp)/p))}
.FUNC Ig(Uds,T,p,Uee,cc) {bet*(fpar21/T)**fpar29*I0(Uee,p,min(2*p,p+cc*Uds),
+ min(Uds,Uee/(2*cc)),cc)}
.FUNC J(d,g,T,da,s)
-------------------$
ERROR(ORPSIM-16270): No .FUNC definition
.PARAM dRd {fpar18/a+if(dVth==0,limit(dR,0,1)*max(Rlim-fpar18/a-Rs-Rp,0),
+ 0)}
.PARAM bm {fpar4/((1/gmin-Rs)**2*Inn*a*(fpar21/fpar20)**fpar29)}
.PARAM bet {fpar14+(fpar14-bm)*if(dR==0,if(dVth==0,limit(dgfs,-1,0),0),
+ 0)}
.PARAM dC1 {1+dCmax*limit(dC,0,1)}
.PARAM x0 {(fpar35-fpar36)/fpar37} x1 {fpar35/fpar37} dx {x1-x0} y1 {(fpar40*a+fpar41)*dC1}
.PARAM a0 {(fpar49-fpar50)/fpar51} a1 {fpar49/fpar51} da {a1-a0}
.PARAM aqc81 {a*fpar50*dC1}
.PARAM Cox1 {fpar38*a*dC1}
.PARAM y0 {fpar36*a*dC1}
.PARAM C0 {fpar42*a*dC1}
.PARAM C1 {fpar43*a*dC1}
.PARAM C2 {fpar45*a*dC1}
.PARAM C3 {fpar52*a*dC1}
.PARAM Cgs0 {(fpar34+fpar33*a)*dC1}
.PARAM dRdi {fpar24/a}
.PARAM y2 {fpar47*a*dC1}
.FUNC QCds1(x) {aqc81*min(x,a1)+aqc81*((limit(x,a0,a1)-a0)**3/(da*da)*(
+ (limit(x,a0,a1)-a0)/(2*da)-1))}
.FUNC I0(Uee,p,pp,z1,cc) {if(Uee>pp,(Uee-cc*z1)*z1,p*(pp-p)/cc*exp((Uee-pp)/p))}
.FUNC Ig(Uds,T,p,Uee,cc) {bet*(fpar21/T)**fpar29*I0(Uee,p,min(2*p,p+cc*Uds),
+ min(Uds,Uee/(2*cc)),cc)}
.FUNC J(d,g,T,da,s)
-------------------$
ERROR(ORPSIM-16270): No .FUNC definition

  • Cancel
  • mvaseem
    mvaseem over 10 years ago
    The tool generated cir file is just a top level file referring to netlist, models and analysis statements. The real culprit in your case is the 3rd party spice model. Pspice does not modify user models on it's own. I think you can easily break the .func lines to have less than 132 characters in each line. If you can attach the model, I can try it at my end.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Minyu
    Minyu over 10 years ago
    It is exactly what you said. Problem solved. Thank you!
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NHTrung
    NHTrung over 8 years ago
    Hi, I've faced the same problem as you when I try to simulate my circuit with Infineon IPW60R070P6 COOLMOS.
    Can you tell me how you solve this problem, I don't know how to break the .func line.
    Thank you in advance,
    ----------------------------------------------------------------------------------------------------------------------------------------------------
    ** Creating circuit file "Test.cir"
    ** WARNING: THIS AUTOMATICALLY GENERATED FILE MAY BE OVERWRITTEN BY SUBSEQUENT SIMULATIONS

    *Libraries:
    * Profile Libraries :
    * Local Libraries :
    .LIB "../../../library/simulationmodel_pspice_coolmos_p6_600v/simulationmodel_pspice_coolmos_p6_600v.lib"
    .LIB "../../../library/idx_e60_l2.lib"
    .LIB "../../../library/ucc3895.lib"
    * From [PSPICE NETLIST] section of C:\Cadence\SPB_16.5\tools\PSpice\PSpice.ini file:
    .lib "nom.lib"

    *Analysis directives:
    .TRAN 0 100us 0
    .PROBE V(alias(*)) I(alias(*)) W(alias(*)) D(alias(*)) NOISE(alias(*))
    .INC "..\SCHEMATIC1.net"



    **** INCLUDING SCHEMATIC1.net ****
    * source SWITCHED RELUCTANCE MOTOR DRIVE
    X_U1 0 N14618 IDW75E60_L2 PARAMS: TJ=27
    X_U2 N18306 N14803 IDW75E60_L2 PARAMS: TJ=27
    I_I1 0 N14803 DC 220
    L_L1 N14618 N14571 100H
    R_R1 N14571 N18306 1k
    X_U5 N18306 N17004 0 IPW60R070P6_L1 PARAMS: DVTH=0 DRDSON=0
    X_U6 N14803 N16992 N14618 IPW60R070P6_L1 PARAMS: DVTH=0 DRDSON=0
    X_U7 N17559 0 N17566 N17004 12 N16992 UCCX7324
    V_V1 N17559 0
    +PULSE 0 5 0 0.1us 0.1us 4us 8us
    V_V2 N17566 0
    +PULSE 0 5 4us 0.1us 0.1us 4us 8us
    C_C4 12 0 1u TC=0

    **** RESUMING Test.cir ****
    .END
    .PARAM Rlim={p3*(-fpar15+SQRT(fpar15**2+4*(Rmax*Inn)**2-8*Rmax*Inn*(Inn*Rs+p2)+(2*p2+2*Inn*Rs)**2))}
    .PARAM dRd={fpar13+if(dVth==0,limit(dR,0,1)*max(Rlim-fpar13,0),0)}
    .PARAM dC1={1+dCmax*limit(dC,0,1)}
    .PARAM y0={f5*act*dC1}
    .PARAM x0={(f4-f5)/sl} x1={f4/sl} dx={x1-x0} y1={(ps5*act+ps6)*dC1}
    .PARAM y2={pc21*act*dC1}
    .PARAM Cox1={ps1*act*dC1}
    .PARAM C0={qs1*act*dC1}
    .PARAM C1={qs2*act*dC1}
    .PARAM C2={qs4*act*dC1}
    .PARAM C3={qc83*act*dC1}
    .PARAM Cgs0={(f3a+f3*act)*dC1}
    .PARAM aqc81={act*qc81*dC1}
    .PARAM a0={(qc80-qc81)/qc82} a1={qc80/qc82} da={a1-a0}


    .FUNC Rd0(fpar29) {(fpar17*dRd+(1-fpar17)*dRd*(fpar29/fpar30)**nmu)}
    .FUNC CF(fpar29,Iepi) {(fpar15**2)/max(1,fpar15**2-(Rd0(fpar29)*Iepi)**limit(2+fpar16*(fpar29-fpar30),1.2,3))}
    .FUNC QCdg1(x) {y0*min(x,x1)+y1*max(x-x1,0)+y2/2*max(0, x-pc22)**2+(y0-y1)*((limit(x,x0,x1)-x0)**3/(dx*dx)*((limit(x,x0,x1)-x0)/(2*dx
    $
    ERROR(ORPSIM-16366): Line too long. Limit is 132 characters.
    -----------------------------------------------------------------------------------------
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Minyu
    Minyu over 8 years ago

    For example, if the original code is like this

    .FUNC QCdg1(x) {y0*min(x,x1)+y1*max(x-x1,0)+y2/2*max(0, x-fpar48)**2+(y0-y1)* ((limit(x,x0,x1)-x0)**3/(dx*dx)*((limit(x,x0,x1)-x0)/(2*dx)-1))} 

    Change it to this in PSPICE
    .FUNC QCdg1(x) {y0*min(x,x1)+y1*max(x-x1,0)+y2/2*max(0, x-fpar48)**2+(y0-y1)*
    + ((limit(x,x0,x1)-x0)**3/(dx*dx)*((limit(x,x0,x1)-x0)/(2*dx)-1))} 
    Some other versions of spice will allow you to continue an entry across multiple lines if you put a back slash, i.e. a \ character at the end of the line. Somewhere in the middle of line insert a \ and hit enter to force the rest of the text onto the next line.
    Hope this helps.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NHTrung
    NHTrung over 8 years ago

    Thanks for your reply,
    Sorry because my question may be not clear, I met a difficulties in edit the function. I don't know what file and program I should open to edit original code. I try to open .cir  and .out file but there is no functions in this.
    When I try to add \ character in to a functino as well as press Enter, there was nothing happened

    Thanks for your great help,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Minyu
    Minyu over 8 years ago

    I guess your model is referring to a .lib file. If so, you need to open the .lib file, find the long line and change it using PSPICE.

    Since you are using PSPICE, press ENTER at the point you want to split and put a '+' at the beginning of the next line.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NHTrung
    NHTrung over 8 years ago

    Yes, in the beginning, I downloaded it in .olb type before adding it into my .lib.
    I have chosen Pspice Model Editor, I try to follow your guide, split the long line but it seems not worked.
    Please help!

    Thank you,

    **********

    .SUBCKT IPW60R070P6_L1 drain gate source PARAMS:
    +dVth=0 dRdson=0
    .PARAM Rs=2m Rg=1.04
    +Ls=5n Ld=3n Lg=5n
    .PARAM act=34.42 Inn=25.8
    +Unn=10 Rmax=70m
    X1 dd g s Tj Tj cool_600_ip_var PARAMS: act={act}
    +dVth={dVth} dR={dRdson} Inn={Inn} Unn={Unn}
    +Rmax={Rmax} Rs={Rs} heat=0
    L_Ld drain dd {Ld}
    R_Ld drain dd 10
    L_Ls source lsrs {Ls}
    R_Ls source lsrs 10
    R_Rs s lsrs {Rs}
    L_Lg gate lgrg {Lg}
    R_Lg gate lgrg 10
    R_Rg lgrg g {Rg}
    E1 Tj w VALUE={TEMP}
    R1 w 0 1u
    .ENDS

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Minyu
    Minyu over 8 years ago

    Since I'm no longer using Pspice, I can only give possible solutions. You can try them out.

    1. All the codes you posted seem kind of short. The long line causing your problem may be in a subfunction. Read the code carefully and find those subfunctions. You really need to find the line that is longer than 132 characters.

    2. This splitting method may not work for your software. Try other splitting methods I mentioned in my previous replies or on other websites.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information