• 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. Using int and max functions in an instance property of a...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 7181
  • 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 int and max functions in an instance property of a schematic pcell

prasadtammana
prasadtammana over 2 years ago

Hi, 

I've written a skill code to create schematic pcell by following the code Andrew mentioned in the below post: 

https://community.cadence.com/cadence_technology_forums/f/custom-ic-skill/42256/how-to-disable-enable-a-device-in-schematic-pcell-while-netlisting

After I create an instance, I wanted to replace its property named "fingers" using the command below. 

dbReplacePropList(instId list( list("fingers" "string" "int(pPar(\"Length\")/0.84)")  ))

But LVS run is failing saying "int" function is not allowed. I would like to use max function in another case. Could you please let me know if we have any alternative commands that I can use inside pcDefinePCell function to get int and max of pcell variables? 

Thanks,

Prasad

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

    Prasad,

    There are two issues at play here. First of all, expressions on instances are supposed to be in "AEL" (Analog Expression Language) syntax, and in theory (although not always in practice) those should get translated into supported functions for the specific netlist language. AEL doesn't have int, but it does have floor and ceil (to round down and round up). Spectre supports floor, ceil and also int. min and max are not AEL functions, but Spectre does support them. The second issue is which LVS tool you're using - because unless that supports the functions you're hoping for then this isn't going to work. 

    Which LVS tool are you using?

    The alternative is that rather than putting the expression on the instance, you have your PCell code evaluate the expression. The downside of that is that the Length parameter on the instance of your component (the component you have the schematic PCell) will have to be a fixed number and can't be an expression or passed parameter (the reason being that the netlister would need to netlist each hierarchical occurrence of the pcell instance separately to get the correct expansion of any pPar's further up the hierarchy, and that's not supported as it would get rather complicated).

    Regards,

    Andrew 

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

    Prasad,

    There are two issues at play here. First of all, expressions on instances are supposed to be in "AEL" (Analog Expression Language) syntax, and in theory (although not always in practice) those should get translated into supported functions for the specific netlist language. AEL doesn't have int, but it does have floor and ceil (to round down and round up). Spectre supports floor, ceil and also int. min and max are not AEL functions, but Spectre does support them. The second issue is which LVS tool you're using - because unless that supports the functions you're hoping for then this isn't going to work. 

    Which LVS tool are you using?

    The alternative is that rather than putting the expression on the instance, you have your PCell code evaluate the expression. The downside of that is that the Length parameter on the instance of your component (the component you have the schematic PCell) will have to be a fixed number and can't be an expression or passed parameter (the reason being that the netlister would need to netlist each hierarchical occurrence of the pcell instance separately to get the correct expansion of any pPar's further up the hierarchy, and that's not supported as it would get rather complicated).

    Regards,

    Andrew 

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

    Thanks for your reply, Andrew. I'll try to replace int with either floor or ceil. 

    I'm using Calibre for LVS. Do we have any alternative command for max or min? 

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

    You should contact Siemens EDA (formerly known as Mentor Graphics) about that, since Calibre is their product and not a Cadence tool. Certainly from the documentation of CDL supported functions with PVS and Pegasus (Cadence LVS solutions), it's supported in our tools - but I really cannot answer questions about a non-Cadence tool that I don't have access to.

    Andrew 

    • 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