• 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. Custom IC Design
  3. How to make an ideal diode model for diode from analogLib...

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 125
  • Views 36551
  • 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

How to make an ideal diode model for diode from analogLib?

BaaB
BaaB over 8 years ago

I am trying to make a model and use it for ideal diode from analogLib library. However, I don't know how to modify the built-in potential (or forward voltage) of the diode. I tried to add VJ variable and set it to a small value like 0.1V. However, from I-V characteristic of simulation, it doesn't seem to have any effect on forward voltage at all. The built-in potential from the simulation is about 650mV. 

Can anybody tell me how to do that? I want the diode is like ideal (zero forward voltage and infinite slope).

Here is the model file I used (diode.scs):

simulator lang=spice

.model schottky D (LEVEL = 3 IS=1p RS=0 BV=40.0 IBV=1p VJ=0.1 CJO=0 M=0.5 N=1 TT=0 )


  • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    The diode model is not intended to be used as an "ideal" diode, so I don't think that's you're best starting point.

    Note - this comes with a bit of caution; modelling "ideal" components is often not a good idea in circuit simulators because they're really not intended for that. For a start, an infinite slope could lead to convergence problems.

    You could implement it with a relay in spectre:

    subckt idealDiode (a c)
    // note, the on resistance shouldn't be below 1mOhm
    D1 (a c a c) relay rclosed=1m vt1=0.0 vt2=1m
    ends idealDiode

    Note that it would not be a good idea to reduce the closed resistance (on resistance) below about 1mOhm; this can lead to convergence problems. You also have to have some small region for the transition - but hopefully this is good enough (with 1mOhm on resistance the current gets up to kA pretty quickly!).

    Then you can use this component:

    Dideal (n1 n2) idealDiode

    Regards,

    Regards,

    Andrew.

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

    Thank you, Andrew Beckett! You are right I tried some ideal components before and faced convergence problem. For the diode, I don't need it to be perfectly idea but something close to that. However, as in the picture above, the forward voltage is too large and the slope is not that steep.

    I am trying to follow your method but I get stuck. You helped me with one similar example before as here.  This example is a bit different to me. 
    I created a model file named idealDiode.scs with content: 

    subckt idealDiode (a c)
    // note, the on resistance shouldn't be below 1mOhm
    D1 (a c a c) relay rclosed=1m vt1=0.0 vt2=1m

    Then created a diode symbol with two pins a, c and name as "idealDiode". And then do the all the things as the given link above. 
    however, where should I put this line "Dideal (n1 n2) idealDiode"?


    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    That line was just an example of how it would look like in the netlist.

    You should be able to (almost) just use the analogLib diode component and specify the model name as "idealDiode", and then include the idealDiode.scs in Setup->Model Libraries. This works except that if you probe the current through the pin it maps to saving "D1:a" and unfortunately spectre by default will save that as "D1:1" and so it won't auto-plot from ADE (you'd have to go via the results browser). There are two ways of solving that:

    1. Take a copy of the diode component from analogLib and then Tools->CDF->Edit CDF, pick Base CDF, and then in the simulation information change the :a to :1 in the termMapping field. Then use this component instead (you could set the default model name to "idealDiode" too whilst you're at it).
    2. Alternatively, in Simulation->Options->Analog, in the  Miscellaneous tab, in the additional arguments field (at the bottom) enter "useterms=name". With this you can use the analogLib component. However, be wary of this because other components that you might be using which have used termMapping  which map to a numerical terminal position.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • BaaB
    BaaB over 8 years ago
    Thanks a lot. It works. I want to study to write model and how to use it effectively in the tool. Could you suggest what I should study in order? For example, first study verilogA then...
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    I'd certainly recommend learning Verilog A - this is a very useful skill as it helps to fill lots of gaps. A good book to start with is The Designer's Guide to Verilog-AMS

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • KhanAmir
    KhanAmir over 4 years ago in reply to Andrew Beckett

    Hi, I want to use diode but I am not sure about all the model parameters. Can you please tell me how to use default diode model or any standard parameters.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to KhanAmir

    Dear KhanAmir,

    The spectre model for a diode and the definition of its various parameters (with an example of a model call) is provided in the spectre help function invoked at the UNIX terminal as "spectre -h". To examine the help menu for a diode model, type "spectre -h diode". its output is shown in the attached test file.

    Alternatively, you may wish to study the analogLib reference manual that also details the parameters of the inherent diode mode at Cadence On-;one support URL:

    support1.cadence.com/.../postResponse

    You may the set the model parameters as you wish. As Andrew cautions, the use of a totally ideal diode (i.e., infinite current once the diode threshold is reached) can leas to simulation issues.

    Does this help KhanAmir?

    Shawn

    Fullscreen spectre_help_command_diode_sml_021321.txt Download
    tcsh$ spectre -h diode
    
    **************
    Junction diode
    **************
    
    The junction diode model includes nonlinear junction capacitance and reverse breakdown.
    
    
    Sample Instance Statement:
    d0 (dp dn) pdiode l=3e-4 w=2.5e-4 area=1
    
    Sample Model Statement:
    model pdiode diode is=1.8e-5 rs=1.43 n=1.22 nz=2.31 gleak=6.2e-5 rsw=10 isw=6.1e-10 ibv=0.95e-3 tgs=2 ik=1.2e7 fc=0.5 cj=1.43e-3 pb=0.967 mj=0.337 cjsw=2.76e-9
    vjsw=0.94 jmax=1e20
    
    This device is supported within altergroups.
    
    Synopsis:
    Name ( a c ) ModelName <parameter=value> ...
    
    In forward operation, the voltage on the anode (`a') is more positive than the voltage on the cathode (`c').
    
    
    Model Synopsis:
    model ModelName diode <parameter=value> ...
    
    
    ===================
    Instance Parameters
    ===================
    
    1       area              Junction area factor (alias=lv1).
    2       perim             Junction perimeter factor.
    3       l=1e-6 m          Drawn length of junction.
    4       w=1e-6 m          Drawn width of junction.
    5       m=1               Multiplicity factor.
    6       scale=1           Scale factor.
    7       region=on         Estimated operating region. Spectre outputs number (0-2) in a rawfile. Possible values are off, on and breakdown.
    [7m--More--[27m8       region0=on        Estimated operating region. Spectre outputs number (0-2) in a rawfile.. Possible values are off, on and breakdown.
    9       trise (C)         Temperature rise from ambient.
    10      lm=0.0 m          Length of metal capacitor.
    11      lp=0.0 m          Length of polysilicon capacitor.
    12      wm=0.0 m          Width of metal capacitor.
    13      wp=0.0 m          Width of polysilicon capacitor.
    14      isnoisy=yes       Should device generate noise. Possible values are no and yes.
    
    The instance parameter `scale', if specified, overrides the value given by the `option' parameter `scale'. If the model parameter `allow_scaling' is set to
    `yes', the `area', `perim', `l', and `w' parameters are scaled by `scale'. By default `allow_scaling' is set to `no' and no scaling of geometry parameters
    occurs. The values of `area', `perim', `l', and `w' parameters printed by Spectre are those given in the input, and these values might not have the correct
    units if the scaling factors are not unity.
    
    
    
    ================
    Model Parameters
    ================
    
    Model selector parameters:
    1       level=1           Model selector. 1 = Junction, 2 = Fowler-Nordheim, 3 = Junction + additional metal and polysilicon capacitances.
    2       dcap=2            Depletion capacitance equations selector (hspice compatibility flag only ).
    3       bv_enable=1       Flag to enable the breakdown of diode. 1=breakdown effect enabled, 0=breakdown effect disabled.
    4       compatible=spectre
                              Spice compatibility flag. Possible values are spectre, spice2, spice3, cdsspice, hspice, spiceplus, eldo, sspice, mica, tispice and
                              pspice.
    
    Process parameters:
    5       etch=0 m          Narrowing due to etching per side.
    6       etchl=0 m         Length reduction due to etching per side.
    7       l=1e-6 m          Drawn length of junction.
    8       w=1e-6 m          Drawn width of junction.
    
    Junction diode parameters:
    9       js=1e-14 A/Area   Saturation current.
    10      is=`js' A         Alias to `js'.
    11      jsw=0 A/Perim     Sidewall saturation current.
    12      isw=`jsw' A       Alias to `jsw'.
    [7m--More--[27m13      isp=`jsw' A       Alias to `jsw'.
    14      n=1               Emission coefficient.
    15      ns=1              Sidewall emission coefficient.
    16      ik=0.0 A/Area     High-level injection knee current, alias to ikf.
    17      ikf=0.0 A/Area    High-level injection knee current, alias to ik.
    18      ikp=`ik' A/Area   High-level injection knee current for sidewall.
    19      ikr=0 A/Area      Reverse high-level injection knee current (hspice compatibility flag only).
    20      area=1            Junction area factor.
    21      perim=0           Junction perimeter factor.
    22      allow_scaling=no  Allow scale option and instance scale parameter to affect diode instance geometry parameters. Possible values are no and yes.
    
    Capacitive parameters:
    23      tt=0 s            Transit time.
    24      cd=0 F/Area       Linear capacitance.
    25      cjo=0 F/Area      Zero-bias junction capacitance.
    26      vj=1 V            Junction potential. (For Hspice, the default value is 0.8).
    27      pb=`vj' V         Alias to 'vj'.
    28      m=0.5             Grading coefficient.
    29      cjsw=0 F/Perim    Zero-bias sidewall junction capacitance.
    30      cjp=`cjsw' F      Alias to `cjsw'.
    31      vjsw=1 V          Sidewall junction potential. (For Hspice, the default value is vj).
    32      php=`vjsw' V      Alias to `vjsw'.
    33      mjsw=0.33         Sidewall grading coefficient.
    34      fc=0.5            Forward-bias depletion capacitance threshold.
    35      fcs=`fc'          Coefficient for forward-bias depletion sidewall capacitance.
    36      lm=0.0 m          Length of metal capacitor (level=3 only).
    37      lp=0.0 m          Length of polysilicon capacitor (level=3 only).
    38      wm=0.0 m          Width of metal capacitor (level=3 only).
    39      wp=0.0 m          Width of polysilicon capacitor (level=3 only).
    40      xm=0.0 m          XM accounts for masking and etching effects (level=3 only).
    41      xp=0.0 m          XP accounts for masking and etching effects (level=3 only).
    42      xoi=0.0 m         Thickness of the polysilicon-to-bulk oxide. Units - nAngstram (level=3 only).
    43      xom=0.0 m         Thickness of the metal-to-bulk oxide. Units - nAngstram (level=3 only).
    44      xw=0.0 m          Accounts for masking and etching effects (level=3 only).
    45      vjmin=0.1         Lowest value for built-in junction potential.
    
    Breakdown parameters:
    46      bv=infinity V     Reverse breakdown voltage. Note: bv=0 is not the same as bv=infinity.
    [7m--More--[27m47      vb=`bv' V         Alias to `bv'.
    48      ibv=0.001 A/Area  Current at breakdown voltage.
    49      nz=1              Emission coefficient for Zener diode.
    50      bvj=infinity V    Voltage at which junction breakdown warning is issued.
    51      isr=0 A/m^2       Recombination current parameter.
    52      ibvl=0 A/m^2      Low-level reverse breakdown current.
    53      nbv=1             Reverse breakdown ideality factor.
    54      nbvl=1            Low-level reverse breakdown ideality factor.
    
    Parasitic resistance parameters:
    55      rs=0 Ohm          Series resistance (/area).
    56      rsw=0 Ohm         Sidewall series resistance (/perim).
    57      gleak=0 S         Bottom junction leakage conductance (*area).
    58      gleaksw=0 S       Sidewall junction leakage conductance (*perim).
    59      minr=0.1 Ohm      Minimum series resistance.
    
    Temperature effects parameters:
    60      tlev=0            DC temperature selector.
    61      tlevc=0           AC temperature selector.
    62      eglev=0           DC temperature selector, alias to tlev==2.
    63      eg=1.11 V         Band gap. Note: when bandgap is not specified, the default value is dependent on the temperature. It is 1.11 at temp=27C.
    64      gap1=7.02e-4 V/C  Band gap temperature coefficient.
    65      gap2=1108 C       Band gap temperature offset.
    66      xti=3             Saturation current temperature exponent.
    67      tbv1=0 1/C        Linear temperature coefficient for `bv'.
    68      tcv=`tbv1' 1/C    Linear temperature coefficient for `bv'.
    69      tbv2=0 C^-2       Quadratic temperature coefficient for `bv'.
    70      tikf=0 1/C        IKF temperature coefficient (linear).
    71      tnom (C)          Parameter measurement temperature. The default value is set by the `options' statement.
    72      trise=0 C         Temperature rise from ambient.
    73      trs=0 1/C         Linear temperature coefficient for parasitic resistance.
    74      trs1=0 1/C        Alias to trs.
    75      tmod=tnom C       Model temperature.
    76      trs2=0 C^-2       Quadratic temperature coefficient for parasitic resistance.
    77      tgs=0 1/C         Linear temperature coefficient for leakage conductance.
    78      tgs2=0 C^-2       Quadratic temperature coefficient for leakage conductance.
    79      cta=0 1/C         Junction capacitance temperature coefficient.
    80      ctp=0 1/C         Sidewall junction capacitance temperature coefficient.
    [7m--More--[27m81      pta=0 V/C         Junction potential temperature coefficient.
    82      ptp=0 V/C         Sidewall junction potential temperature coefficient.
    83      ttt1=0.0 1/C      First order temperature coefficient for tt hspice.
    84      ttt2=0.0 C^-2     Second order temperature coefficient for tt hspice.
    85      tm1=0.0 1/C       First order temperature coefficient for Mj hspice.
    86      tm2=0.0 C^-2      Second order tempperature coefficient for Mj hspice.
    
    Junction diode model control parameters:
    87      jmelt=1.0 A/Area  Explosion current.
    88      imelt=`jmelt' A   Alias to `jmelt'.
    89      expli=`jmelt' A   Alias to `jmelt'.
    90      jmax=1 A/Area     Maximum allowable current.
    91      imax=`jmax' A     Alias to `jmax'.
    92      dskip=yes         Use simple piece-wise linear model for diode currents below 0.1*`iabstol'. Possible values are no and yes.
    
    Fowler-Nordheim diode parameters:
    93      if=1e-10 A/V^nf   Forward Fowler-Nordheim current coefficient (*area).
    94      ir=`if' A/V^nr    Reverse Fowler-Nordheim current coefficient (*area).
    95      ecrf=2.55e10 V/m  Forward critical field (For hspice compatibility, the unit is V/cm, default value is 1.0e8 ).
    96      ecrr=`ecrf' V/m   Reverse critical field (For hspice compatibility, the unit is V/cm).
    97      ef=`ecrf' V/m     Alias of `ecrf'.
    98      er=`ecrr' V/m     Alias of `ecrr'.
    99      nf=2              Forward voltage power.
    100     nr=`nf'           Reverse voltage power.
    101     tox=1e-8 m        Thickness of insulating layer.
    
    TSMC Stand Alone model parameters:
    102     rod=`rs' Ohm      Alias to Rs (Ohmic series resistance).
    103     jts=0 A/m^2       Bottom trap-assisted saturation current density (with Level=1 and StAlone flag=1).
    104     jtssw=0 A/m^2     Sidewall trap-assisted saturation current density (with Level=1 and StAlone flag=1).
    105     mrs=0.4           Fitting parameter for Rseff (with Level=1 and StAlone flag=1).
    106     njts=60           Non-ideality factor for Jts (with Level=1 and StAlone flag=1).
    107     njtssw=60         Non-ideality factor for Jtssw (with Level=1 and StAlone flag=1).
    108     xts=0.055         Power dependence of Jts on temperature (with Level=1 and StAlone flag=1).
    109     xtssw=0.055       Power dependence of Jtssw on temperature (with Level=1 and StAlone flag=1).
    110     tnjts=0.15        Temperature coefficient for Njts (with Level=1 and StAlone flag=1).
    111     tnjtssw=0.15      Temperature coefficient for Njtssw (with Level=1 and StAlone flag=1).
    112     trod=0            Temperature coefficient for Rod(Rs) (with Level=1 and StAlone flag=1).
    [7m--More--[27m[K
    Noise model parameters:
    113     kf=0              Flicker noise (1/f) coefficient.
    114     af=1              Flicker noise (1/f) exponent.
    
    Shrink Parameters:
    115     shrink=1.0        Shrink factor.
    116     shrink2=0.0       Area shrink parameter.
    
    Trap-assisted tunneling current parameters:
    117     jtun=0 A          Tunneling saturation current per area.
    118     jtunsw=0 A        Sidewall tunneling saturation current per unit junction periphery.
    119     ntun=30           Tunneling emission coefficient.
    120     xtitun=3.0        Exponent for the tunneling current temperature.
    121     egtun=eg V        Parameter for tunneling current at reverse region.
    
    Safe Operating Areas Parameters:
    122     bv_max=infinity V
                              Maximum allowed voltage across two terminals.
    123     fv_max=infinity V
                              Maximum allowed forward voltage across two terminals.
    124     keg=1.0 V         The factor that is multiplied by EG to calculate the tunneling bandgap.
    125     gmin_m_scaling=no
                              Allow gmin to be scaled by m or not. Possible values are no and yes.
    
    Both of these parameters have current density counterparts, `jmax' and `jmelt', that you can specify if you want the absolute current values to depend on the
    device area.
    
    
    
    =================
    Output Parameters
    =================
    
    1       bveff (V)         Effective reverse breakdown voltage.
    2       tempeff (C)       Effective temperature for a single device.
    3       meff              Effective multiplicity factor (m-factor).
    
    [7m--More--[27m[K
    ==========================
    Operating Point Parameters
    ==========================
    
    1       region=on         Estimated operating region. Spectre outputs number (0-2) in a rawfile. Possible values are off, on and breakdown.
    2       region0=on        Estimated operating region. Spectre outputs number (0-2) in a rawfile.. Possible values are off, on and breakdown.
    3       v (V)             Extrinsic diode voltage.
    4       i (A)             Resistive diode current (alias=lx1).
    5       pwr (W)           Power dissipation.
    6       res (Ohm)         Resistance of intrinsic diode.
    7       resp (Ohm)        Resistance of intrinsic sidewall diode.
    8       cap (F)           Junction capacitance.
    9       capp (F)          Sidewall junction capacitance.
    10      cd (F)            Total junction capacitance (alias=lx5).
    11      ctotal (F)        Total junction capacitance (alias=lx5).
    12      gd (S)            Equivalent conductance (alias=lx2).
    13      qd (Coul)         Charge of diode capacitor (alias=lx3).
    14      vdio (V)          Voltage across diode (VD), excluding RS (alias=lx0).
    
    
    sml 2/13/2021
    

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • KhanAmir
    KhanAmir over 4 years ago in reply to ShawnLogan

    Thanks

    • 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