• 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
  • Dimitris Kar
    Dimitris Kar over 11 years ago

    Hi Andrew, 

     

    Say I am giving a parameter via the following code ( shown partialy for reasons of space): 

    ;o------------------------------------------------o;

    cdfCreateParam( cdfId
          ?name     "x"
          ?prompt   "Length"
          ?defValue  3.0
          ?type     "float"
          ?display  "t"
        )

     ;o------------------------------------------------o;

     

    now, in my pCell definition, I have put the upper and lower limit of x

     

    but, what I am missing, is how I can force the limits to be displayed in the parameters form of the pcell when the user exceeds them and how I will also force the grid increment to the input value and its display in the field. 

     

    Now, after a bit of searching I came up with two lines of code for the OnGrid routine: 

    r= 10**-log10(grid)

    round((x*r))/float(r)

     

    which makes my question easier: How to I display the   OnGrid WithinLimits value if the user is violating these rules?

     

    In example: 

     

    say 3<=x<=10

    and grid=0.05

     

    then the user inputs 

     

    Length     4.032

     

    I want to show immediately the value

     Length   4.05

     

    in another case, if user inputs 

     

    Length 2.33

     then field becomes 

    Length 3

     

    Do you have any suggestions? I understand this should be quite triavial but, unfortunatelly can not find the correct approach...

     

    Many thanks! 

     

    D.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Dimitris Kar
    Dimitris Kar over 11 years ago

    Hi Andrew, 

     

    Say I am giving a parameter via the following code ( shown partialy for reasons of space): 

    ;o------------------------------------------------o;

    cdfCreateParam( cdfId
          ?name     "x"
          ?prompt   "Length"
          ?defValue  3.0
          ?type     "float"
          ?display  "t"
        )

     ;o------------------------------------------------o;

     

    now, in my pCell definition, I have put the upper and lower limit of x

     

    but, what I am missing, is how I can force the limits to be displayed in the parameters form of the pcell when the user exceeds them and how I will also force the grid increment to the input value and its display in the field. 

     

    Now, after a bit of searching I came up with two lines of code for the OnGrid routine: 

    r= 10**-log10(grid)

    round((x*r))/float(r)

     

    which makes my question easier: How to I display the   OnGrid WithinLimits value if the user is violating these rules?

     

    In example: 

     

    say 3<=x<=10

    and grid=0.05

     

    then the user inputs 

     

    Length     4.032

     

    I want to show immediately the value

     Length   4.05

     

    in another case, if user inputs 

     

    Length 2.33

     then field becomes 

    Length 3

     

    Do you have any suggestions? I understand this should be quite triavial but, unfortunatelly can not find the correct approach...

     

    Many thanks! 

     

    D.

    • 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