Here is the model code:
* PSpice Model Editor - Version 17.2.0
.SUBCKT Cj NP NN
.PARAM C0=2.1E-13
.PARAM V0=2.7
.PARAM a=0.7
.PARAM ISS=56.19E-6
.PARAM Vb={a*V0}
.FUNC Csc(X) {IF(X<Vb,C0/SQRT(1-X/V0),C0*SQRT((1-a)*(1-a)*(1-a))*(1-1.5*a+0.5*X/V0)}
***** BEGIN CIRCUIT *****
*SCH SECTION
.MODEL DSCH D (IS={ISS} N=2 RS=0.45)
DS NP NN DSCH
GCsc NP NN VALUE={Csc(V(NP)-V(NN))*DDT(V(NP)-V(NN))}
.ENDS
Here is my simulation result:
**** FROM LIBRARY ../../../cj.lib ****
.SUBCKT Cj NP NN
.PARAM C0=2.1E-13
.PARAM V0=2.7
.PARAM a=0.7
.PARAM ISS=56.19E-6
.PARAM Vb={a*V0}
.FUNC Csc(X) {IF(X<Vb,C0/SQRT(1-X/V0),C0*SQRT((1-a)*(1-a)*(1-a))*(1-1.5*a+0.5*X/V0)}
***** BEGIN CIRCUIT *****
*SCH SECTION
-------------$
ERROR(ORPSIM-16367): End of expression not seen
DS NP NN DSCH
------------------------------------$
ERROR(ORPSIM-16367): End of expression not seen
DS NP NN DSCH
------------------------------------$
ERROR(ORPSIM-16367): End of expression not seen
GCsc NP NN VALUE={Csc(V(NP)-V(NN))*DDT(V(NP)-V(NN))}
------------------------------------$
ERROR(ORPSIM-16367): End of expression not seen
.ENDS
*
------------------------------------$
ERROR(ORPSIM-16499): Missing .ENDS in .SUBCKT
Can anyone help me with this problem for my simulation? Many thanks!!
Copyright © 2020 Cadence Design Systems, Inc. All rights reserved.
Hi,
I observed that there is a round closing bracket missing in first .FUNC expression for 'IF' statement
Below is the corrected version:
.FUNC Csc(X) {IF(X<Vb),C0/SQRT(1-X/V0),C0*SQRT((1-a)*(1-a)*(1-a))*(1-1.5*a+0.5*X/V0)}
Kindly try this to see if it works.
I also have a similar problem and need everyone's help. I am not sure what to do. Thanks for the information you shared.
squidgame
Nice knowledge gaining article. This post is really the best on this valuable topic. soundcloud to mp3
A missing round closing bracket has been brought to my attention in first.Statement 'IF' expressed as a FUNC expression
Only Up