• 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. How to evaluate passed parameter with conditional CDF Parameter...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 14085
  • 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

How to evaluate passed parameter with conditional CDF Parameter Instance Label

dNora
dNora over 13 years ago

We use conditional CDF parameter Instance label to hide CDF parameter under certain condition like m=1 similar to CCScondLabel.il script. But it doesn't evaluate passed parameter correctly.

cdfgData = cdfGetInstCDF(inst)

 if( atoi(cdfgData->stripes->value) == 1 then ""
 else
    when( atoi(cdfgData->stripes->value) > 1
          sprintf(nil "s = %s" cdfgData->stripes->value)
     ) ; when
 ) ; if

 

Passed parameter is displayed as nil using above script. 

 

From CIW: cdfgData->stripes->value  returns  "[@s:%:1]"

How do I update the script to perform conditional CDF parameter that works with both passed parameter and regular string?

 I'm using IC6.1.5 version.

Any input would be highly appreciated!

Regards,

Nora

  • Cancel
  • dNora
    dNora over 13 years ago

    I'm presuming at this point whatever I'm asking is not possible unless someone responds.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 13 years ago

     Hi Nora,

    I'm a bit confused as to what you have - the "from CIW" string suggests that this is an NLP parameter, as opposed to say just a string parameter which would be usual for a CDF parameter.  What do you expect atoi() will do with such a string?  Perhaps in the code you could test the value to see if it contains "%" or ":" and treat it differently than if it contained just a number?  The parseString() function could be useful here, give the second argument as ":", and perhaps use this as input to repeat pasreString again with "]", and then the last item should be the number.

    Hopefully this helps, but if not, can you share more details so that we can understand what you have exactly, and what you are trying to achieve?

    regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dNora
    dNora over 13 years ago

     Hi Lawrence,

    I have an  ILExpr label that displays stripes parameter when it's value more than 1 and hides it when it's equal to 1. 

    stripes parameter itself is string type CDF parameter. Code I have used is very simple:

             if( inst->stripes == "1" then "" else strcat("s=" inst->stripes)

    But the problem is when parameter passed for stripes through hierarchy then it displays expression like s=[@s:%:1]  instead of displaying it's passed value from hierarchy. How do I modify above code to handle passed parameter? 

    Regards,

    Nora

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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