hspice simulation - simulate a ring oscillator under process variation with Monte carlo in hspice.

Discussion in 'The Projects Forum' started by lili94, Nov 23, 2015.

  1. lili94

    Thread Starter New Member

    Nov 6, 2015
    4
    0
    Hi everyone,
    I want to simulate a ring oscillator under process variation with Monte carlo in hspice. I write this, but it has an error, what's my mistake?

    *CMOS Ring Oscillator

    V1 vdd 0 3V
    V2 vss 0 0V

    .subckt inv vdd vss in out
    Mp1 vdd in out vdd pmos l=0.35u w=20.0u
    Mn1 vss in out vss nmos l=0.35u w=10.0u
    Cload out vss 100f
    .ends


    *5 stage ring
    x1 vdd vss 1 2 inv
    x2 vdd vss 2 3 inv
    x3 vdd vss 3 4 inv
    x4 vdd vss 4 5 inv
    x5 vdd vss 5 1 inv



    * Beta Version


    * PTM 22nm NMOS
    .model nmos nmos level = 54

    +version = 4.0 binunit = 1 paramchk= 1 mobmod = 0
    +capmod = 2 igcmod = 1 igbmod = 1 geomod = 1
    +diomod = 1 rdsmod = 0 rbodymod= 1 rgatemod= 1
    +permod = 1 acnqsmod= 0 trnqsmod= 0

    +tnom = 27 toxe = 1.2e-9 toxp = 0.9e-9 toxm = 1.2e-9
    +dtox = 0.3e-9 epsrox = 3.9 wint = 5e-009 lint = 2.0e-009
    +ll = 0 wl = 0 lln = 1 wln = 1
    +lw = 0 ww = 0 lwn = 1 wwn = 1
    +lwl = 0 wwl = 0 xpart = 0 toxref = 1.2e-9
    +xl = -9e-9
    +vth0 = 0.5118 k1 = 0.4 k2 = 0.0 k3 = 0
    +k3b = 0 w0 = 2.5e-006 dvt0 = 1 dvt1 = 2
    +dvt2 = 0 dvt0w = 0 dvt1w = 0 dvt2w = 0
    +dsub = 0.078 minv = 0.05 voffl = 0 dvtp0 = 1.0e-011
    +dvtp1 = 0.1 lpe0 = 0 lpeb = 0 xj = 7.2e-009
    +ngate = 2e+020 ndep = 12e+018 nsd = 2e+020 phin = 0
    +cdsc = 0.000 cdscb = 0 cdscd = 0 cit = 0
    +voff = -0.13 nfactor = 2.3 eta0 = 0.0045 etab = 0
    +vfb = -1.058 u0 = 0.0181 ua = -5e-010 ub = 1.7e-018
    +uc = 0 vsat = 200000 a0 = 1.0 ags = 0
    +a1 = 0 a2 = 1.0 b0 = 0 b1 = 0
    +keta = 0.04 dwg = 0 dwb = 0 pclm = 0.06
    +pdiblc1 = 0.001 pdiblc2 = 0.001 pdiblcb = -0.005 drout = 0.5
    +pvag = 1e-020 delta = 0.01 pscbe1 = 8.14e+008 pscbe2 = 1e-007
    +fprout = 0.2 pdits = 0.01 pditsd = 0.23 pditsl = 2.3e+006
    +rsh = 5 rdsw = 130 rsw = 75 rdw = 75
    +rdswmin = 0 rdwmin = 0 rswmin = 0 prwg = 0
    +prwb = 0 wr = 1 alpha0 = 0.074 alpha1 = 0.005
    +beta0 = 30 agidl = 0.0002 bgidl = 2.1e+009 cgidl = 0.0002
    +egidl = 0.8

    +aigbacc = 0.012 bigbacc = 0.0028 cigbacc = 0.002
    +nigbacc = 1 aigbinv = 0.014 bigbinv = 0.004 cigbinv = 0.004
    +eigbinv = 1.1 nigbinv = 3 aigc = 0.012 bigc = 0.0028
    +cigc = 0.002 aigsd = 0.012 bigsd = 0.0028 cigsd = 0.002
    +nigc = 1 poxedge = 1 pigcd = 1 ntox = 1

    +xrcrg1 = 12 xrcrg2 = 5
    +cgso = 0.65e-010 cgdo = 0.65e-010 cgbo = 2.56e-011 cgdl = 2.653e-10
    +cgsl = 2.653e-10 ckappas = 0.03 ckappad = 0.03 acde = 1
    +moin = 15 noff = 0.9 voffcv = 0.02

    +kt1 = -0.11 kt1l = 0 kt2 = 0.022 ute = -1.5
    +ua1 = 4.31e-009 ub1 = 7.61e-018 uc1 = -5.6e-011 prt = 0
    +at = 33000

    +fnoimod = 1 tnoimod = 0

    +jss = 0.0001 jsws = 1e-011 jswgs = 1e-010 njs = 1
    +ijthsfwd= 0.01 ijthsrev= 0.001 bvs = 10 xjbvs = 1
    +jsd = 0.0001 jswd = 1e-011 jswgd = 1e-010 njd = 1
    +ijthdfwd= 0.01 ijthdrev= 0.001 bvd = 10 xjbvd = 1
    +pbs = 1 cjs = 0.0005 mjs = 0.5 pbsws = 1
    +cjsws = 5e-010 mjsws = 0.33 pbswgs = 1 cjswgs = 3e-010
    +mjswgs = 0.33 pbd = 1 cjd = 0.0005 mjd = 0.5
    +pbswd = 1 cjswd = 5e-010 mjswd = 0.33 pbswgd = 1
    +cjswgd = 5e-010 mjswgd = 0.33 tpb = 0.005 tcj = 0.001
    +tpbsw = 0.005 tcjsw = 0.001 tpbswg = 0.005 tcjswg = 0.001
    +xtis = 3 xtid = 3

    +dmcg = 0e-006 dmci = 0e-006 dmdg = 0e-006 dmcgt = 0e-007
    +dwj = 0.0e-008 xgw = 0e-007 xgl = 0e-008

    +rshg = 0.4 gbmin = 1e-010 rbpb = 5 rbpd = 15
    +rbps = 15 rbdb = 15 rbsb = 15 ngcon = 1

    * PTM 22nm PMOS
    .model pmos pmos level = 54

    +version = 4.0 binunit = 1 paramchk= 1 mobmod = 0
    +capmod = 2 igcmod = 1 igbmod = 1 geomod = 1
    +diomod = 1 rdsmod = 0 rbodymod= 1 rgatemod= 1
    +permod = 1 acnqsmod= 0 trnqsmod= 0

    +tnom = 27 toxe = 1.2e-009 toxp = 0.9e-009 toxm = 1.2e-009
    +dtox = 0.3e-9 epsrox = 3.9 wint = 5e-009 lint = 2.0e-009
    +ll = 0 wl = 0 lln = 1 wln = 1
    +lw = 0 ww = 0 lwn = 1 wwn = 1
    +lwl = 0 wwl = 0 xpart = 0 toxref = 1.2e-009
    +xl = -9e-9
    +vth0 = -0.372 k1 = 0.4 k2 = -0.01 k3 = 0
    +k3b = 0 w0 = 2.5e-006 dvt0 = 1 dvt1 = 2
    +dvt2 = -0.032 dvt0w = 0 dvt1w = 0 dvt2w = 0
    +dsub = 0.1 minv = 0.05 voffl = 0 dvtp0 = 1e-011
    +dvtp1 = 0.05 lpe0 = 0 lpeb = 0 xj = 7.2e-009
    +ngate = 2e+020 ndep = 4.40e+018 nsd = 2e+020 phin = 0
    +cdsc = 0.000 cdscb = 0 cdscd = 0 cit = 0
    +voff = -0.13 nfactor = 2.3 eta0 = 0.0037 etab = 0
    +vfb = -1.058 u0 = 0.00230 ua = -0.5e-009 ub = 1.6e-018
    +uc = 0 vsat = 78000 a0 = 1.0 ags = 1e-020
    +a1 = 0 a2 = 1 b0 = 0 b1 = 0
    +keta = -0.047 dwg = 0 dwb = 0 pclm = 0.1
    +pdiblc1 = 0.001 pdiblc2 = 0.001 pdiblcb = 3.4e-008 drout = 0.6
    +pvag = 1e-020 delta = 0.01 pscbe1 = 8.14e+008 pscbe2 = 9.58e-007
    +fprout = 0.2 pdits = 0.08 pditsd = 0.23 pditsl = 2.3e+006
    +rsh = 5 rdsw = 130 rsw = 65 rdw = 65
    +rdswmin = 0 rdwmin = 0 rswmin = 0 prwg = 0
    +prwb = 0 wr = 1 alpha0 = 0.074 alpha1 = 0.005
    +beta0 = 30 agidl = 0.0002 bgidl = 2.1e+009 cgidl = 0.0002
    +egidl = 0.8

    +aigbacc = 0.012 bigbacc = 0.0028 cigbacc = 0.002
    +nigbacc = 1 aigbinv = 0.014 bigbinv = 0.004 cigbinv = 0.004
    +eigbinv = 1.1 nigbinv = 3 aigc = 0.69 bigc = 0.0012
    +cigc = 0.0008 aigsd = 0.0087 bigsd = 0.0012 cigsd = 0.0008
    +nigc = 1 poxedge = 1 pigcd = 1 ntox = 1

    +xrcrg1 = 12 xrcrg2 = 5
    +cgso = 0.65e-010 cgdo = 0.65e-010 cgbo = 2.56e-011 cgdl = 2.653e-10
    +cgsl = 2.653e-10 ckappas = 0.03 ckappad = 0.03 acde = 1
    +moin = 15 noff = 0.9 voffcv = 0.02

    +kt1 = -0.11 kt1l = 0 kt2 = 0.022 ute = -1.5
    +ua1 = 4.31e-009 ub1 = 7.61e-018 uc1 = -5.6e-011 prt = 0
    +at = 33000

    +fnoimod = 1 tnoimod = 0

    +jss = 0.0001 jsws = 1e-011 jswgs = 1e-010 njs = 1
    +ijthsfwd= 0.01 ijthsrev= 0.001 bvs = 10 xjbvs = 1
    +jsd = 0.0001 jswd = 1e-011 jswgd = 1e-010 njd = 1
    +ijthdfwd= 0.01 ijthdrev= 0.001 bvd = 10 xjbvd = 1
    +pbs = 1 cjs = 0.0005 mjs = 0.5 pbsws = 1
    +cjsws = 5e-010 mjsws = 0.33 pbswgs = 1 cjswgs = 3e-010
    +mjswgs = 0.33 pbd = 1 cjd = 0.0005 mjd = 0.5
    +pbswd = 1 cjswd = 5e-010 mjswd = 0.33 pbswgd = 1
    +cjswgd = 5e-010 mjswgd = 0.33 tpb = 0.005 tcj = 0.001
    +tpbsw = 0.005 tcjsw = 0.001 tpbswg = 0.005 tcjswg = 0.001
    +xtis = 3 xtid = 3

    +dmcg = 0e-006 dmci = 0e-006 dmdg = 0e-006 dmcgt = 0e-007
    +dwj = 0.0e-008 xgw = 0e-007 xgl = 0e-008

    +rshg = 0.4 gbmin = 1e-010 rbpb = 5 rbpd = 15
    +rbps = 15 rbdb = 15 rbsb = 15 ngcon = 1



    .Variation
    .Global_Variation
    Parameter var=N() Y='0.8 + 0.6 * var' Z='0.5 + 0.6 * var'
    Nmos nch
    + tox =Perturb('Z')
    + leff=Perturb('Y')
    + vth0=Perturb('-6.2E-12*Y')
    Pmos pch
    + tox =Perturb('0.9*Z')
    + leff=Perturb('0.81*Y')
    + vth0=Perturb('-6.2E-12*Y')
    .End_Global_Variation

    .Local_Variation
    Parameter var=N() Y='0.7 + 0.6 * var' Z='0.5 + 0.6 * var'
    Nmos nch
    + tox =Perturb('Z')
    + leff=Perturb('Y')
    + vth0=Perturb('-6.2E-12*Y')
    Pmos pch
    + tox =Perturb('0.9*Z')
    + leff=Perturb('0.81*Y')
    + vth0=Perturb('-6.2E-12*Y')
    .End_Local_Variation
    .End_Variation


    .TRAN step=0.5 start=1 stop=20 monte=10
    .print v(1) v(2) v(3) v(4)

    .end
     
Loading...