• 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. PCB Design
  3. problems managing models with subcircuits and duplicate...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 164
  • Views 15878
  • Members are here 0
More Content
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

problems managing models with subcircuits and duplicate named parts

DeanS
DeanS over 12 years ago

Hello, I am new at this, and trying to set up libraries with models.

I am currently working with two mosfet models downloaded fromSTmicro...both are subcircuit models with additional simple components modeled, and these simple components are named the same in each library and therefore wind up being "duplicate" models when both parts are in the library or design, therefore causing the modeling to be incorrectly applied between the parts. Here are the 2 models, seperated by "end of modelling" :

* MODELLING FOR STN2NF10
 
.SUBCKT STN2NF10 1 2 3
LG 2 4  7.5E-09
LS 12 3 7.5E-09
LD 6 1  4.5E-09
RG 4 5  4.001
RS 9 12 0.325E-02
RD 7 6  0.142
RJ 8 7  0.445E-03
CGS 5 9   0.419E-09
CGD 7 10  0.467E-09
CK  11 7  0.307E-10
DGD 11 7 DGD
DBS 12 6 DBS
DBD  9 7 DBD
MOS  13 5 9 9 MOS L=1u W=1u
E1  10 5 101 0 1
E2  11 5 102 0 1
E3  8 13 POLY(2) 6 8 6 12 0 0 0 0  0.321
G1  0 100 7 5 1u
D1  100 101  DID
D2  102 100  DID
R1  101 0  1MEG
R2  102 0  1MEG
.ENDS STN2NF10
 
.MODEL MOS NMOS
+ LEVEL = 3
+ VTO   = 4.184
+ PHI   = 0.827
+ IS    = 0.1E-12
+ JS    = 0
+ THETA = 0.995
+ KP    = 15.084
+ ETA   = 0.199E-02
 
.MODEL DGD D
+ IS    = 0.1E-12
+ CJO   = 0.171E-10
+ VJ    = 0.754
+ M     = 0.367
.MODEL DBD D
+ IS    = 0.1E-12
+ CJO   = 0.202E-10
+ VJ    = 0.755
+ M     = 0.335
.MODEL DBS D
+ IS    = 0.1E-12
+ BV    = 117
+ N     = 1
+ TT    = 0.699E-07
+ RS    = 0.505E-02
.MODEL DID D
+ IS    = 0.01E-12
+ RS    = 0
+ BV    = 127
 
* END OF MODELLING

* MODELLING FOR STN3NF06
.SUBCKT STN3NF06 1 2 3
LG 2 4  7.5n
LS 12 3 7.5n
LD 6 1  4.5n
RG 4 5  4.901
RS 9 12 0.321E-02
RD 7 6  0.301E-01
RJ 8 7  0.125E-02
CGS 5 9   0.474E-09
CGD 7 10  0.259E-09
CK  11 7  0.669E-10
DGD 11 7 DGD
DBS 12 6 DBS
DBD  9 7 DBD
MOS  13 5 9 9 MOS L=1u W=1u
E1  10 5 101 0 1
E2  11 5 102 0 1
E3  8 13 POLY(2) 6 8 6 12 0 0 0 0  0.778
G1  0 100 7 5 1u
D1  100 101  DID
D2  102 100  DID
R1  101 0  1MEG
R2  102 0  1MEG
.ENDS STN3NF06
 
.MODEL MOS NMOS
+ LEVEL = 3
+ VTO   = 3.867
+ PHI   = 0.941
+ IS    = 0.1P
+ JS    = 0
+ THETA = 0.375
+ KP    = 16.164
 
.MODEL DGD D
+ IS    = 0.1E-12
+ CJO   = 0.843E-11
+ VJ    = 0.697
+ M     = 0.389
.MODEL DBD D
+ IS    = 0.1E-12
+ CJO   = 0.248E-12
+ VJ    = 0.789
+ M     = 0.306
.MODEL DBS D
+ IS    = 0.1E-12
+ BV    = 65
+ N     = 1
+ TT    = 0.707E-07
+ RS    = 0.577E-01
.MODEL DID D
+ IS    = 0.01E-12
+ RS    = 0
+ BV    = 75
 
* END OF MODELLING

 As you can see, both models are using parts named nmos, dgd, dbd, and dbs.

