• 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 SKILL
  3. Force increment step in parameter

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 15402
  • 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

Force increment step in parameter

Dimitris Kar
Dimitris Kar over 11 years ago

Hi,

 

I am trying to force the minimum increment in parameters that user defines.

 I managed to implement the min max to force the limits of my parameter (i.e. if 3<=x<=10, I write x=max(x 3)   x=min(x 10))

 I can not find the correct expresion on setting the acceptable step i.e. if the grid is 0.1, then values of x.xxx are not accepted.

 

An suggestions will be warmly welcomed!

 

Many thanks!

 

BR,

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

     OK, now you explained that you're talking about a CDF parameter and gave an example, your question is clear.

     Create a function such as this:

     procedure(CCFonGrid(param lower upper grid)
      let((value)
        value=get(cdfgData param)->value
        value=min(max(value lower) upper)
        get(cdfgData param)->value=round((value/float(grid)))*grid
      )
    )

    And then in your cdfCreateParam call, pass:

      ?callback "CCFonGrid('x 3 10 0.05)"

    Note that in the code you showed, r= 10**-log10(grid) is a complicated way of saying r=1/grid. If you rearrange the expression a little, there's no need to find the reciprocal anyway.

    I've written the above callback code to use get() and to pass the parameter name in, because that way you can use it for multiple CDF parameters with different lower and upper limits and different grids.

    Regards,

    Andrew.

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

     OK, now you explained that you're talking about a CDF parameter and gave an example, your question is clear.

     Create a function such as this:

     procedure(CCFonGrid(param lower upper grid)
      let((value)
        value=get(cdfgData param)->value
        value=min(max(value lower) upper)
        get(cdfgData param)->value=round((value/float(grid)))*grid
      )
    )

    And then in your cdfCreateParam call, pass:

      ?callback "CCFonGrid('x 3 10 0.05)"

    Note that in the code you showed, r= 10**-log10(grid) is a complicated way of saying r=1/grid. If you rearrange the expression a little, there's no need to find the reciprocal anyway.

    I've written the above callback code to use get() and to pass the parameter name in, because that way you can use it for multiple CDF parameters with different lower and upper limits and different grids.

    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