• 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. Corner and varible sweep simulation in spectre

Stats

  • Locked Locked
  • Replies 11
  • Subscribers 64
  • Views 21210
  • 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

Corner and varible sweep simulation in spectre

lahsivece
lahsivece over 12 years ago

Hi ,

I am trying to do a multivariable sweep and corner simulation in spectre . 

In ocean , it is easy , I can do following 

b0_list = list(0.0 1.2)
b1_list = list(0.0 1.2)
b2_list = list(0.0 1.2)

corners='("ss" "ff" "tt" "snfp" "fnsp")

foreach(corner corners

modelFile(list("<path_to_model_library>/model.lib.scs" sprintf(nil "%s" corner)))
foreach(x b2_list
desVar("b2" x)
foreach(y b1_list
desVar("b1" y)
foreach(z b0_list
desVar("b0" z)
  resultsDir(sprintf(nil "<path_to_result_directory>/spectre/schematic/corner=%sb5=%gb4=%gb3=%gb2=%gb1=%gb0=%g",corner,b5_z,b4_y,b3_x,x,y,z))
run()
)
)
)
)


How can I modify above to use it  for spectre simulations from command line ?

Due to some logistical issues , I can have access to either one  MMSIM (for spectre) or IC514( for ocean) for simulation .

Please advise. 

Thanks 

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

    Vishal,

    At the time I first responded to your question, I also looked into using SpectreMDL as a way of avoiding having to duplicate the sweeps for each alter. Unfortunately it didn't work properly - so I requested a fix for this. This was implemented in MMSIM12.1 ISR8 (available on downloads.cadence.com). Here's the explanation of how this works:

    In the spectre netlist (testsweep2.scs), I have:
    
        include "models.scs" section=nn
    
        parameters b2=0.0 b1=0.0 b0=0.0
    
        // silly circuit just to do something
        M1 (d g 0 0) nch w=1u l=0.5u
        vd (d 0) vsource type=dc dc=b1
        vg (g 0) vsource type=sine freq=1M ampl=b2
    
        sweepb2 sweep param=b2 values=[0.0 1.2] {
          sweepb1 sweep param=b1 values=[0.0 1.2] {
    	sweepb0 sweep param=b0 values=[0.0 1.2] {
    	    tran tran stop=1u
    	}
          }
        }
    
        altff altergroup {
    	include "models.scs" section=ff
        }
    
        altss altergroup {
    	include "models.scs" section=ss
        }
    
    And then the MDL script (testsweep2.mdl) is:
    
        run sweepb2 as sweepb2_nn
        run altff
        run sweepb2 as sweepb2_ff
        run altss
        run sweepb2 as sweepb2_ss
    
    Then I can run:
    
    spectremdl testsweep2 

    If you do this (from MMSIM12.1 ISR8 onwards) it conveniently runs the nested sweep for all corners with the minimum of coding in the netlist/MDL file.

    Just thought you (and maybe others) might be interested in this alternative approach!

    Regards,

    Andrew.

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

    Vishal,

    At the time I first responded to your question, I also looked into using SpectreMDL as a way of avoiding having to duplicate the sweeps for each alter. Unfortunately it didn't work properly - so I requested a fix for this. This was implemented in MMSIM12.1 ISR8 (available on downloads.cadence.com). Here's the explanation of how this works:

    In the spectre netlist (testsweep2.scs), I have:
    
        include "models.scs" section=nn
    
        parameters b2=0.0 b1=0.0 b0=0.0
    
        // silly circuit just to do something
        M1 (d g 0 0) nch w=1u l=0.5u
        vd (d 0) vsource type=dc dc=b1
        vg (g 0) vsource type=sine freq=1M ampl=b2
    
        sweepb2 sweep param=b2 values=[0.0 1.2] {
          sweepb1 sweep param=b1 values=[0.0 1.2] {
    	sweepb0 sweep param=b0 values=[0.0 1.2] {
    	    tran tran stop=1u
    	}
          }
        }
    
        altff altergroup {
    	include "models.scs" section=ff
        }
    
        altss altergroup {
    	include "models.scs" section=ss
        }
    
    And then the MDL script (testsweep2.mdl) is:
    
        run sweepb2 as sweepb2_nn
        run altff
        run sweepb2 as sweepb2_ff
        run altss
        run sweepb2 as sweepb2_ss
    
    Then I can run:
    
    spectremdl testsweep2 

    If you do this (from MMSIM12.1 ISR8 onwards) it conveniently runs the nested sweep for all corners with the minimum of coding in the netlist/MDL file.

    Just thought you (and maybe others) might be interested in this alternative approach!

    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