• 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. RF Design
  3. Working with DC sweeps and OP

Stats

  • Locked Locked
  • Replies 14
  • Subscribers 66
  • Views 35207
  • 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

Working with DC sweeps and OP

MicheleA
MicheleA over 13 years ago

Hi all,

I know it's not appealing to write one's first post in an RF focused group talking about DC but please bare with me :)

I am interested in plotting some MOS DC parameters like gm, gmoverid, Cgg, gds as they vary across VGS and VDS.

Keeping VDS fixed for the moment, I would expect to be able to DC sweep VGS and get a curve of - say - gm Vs. VGS. This is not the case. I actually get only one point, which is the point corresponding to the "static" value of VGS, in the design variables list.

Of course I could set up an equation in the Calculator for the derivative of Id but I think that "somewhere" the tool should calculate those parameters for me...And also because for some trickier parameters like Cgg the whole process would be more complicated.

The alternative to that is to run a parametric analysis, but this is way less effective timewise.

 Does anybody know of a way of overcoming this?

Thank you in advance,

 Michele

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Michele,

    So if the two independent axes (VGS and VDS) are "x" and "y", you want a slice which is in the z axis - i.e. the dependent axis - thus giving you a true contour map (at least for a single value).

    There's not really an capability to do that - there's the xval function if there's a single crossing, but if there are multiple regions that won't help you. 

    So right now you're probably best doing this in Matlab, say. You could use the spectre toolbox for Matlab (covered in the MMSIM documentation, and in app notes in the <MMSIMinstDir>/tools/spectre/examples directory hierarchy).

    I just used this simple example:

    // example of sweeping id curves
    model nch mos1 type=n vto=1 kp=16u gamma=1.3 lambda=0.01 \
           phi=0.7 pb=0.80 mj=0.5 mjsw=0.3 cgbo=200p cgso=350p cgdo=350p \
           cj=300u cjsw=500p ld=0.1u tox=80n \
           af=1 kf=3.1e-24


    m1 (drain gate 0 0) nch w=20u l=0.8u
    vgs (gate 0) vsource dc=2.5
    vds (drain 0) vsource dc=1

    voff (off 0) vsource dc=20m
    vcvs (gate2 off gate 0) vcvs gain=1
    rload (gate2 0) resistor r=10k

    save m1:ids m1:gm rload:1

    sweepvgs sweep dev=vgs param=dc start=0 stop=2 step=20m {
        dc dc dev=vds start=0 stop=5 step=20m
    }

    And ran (from command line) "spectre idcurvesw.scs" which produced idcurvesw.raw (the PSF results).

    Then I did this in Matlab:

    gm=cds_srr('./idcurvesw.raw','sweepvgs_dc-sweep','m1:gm');
    contour(getfield(gm,'vgs:dc'),gm.dc,gm.S);

    (could use mesh instead of contour to see a graph). Similarly could look at m1:ids:

    id=cds_srr('idcurvesw.raw','sweepvgs_dc-sweep','m1:ids')
    mesh(getfield(id,'vgs:dc'),id.dc,id.A)

    So this means you then don't have to load it and then export it to CSV to read back into Matlab; it can directly read the PSF results into Matlab.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Michele,

    So if the two independent axes (VGS and VDS) are "x" and "y", you want a slice which is in the z axis - i.e. the dependent axis - thus giving you a true contour map (at least for a single value).

    There's not really an capability to do that - there's the xval function if there's a single crossing, but if there are multiple regions that won't help you. 

    So right now you're probably best doing this in Matlab, say. You could use the spectre toolbox for Matlab (covered in the MMSIM documentation, and in app notes in the <MMSIMinstDir>/tools/spectre/examples directory hierarchy).

    I just used this simple example:

    // example of sweeping id curves
    model nch mos1 type=n vto=1 kp=16u gamma=1.3 lambda=0.01 \
           phi=0.7 pb=0.80 mj=0.5 mjsw=0.3 cgbo=200p cgso=350p cgdo=350p \
           cj=300u cjsw=500p ld=0.1u tox=80n \
           af=1 kf=3.1e-24


    m1 (drain gate 0 0) nch w=20u l=0.8u
    vgs (gate 0) vsource dc=2.5
    vds (drain 0) vsource dc=1

    voff (off 0) vsource dc=20m
    vcvs (gate2 off gate 0) vcvs gain=1
    rload (gate2 0) resistor r=10k

    save m1:ids m1:gm rload:1

    sweepvgs sweep dev=vgs param=dc start=0 stop=2 step=20m {
        dc dc dev=vds start=0 stop=5 step=20m
    }

    And ran (from command line) "spectre idcurvesw.scs" which produced idcurvesw.raw (the PSF results).

    Then I did this in Matlab:

    gm=cds_srr('./idcurvesw.raw','sweepvgs_dc-sweep','m1:gm');
    contour(getfield(gm,'vgs:dc'),gm.dc,gm.S);

    (could use mesh instead of contour to see a graph). Similarly could look at m1:ids:

    id=cds_srr('idcurvesw.raw','sweepvgs_dc-sweep','m1:ids')
    mesh(getfield(id,'vgs:dc'),id.dc,id.A)

    So this means you then don't have to load it and then export it to CSV to read back into Matlab; it can directly read the PSF results into Matlab.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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