Back to Forums
5 posts / 0 new
Last post
#1 Feb 14, 2020
yyyqq1
Offline
Last seen: 4 years 2 months ago
Joined: 2020-02-14 08:58

how to solve this problem in simulation

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!!

Wed, 2021-09-01 10:06
Himss
Offline
Last seen: 3 weeks 3 hours ago
Joined: 2021-05-19 08:24

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.

Mon, 2021-12-13 21:52
kyliesmith
Offline
Last seen: 2 years 4 months ago
Joined: 2021-12-13 21:42

 

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

Tue, 2021-12-14 04:46
Henry17
Henry17's picture
Offline
Last seen: 2 years 4 months ago
Joined: 2021-12-14 04:38

Nice knowledge gaining article. This post is really the best on this valuable topic. soundcloud to mp3

Thu, 2023-09-21 22:52
subtletylung
Offline
Last seen: 6 months 3 weeks ago
Joined: 2023-07-04 04:57

A missing round closing bracket has been brought to my attention in first.Statement 'IF' expressed as a FUNC expression

Only Up

Download PSpice and try it for free! Download Free Trial
Cadence