• 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 14088
  • 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
Parents
  • 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
Reply
  • 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
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