Each mosfet will simulate correctly individually if the other library is not configured, but when both libraries are configured, the one part will use the parameters from the other instead of its own...for example the 1st mosfet should have a lower gain in an amplifier circuit, but with both libraries present it chooses the wrong parameters and has the higher gain of the 2nd mosfet instead. Help?

  • Cancel
  • Alok Tripathi
    Alok Tripathi over 12 years ago

    Use of common model name with different model parameters is not recommended. One should use unique name for models consumed by specific subcircuits. In one simulation session you can have only one model definition for a model (model name). I think once you rename one of the model set and it's reference in subckt, things should work fine.

    Here is the modified one. Hope this helps.

    * MODELLING FOR STN2NF10
     
    .SUBCKT STN2NF10 1 2 3
    LG 2 4  7.5E-09
    LS 12 3 7.5E-09
    LD 6 1  4.5E-09
    RG 4 5  4.001
    RS 9 12 0.325E-02
    RD 7 6  0.142
    RJ 8 7  0.445E-03
    CGS 5 9   0.419E-09
    CGD 7 10  0.467E-09
    CK  11 7  0.307E-10
    DGD 11 7 DGD_STN2NF10
    DBS 12 6 DBS_STN2NF10
    DBD  9 7 DBD_STN2NF10
    MOS  13 5 9 9 MOS_STN2NF10 L=1u W=1u
    E1  10 5 101 0 1
    E2  11 5 102 0 1
    E3  8 13 POLY(2) 6 8 6 12 0 0 0 0  0.321
    G1  0 100 7 5 1u
    D1  100 101  DID_STN2NF10
    D2  102 100  DID_STN2NF10
    R1  101 0  1MEG
    R2  102 0  1MEG
    .ENDS STN2NF10
     
    .MODEL MOS_STN2NF10 NMOS
    + LEVEL = 3
    + VTO   = 4.184
    + PHI   = 0.827
    + IS    = 0.1E-12
    + JS    = 0
    + THETA = 0.995
    + KP    = 15.084
    + ETA   = 0.199E-02
     
    .MODEL DGD_STN2NF10 D
    + IS    = 0.1E-12
    + CJO   = 0.171E-10
    + VJ    = 0.754
    + M     = 0.367
    .MODEL DBD_STN2NF10 D
    + IS    = 0.1E-12
    + CJO   = 0.202E-10
    + VJ    = 0.755
    + M     = 0.335
    .MODEL DBS_STN2NF10 D
    + IS    = 0.1E-12
    + BV    = 117
    + N     = 1
    + TT    = 0.699E-07
    + RS    = 0.505E-02
    .MODEL DID_STN2NF10 D
    + IS    = 0.01E-12
    + RS    = 0
    + BV    = 127
     
    * END OF MODELLING

    * MODELLING FOR STN3NF06
    .SUBCKT STN3NF06 1 2 3
    LG 2 4  7.5n
    LS 12 3 7.5n
    LD 6 1  4.5n
    RG 4 5  4.901
    RS 9 12 0.321E-02
    RD 7 6  0.301E-01
    RJ 8 7  0.125E-02
    CGS 5 9   0.474E-09
    CGD 7 10  0.259E-09
    CK  11 7  0.669E-10
    DGD 11 7 DGD_STN3NF06
    DBS 12 6 DBS_STN3NF06
    DBD  9 7 DBD_STN3NF06
    MOS  13 5 9 9 MOS L=1u W=1u
    E1  10 5 101 0 1
    E2  11 5 102 0 1
    E3  8 13 POLY(2) 6 8 6 12 0 0 0 0  0.778
    G1  0 100 7 5 1u
    D1  100 101  DID_STN3NF06
    D2  102 100  DID_STN3NF06
    R1  101 0  1MEG
    R2  102 0  1MEG
    .ENDS STN3NF06
     
    .MODEL MOS_STN3NF06 NMOS
    + LEVEL = 3
    + VTO   = 3.867
    + PHI   = 0.941
    + IS    = 0.1P
    + JS    = 0
    + THETA = 0.375
    + KP    = 16.164
     
    .MODEL DGD_STN3NF06 D
    + IS    = 0.1E-12
    + CJO   = 0.843E-11
    + VJ    = 0.697
    + M     = 0.389
    .MODEL DBD_STN3NF06 D
    + IS    = 0.1E-12
    + CJO   = 0.248E-12
    + VJ    = 0.789
    + M     = 0.306
    .MODEL DBS_STN3NF06 D
    + IS    = 0.1E-12
    + BV    = 65
    + N     = 1
    + TT    = 0.707E-07
    + RS    = 0.577E-01
    .MODEL DID_STN3NF06 D
    + IS    = 0.01E-12
    + RS    = 0
    + BV    = 75
     
    * END OF MODELLING

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • oldmouldy
    oldmouldy over 12 years ago

    Move the ".ENDS" statement from the current location to the end of the models for the subcircuit, this will move them "within" the subcircuit definition. This is used in the provided opamp library and they all get along fine with duplicated model names.

    SUBCKT STN2NF10 1 2 3
    LG 2 4 7.5E-09

    .MODEL...

    .MODEL...

    .ENDS

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • DeanS
    DeanS over 12 years ago
    Thank you, this worked well...just a shame the person who created the models couldn't realize this was an issue in the first place.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Cadence Guidelines

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