• 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. Monte Carlo simulation for device mismatch

Stats

  • Locked Locked
  • Replies 18
  • Subscribers 126
  • Views 27777
  • 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

Monte Carlo simulation for device mismatch

sdineshkumar
sdineshkumar over 9 years ago

I am trying to simulate a SRAM PUF in cadence 5.1. I want to create threshold variations between two back to back connected inverters. I decided to vary threshold of any one of the PMOS . I want to apply monte carlo simulation with guassian distribution to any one of the PMOS. I dont know  how to apply montecarlo variation to a particular PMOS?

Is there any way to do it in virtuoso 5.1

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    This seems a rather artificial thing to do. If you have statistical models available, you can just run with mismatch. Otherwise I suggest you start by looking at this good overview: 

    There's nothing in IC5141 ADE to allow you to apply mismatch to only selected instances. That is available in IC61X though in ADE XL.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sdineshkumar
    sdineshkumar over 9 years ago

    Thanks Andrew.

    I have wrote code for statistical blocks.

    Now I have to create threshold difference between two inverters. So, I thought that it would be better to do Montecarlo for a specific PMOS. 

    Montecarlo is working fine. But I dont know how to select specific device in montecarlo. I am using IC5.1 version.

    Is there any alternative way is there to create a threshold difference between two inverter?

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

    If you've set up the code for statistical blocks, particularly the mismatch variation, and have models which are in subckts (following the document I told you about), then each device will have different random parameters and so you should then get a mismatch in the Vt (if it's the Vt that your random parameters are affecting) between the devices. You don't need to run monte carlo on just one device - they both will get random values according to the distribution which will differ from each other in some random way.

    So this should create a threshold difference.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sdineshkumar
    sdineshkumar over 9 years ago

    Thanks Andrew..

    parameters tox=4.1e-9
    parameters vth0 = 0.3662473


    statistics
    {
    process
    {

    vary tox dist=gauss std=0.09
    vary vth0 dist=gauss std=0.09

    }
    mismatch
    {

    vary tox dist=gauss std=0.09
    vary vth0 dist=gauss std=0.09

    }

    This is the piece of code I written. I am very new to Monte carlo simulation. Can you please suggest what all the modification I need to do in the code to get the mismatch variation.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sdineshkumar
    sdineshkumar over 9 years ago

    // T58F SPICE BSIM3 VERSION 3.1 PARAMETERS
    //
    // SPICE 3f5 Level 8, Star-HSPICE Level 49, UTMOST Level 8
    //
    // DATE: Oct 31/05
    // LOT: T58F WAF: 9005
    // Temperature_parameters=Default

    model cmosn bsim3v3 type=n
    +version = 3.1 tnom = 27 tox = 4.1e-9
    +xj = 1e-7 nch = 2.3549e17 vth0 = 0.3662473
    +k1 = 0.5864999 k2 = 1.127266e-3 k3 = 1e-3
    +k3b = 0.0294061 w0 = 1e-7 nlx = 1.630684e-7
    +dvt0w = 0 dvt1w = 0 dvt2w = 0
    +dvt0 = 1.2064649 dvt1 = 0.4215486 dvt2 = 0.0197749
    +u0 = 273.8094484 ua = -1.40499e-9 ub = 2.408323e-18
    +uc = 6.504826e-11 vsat = 1.355009e5 a0 = 2
    +ags = 0.4449958 b0 = 1.901075e-7 b1 = 4.99995e-6
    +keta = -0.0164863 a1 = 3.868769e-4 a2 = 0.4640272
    +rdsw = 123.3376355 prwg = 0.5 prwb = -0.197728
    +wr = 1 wint = 0 lint = 1.690044e-8
    +xl = 0 xw = -1e-8 dwg = -4.728719e-9
    +dwb = -2.452411e-9 voff = -0.0948017 nfactor = 2.1860065
    +cit = 0 cdsc = 2.4e-4 cdscd = 0
    +cdscb = 0 eta0 = 2.230928e-3 etab = 6.028975e-5
    +dsub = 0.0145467 pclm = 1.3822069 pdiblc1 = 0.1762787
    +pdiblc2 = 1.66653e-3 pdiblcb = -0.1 drout = 0.7694691
    +pscbe1 = 8.91287e9 pscbe2 = 7.349607e-9 pvag = 1.685917e-3
    +delta = 0.01 rsh = 6.7 mobmod = 1
    +prt = 0 ute = -1.5 kt1 = -0.11
    +kt1l = 0 kt2 = 0.022 ua1 = 4.31e-9
    +ub1 = -7.61e-18 uc1 = -5.6e-11 at = 3.3e4
    +wl = 0 wln = 1 ww = 0
    +wwn = 1 wwl = 0 ll = 0
    +lln = 1 lw = 0 lwn = 1
    +lwl = 0 capmod = 2 xpart = 0.5
    +cgdo = 8.23e-10 cgso = 8.23e-10 cgbo = 1e-12
    +cj = 9.466429e-4 pb = 0.8 mj = 0.3820266
    +cjsw = 2.608154e-10 pbsw = 0.8 mjsw = 0.102322
    +cjswg = 3.3e-10 pbswg = 0.8 mjswg = 0.102322
    +cf = 0 pvth0 = -2.199373e-3 prdsw = -0.9368961
    +pk2 = 1.593254e-3 wketa = -2.880976e-3 lketa = 7.165078e-3
    +pu0 = 6.777519 pua = 5.505418e-12 pub = 8.84133e-25
    +pvsat = 2.006286e3 peta0 = 1.003159e-4 pketa = -6.759277e-3
    +noimod=2.0e+00 noia=1.3182567385564e+19
    +noib=144543.977074592 noic=-1.24515784572817e-12 ef=0.92 em=41000000
    // *
    // *
    // * flicker noise parameters above added manually from some other process
    // *
    model cmosp bsim3v3 type=p
    +version = 3.1 tnom = 27 tox = 4.1e-9
    +xj = 1e-7 nch = 4.1589e17 vth0 = -0.3906012
    +k1 = 0.5341312 k2 = 0.0395326 k3 = 0
    +k3b = 7.4916211 w0 = 1e-6 nlx = 1.194072e-7
    +dvt0w = 0 dvt1w = 0 dvt2w = 0
    +dvt0 = 0.5060555 dvt1 = 0.2423835 dvt2 = 0.1
    +u0 = 115.6894042 ua = 1.573746e-9 ub = 1.874308e-21
    +uc = -1e-10 vsat = 1.130982e5 a0 = 1.9976555
    +ags = 0.4186945 b0 = 1.949178e-7 b1 = 6.422908e-7
    +keta = 0.0166345 a1 = 0.4749146 a2 = 0.300003
    +rdsw = 198.321294 prwg = 0.5 prwb = -0.4986647
    +wr = 1 wint = 0 lint = 2.94454e-8
    +xl = 0 xw = -1e-8 dwg = -2.798724e-8
    +dwb = -4.83797e-10 voff = -0.095236 nfactor = 2
    +cit = 0 cdsc = 2.4e-4 cdscd = 0
    +cdscb = 0 eta0 = 1.035504e-3 etab = -4.358398e-4
    +dsub = 1.816555e-3 pclm = 1.3299898 pdiblc1 = 1.766563e-3
    +pdiblc2 = 7.728395e-7 pdiblcb = -1e-3 drout = 1.011891e-3
    +pscbe1 = 4.872184e10 pscbe2 = 5e-10 pvag = 0.0209921
    +delta = 0.01 rsh = 7.7 mobmod = 1
    +prt = 0 ute = -1.5 kt1 = -0.11
    +kt1l = 0 kt2 = 0.022 ua1 = 4.31e-9
    +ub1 = -7.61e-18 uc1 = -5.6e-11 at = 3.3e4
    +wl = 0 wln = 1 ww = 0
    +wwn = 1 wwl = 0 ll = 0
    +lln = 1 lw = 0 lwn = 1
    +lwl = 0 capmod = 2 xpart = 0.5
    +cgdo = 6.35e-10 cgso = 6.35e-10 cgbo = 1e-12
    +cj = 1.144521e-3 pb = 0.8468686 mj = 0.4099522
    +cjsw = 2.490749e-10 pbsw = 0.8769118 mjsw = 0.3478565
    +cjswg = 4.22e-10 pbswg = 0.8769118 mjswg = 0.3478565
    +cf = 0 pvth0 = 2.302018e-3 prdsw = 9.0575312
    +pk2 = 1.821914e-3 wketa = 0.0222457 lketa = -1.495872e-3
    +pu0 = -1.5580645 pua = -6.36889e-11 pub = 1e-21
    +pvsat = 49.8420442 peta0 = 2.827793e-5 pketa = -2.536564e-3
    + noimod=2.0e+00 noia=3.57456993317604e+18 noib=2500
    + noic=2.61260020285845e-11 ef=1.1388 em=41000000
    // *
    // *
    // * flicker noise parameters above added manually from some other process// *


    parameters vth0=0.3662473
    parameters dvt0=1.2064649


    statistics
    {
    process
    {
    vary vth0 dist=gauss std=9 percent=yes
    vary dvt0 dist=gauss std=9 percent=yes

    }
    mismatch
    {

    vary dvt0 dist=gauss std=9 percent=yes
    vary vth0 dist=gauss std=9 percent=yes

    }
    }
    subckt NMOS_VTL (a b c d)
    parameters w=350e-9 l=180e-9

    M7 (a b c d) cmosn w=w l=l dvt0=0.5060555 vth0=0.3662473
    end NMOS_VTL

    This is the code which I have written.

    Is this correct?

    I am getting same output for all runs..

    please suggest me as I am new to perform monte carlo simulation

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

    That won't work, because for mismatch to work you have to have parameterised models within the subckt - and in this case you are instantiating cmosn and trying to pass model parameters to the instance of cmosn. vth0 and dvt0 are model parameters, not instance parameters.

    You'd need to use something like:

    subckt NMOS_VTL (D G S B)
    parameters w=350e-9 l=180e-9

    M7 (D G S B) cmosn w=w l=l 

    model cmosn bsim3v3 type=n ...
    + vth0=vth0 dvt0=dvt0 
    + // other parameters
    ends NMOS_VTL

    in other words, put the model inside the subckt, and parameterize the model definition with the global parameters you've specified as having distributions.

    This is covered in the monte carlo modelling guide that I referred to earlier in this thread.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sdineshkumar
    sdineshkumar over 9 years ago

    Thanks Andrew for your reply.

    May I know how to find out the threshold voltage for each MOS after running Montecarlo simulation?

    With regards,

    Dinesh

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sdineshkumar
    sdineshkumar over 9 years ago
    model cmosn bsim3v3 type=n
    +version = 3.1 tnom = 27 tox = 4.1e-9
    +xj = 1e-7 nch = 2.3549e17 vth0 = 0.3662473
    +k1 = 0.5864999 k2 = 1.127266e-3 k3 = 1e-3
    +k3b = 0.0294061 w0 = 1e-7 nlx = 1.630684e-7
    +dvt0w = 0 dvt1w = 0 dvt2w = 0
    +dvt0 = 1.2064649 dvt1 = 0.4215486 dvt2 = 0.0197749
    +u0 = 273.8094484 ua = -1.40499e-9 ub = 2.408323e-18
    +uc = 6.504826e-11 vsat = 1.355009e5 a0 = 2
    +ags = 0.4449958 b0 = 1.901075e-7 b1 = 4.99995e-6
    +keta = -0.0164863 a1 = 3.868769e-4 a2 = 0.4640272
    +rdsw = 123.3376355 prwg = 0.5 prwb = -0.197728
    +wr = 1 wint = 0 lint = 1.690044e-8
    +xl = 0 xw = -1e-8 dwg = -4.728719e-9
    +dwb = -2.452411e-9 voff = -0.0948017 nfactor = 2.1860065
    +cit = 0 cdsc = 2.4e-4 cdscd = 0
    +cdscb = 0 eta0 = 2.230928e-3 etab = 6.028975e-5
    +dsub = 0.0145467 pclm = 1.3822069 pdiblc1 = 0.1762787
    +pdiblc2 = 1.66653e-3 pdiblcb = -0.1 drout = 0.7694691
    +pscbe1 = 8.91287e9 pscbe2 = 7.349607e-9 pvag = 1.685917e-3
    +delta = 0.01 rsh = 6.7 mobmod = 1
    +prt = 0 ute = -1.5 kt1 = -0.11
    +kt1l = 0 kt2 = 0.022 ua1 = 4.31e-9
    +ub1 = -7.61e-18 uc1 = -5.6e-11 at = 3.3e4
    +wl = 0 wln = 1 ww = 0
    +wwn = 1 wwl = 0 ll = 0
    +lln = 1 lw = 0 lwn = 1
    +lwl = 0 capmod = 2 xpart = 0.5
    +cgdo = 8.23e-10 cgso = 8.23e-10 cgbo = 1e-12
    +cj = 9.466429e-4 pb = 0.8 mj = 0.3820266
    +cjsw = 2.608154e-10 pbsw = 0.8 mjsw = 0.102322
    +cjswg = 3.3e-10 pbswg = 0.8 mjswg = 0.102322
    +cf = 0 pvth0 = -2.199373e-3 prdsw = -0.9368961
    +pk2 = 1.593254e-3 wketa = -2.880976e-3 lketa = 7.165078e-3
    +pu0 = 6.777519 pua = 5.505418e-12 pub = 8.84133e-25
    +pvsat = 2.006286e3 peta0 = 1.003159e-4 pketa = -6.759277e-3
    +noimod=2.0e+00 noia=1.3182567385564e+19
    +noib=144543.977074592 noic=-1.24515784572817e-12 ef=0.92 em=41000000
    // *
    // *
    // * flicker noise parameters above added manually from some other process
    // *
    model cmosp bsim3v3 type=p
    +version = 3.1 tnom = 27 tox = 4.1e-9
    +xj = 1e-7 nch = 4.1589e17 vth0 = -0.3906012
    +k1 = 0.5341312 k2 = 0.0395326 k3 = 0
    +k3b = 7.4916211 w0 = 1e-6 nlx = 1.194072e-7
    +dvt0w = 0 dvt1w = 0 dvt2w = 0
    +dvt0 = 0.5060555 dvt1 = 0.2423835 dvt2 = 0.1
    +u0 = 115.6894042 ua = 1.573746e-9 ub = 1.874308e-21
    +uc = -1e-10 vsat = 1.130982e5 a0 = 1.9976555
    +ags = 0.4186945 b0 = 1.949178e-7 b1 = 6.422908e-7
    +keta = 0.0166345 a1 = 0.4749146 a2 = 0.300003
    +rdsw = 198.321294 prwg = 0.5 prwb = -0.4986647
    +wr = 1 wint = 0 lint = 2.94454e-8
    +xl = 0 xw = -1e-8 dwg = -2.798724e-8
    +dwb = -4.83797e-10 voff = -0.095236 nfactor = 2
    +cit = 0 cdsc = 2.4e-4 cdscd = 0
    +cdscb = 0 eta0 = 1.035504e-3 etab = -4.358398e-4
    +dsub = 1.816555e-3 pclm = 1.3299898 pdiblc1 = 1.766563e-3
    +pdiblc2 = 7.728395e-7 pdiblcb = -1e-3 drout = 1.011891e-3
    +pscbe1 = 4.872184e10 pscbe2 = 5e-10 pvag = 0.0209921
    +delta = 0.01 rsh = 7.7 mobmod = 1
    +prt = 0 ute = -1.5 kt1 = -0.11
    +kt1l = 0 kt2 = 0.022 ua1 = 4.31e-9
    +ub1 = -7.61e-18 uc1 = -5.6e-11 at = 3.3e4
    +wl = 0 wln = 1 ww = 0
    +wwn = 1 wwl = 0 ll = 0
    +lln = 1 lw = 0 lwn = 1
    +lwl = 0 capmod = 2 xpart = 0.5
    +cgdo = 6.35e-10 cgso = 6.35e-10 cgbo = 1e-12
    +cj = 1.144521e-3 pb = 0.8468686 mj = 0.4099522
    +cjsw = 2.490749e-10 pbsw = 0.8769118 mjsw = 0.3478565
    +cjswg = 4.22e-10 pbswg = 0.8769118 mjswg = 0.3478565
    +cf = 0 pvth0 = 2.302018e-3 prdsw = 9.0575312
    +pk2 = 1.821914e-3 wketa = 0.0222457 lketa = -1.495872e-3
    +pu0 = -1.5580645 pua = -6.36889e-11 pub = 1e-21
    +pvsat = 49.8420442 peta0 = 2.827793e-5 pketa = -2.536564e-3
    + noimod=2.0e+00 noia=3.57456993317604e+18 noib=2500
    + noic=2.61260020285845e-11 ef=1.1388 em=41000000
    // *
    // *
    // * flicker noise parameters above added manually from some other process// *

    simulator lang=spectre

    parameters vth0=0.3662473
    parameters dvt0=1.2064649

    statistics
    {
    process
    {
    vary dvt0 dist=gauss std=9 percent=yes

    }
    mismatch
    {

    vary dvt0 dist=gauss std=100 percent=yes

    }
    }
    inline subckt NFET (D G S B)
    parameters w=350e-9 l=180e-9
    NFET (D G S B) cmosn w=w l=l vth0 =0.5+ dvt0/sqrt(l*w)
    model cmosn bsim3v3 type=n
    +vth0 =vth0 dvt0 = dvt0
    +tnom = 27 tox = 4.1e-9
    +xj = 1e-7 nch = 2.3549e17
    +k1 = 0.5864999 k2 = 1.127266e-3 k3 = 1e-3
    +k3b = 0.0294061 w0 = 1e-7 nlx = 1.630684e-7
    +dvt0w = 0 dvt1w = 0 dvt2w = 0
    + dvt1 = 0.4215486 dvt2 = 0.0197749
    +u0 = 273.8094484 ua = -1.40499e-9 ub = 2.408323e-18
    +uc = 6.504826e-11 vsat = 1.355009e5 a0 = 2
    +ags = 0.4449958 b0 = 1.901075e-7 b1 = 4.99995e-6
    +keta = -0.0164863 a1 = 3.868769e-4 a2 = 0.4640272
    +rdsw = 123.3376355 prwg = 0.5 prwb = -0.197728
    +wr = 1 wint = 0 lint = 1.690044e-8
    +xl = 0 xw = -1e-8 dwg = -4.728719e-9
    +dwb = -2.452411e-9 voff = -0.0948017 nfactor = 2.1860065
    +cit = 0 cdsc = 2.4e-4 cdscd = 0
    +cdscb = 0 eta0 = 2.230928e-3 etab = 6.028975e-5
    +dsub = 0.0145467 pclm = 1.3822069 pdiblc1 = 0.1762787
    +pdiblc2 = 1.66653e-3 pdiblcb = -0.1 drout = 0.7694691
    +pscbe1 = 8.91287e9 pscbe2 = 7.349607e-9 pvag = 1.685917e-3
    +delta = 0.01 rsh = 6.7 mobmod = 1
    +prt = 0 ute = -1.5 kt1 = -0.11
    +kt1l = 0 kt2 = 0.022 ua1 = 4.31e-9
    +ub1 = -7.61e-18 uc1 = -5.6e-11 at = 3.3e4
    +wl = 0 wln = 1 ww = 0
    +wwn = 1 wwl = 0 ll = 0
    +lln = 1 lw = 0 lwn = 1
    +lwl = 0 capmod = 2 xpart = 0.5
    +cgdo = 8.23e-10 cgso = 8.23e-10 cgbo = 1e-12
    +cj = 9.466429e-4 pb = 0.8 mj = 0.3820266
    +cjsw = 2.608154e-10 pbsw = 0.8 mjsw = 0.102322
    +cjswg = 3.3e-10 pbswg = 0.8 mjswg = 0.102322
    +cf = 0 pvth0 = -2.199373e-3 prdsw = -0.9368961
    +pk2 = 1.593254e-3 wketa = -2.880976e-3 lketa = 7.165078e-3
    +pu0 = 6.777519 pua = 5.505418e-12 pub = 8.84133e-25
    +pvsat = 2.006286e3 peta0 = 1.003159e-4 pketa = -6.759277e-3
    +noimod=2.0e+00 noia=1.3182567385564e+19
    +noib=144543.977074592 noic=-1.24515784572817e-12 ef=0.92 em=41000000
    ends NFET Hi andrew.. This is the spectre code I modified.. When I run this code I am still not getting any variation.. Pls help me..
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sdineshkumar
    sdineshkumar over 9 years ago
    Hi Andrew, In the file which you have referred they modelled montecarlo using resistors. In the prosess paprameters they have declared mismatch parameter. I am trying to find out the mismatch parameter for the transistor. Can you pls provide a sample code to vary threshold voltage of invereters so that We can follow the same..
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sdineshkumar
    sdineshkumar over 9 years ago
    Hi, Can you please tell me what is meant by instance parameter?
    • 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