• 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. Using Spectre MDL to optimize transistor multiplicity (integer...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 128
  • Views 6744
  • 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

Using Spectre MDL to optimize transistor multiplicity (integer parameters)

ConradJ
ConradJ over 2 years ago

Hello!

I am trying to use MDL's built in `mvarsearch` to optimize a buffer to reduce the difference between input and output waveform. The problem is `mvarsearch` is treating transistor multiplicity parameters like a real number, not an integer. 

Is it possible to specify an optimization parameter as an integer or achieve a similar effect?

Thank you!

  • Cancel
Parents
  • ShawnLogan
    ShawnLogan over 2 years ago

    Dear ConradJ,

    ConradJ said:
    Is it possible to specify an optimization parameter as an integer or achieve a similar effect?

    I am neither an SDL expert nor a regular MDL user, but the thought that came to mind as I don't know of a way to force the optimizer to perform an integer search, is to utilize a couple of foreach loops for sets of integer values that are realistic.

    For example, suppose  the variable M_nmos is the nmos multiplier and M_pmos is the pmos multiplier. Suppose you expect the multiplier values to be between 5 and 10 for M_nmos and 10 and 20 for M_pmos. You may have other parameters that are varying (such as channel length for example) in the optimization. You might consider the following basic syntax:

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to ShawnLogan

    Not sure how Shawn's suggestion is going to work since that just adds two loops around the search - and so will just do 66 optimisations, rather than one optimisation to find the two M factors.

    I think it should work (based on a previous change request) by simply declaring the parameter in the MDL file (above the mvarsearch) as an integer:

    int M_nmos=5
    int M_pmos=10

    (you have to declare an initial value when declaring it).

    I've not got a decent test case to try this out on to hand. If I have a moment, I'll do so later today.

    Andrew

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

    ConradJI spent a bit of time trying to get this working. First of all I found that making a spectre parameter an integer seemed to prevent it getting passed to the netlist, so instead I tried this:

    //  mvar.mdl
    //  (C) 2008 Cadence Design Systems, Inc.
    //
    // This example is to find optimal values of design parameters 
    // by running a multi-parameter, multi-goal search function
    //
    
    // alias measurement definition
    alias measurement trans {
    
      // definition of transient analysis with autostop turned on
      run tran( stop=1u, autostop='yes )
    
         // computation of risetime for signal V(out) from 10% to 90%
         export real rise=risetime(sig=V(out), initval=0.5, \
                          finalval=3.0)
    
         //computation of falltime for signal V(out) from 90% to 10%
         export real fall=falltime(sig=V(out), initval=3.0, \
                          finalval=0.5)
    
    }
    
    // Print results to a specified file beginning with "to=" keyword
    print fmt ("\n****Intermediate Results of Optimization Searching****\n\n") to="mvarint.print"
    
    // continue to print in user-format with "addto=" keyword
    print fmt ("%-15s%-15s%-15s%-15s\n", "mp","mn","rise","fall") addto="mvarint.print"
    
    int mpint=1
    int mnint=1
    
    // definition of a mvarsearch function
    mvarsearch {
    
             // definition of multiple optimization goals
       	 option {
       	    accuracy = 1e-3     // convergence tolerance of trans
       	    deltax = 1e-3       // step length
       	    maxiter = 100       // limit to 100 iterations
       	 }
    
             //  definition of multiple parameters to be optimized
       	 parameter {
       	    {mpint, 2, 1, 10} //init_val, lower_val, upper_value
       	    {mnint, 2, 1, 10} //init_val, lower_val, upper_value 
       	 }
    
             // execution of the measurement alias
       	 exec {
                mp=mpint
                mn=mnint
                print fmt("%-15e %-15e", mp, mn) addto="mvarint.print"
       	    run trans
                print fmt("%-15e%-15e\n", trans->rise,trans->fall) \
                          addto="mvarint.print"
                run instParams
       	 }
    
             // definition of goal values to be minimized
       	 zero {
       	    tmp1 = trans->rise-25p
       	    tmp2 = trans->fall-25p 
       	 }
    }

    I made the parameters in the netlist mp and mn, and then optimised mpint and mnint. This seems to transfer to the netlist OK, but something really isn't working when I try this (I'm not sure the optimisation loop is correctly handling discontinuous variables).

    I don't have the bandwidth to test this more (I have vacation coming up) so I suggest you contact customer support.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • ConradJ
    ConradJ over 2 years ago in reply to Andrew Beckett

    Thank you for your response! I agree the optimizer is having trouble with the discontinuities. I will contact support and let you know what I find. Enjoy your vacation!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 2 years ago in reply to Andrew Beckett

    Dear Andrew,

    Andrew Beckett said:
    Not sure how Shawn's suggestion is going to work since that just adds two loops around the search - and so will just do 66 optimisations, rather than one optimisation to find the two M factors.

    Indeed, this will perform multiple optimizations. However, the concept is that it will produce a table with the results of each optimization. From inspection of the table, one can select the specific case that provide a global optimum.

    Although this methodology does not produce a single optimum result, it was my attempt to provide an optimal solution where the optimization algorithm does not support an integer-only constraint for the parameter to be optimized.

    It might be an alternative that may be considered pending any customer support delays.

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • ShawnLogan
    ShawnLogan over 2 years ago in reply to Andrew Beckett

    Dear Andrew,

    Andrew Beckett said:
    Not sure how Shawn's suggestion is going to work since that just adds two loops around the search - and so will just do 66 optimisations, rather than one optimisation to find the two M factors.

    Indeed, this will perform multiple optimizations. However, the concept is that it will produce a table with the results of each optimization. From inspection of the table, one can select the specific case that provide a global optimum.

    Although this methodology does not produce a single optimum result, it was my attempt to provide an optimal solution where the optimization algorithm does not support an integer-only constraint for the parameter to be optimized.

    It might be an alternative that may be considered pending any customer support delays.

    Shawn

    • 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