• 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. Create Constraint in skill

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 14217
  • 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

Create Constraint in skill

WTony
WTony over 8 years ago

Hi,

I'm trying to modify some constraint in the techfile read only. I think to use skill code to make the changes in Virtual memory.  I found those two skill command cstCreateConstraint and cstDeleteConstraint.  when I try the cstCreateConstraint, it's gives me an error message

*Error* cstCreateConstraint: (CST-5160): The values entered do not match the allowed value types for this constraint allowedCutClass. Valid value types are (Int2DTblValue ).

does anyone have some example syntax with "Int2DTblValue"

those are the code I used

  techID = techGetTechFile(ddGetObj("TechLib"))
  cgID = cstFindConstraintGroupIn(techID "CG_VIA2")
  cstCreateConstraint(cgID "allowedCutClass" "VIA2"
               list('('("width" "width2"))
                 '('(0.0 0.0) 1
                  '(0.03 0.0) 0
               )
               )
               list('(lowerlayer "M1")
                 '(uppeerLayer "M2")
                 '(cutClass "square")
               )
               t t)

Thanks for help

  • Cancel
  • WTony
    WTony over 8 years ago
    sorry, I did a type error. Error message is still apply

    cstCreateConstraint(cgID "allowedCutClass" list("VIA2")
    list('('("width" "width2"))
    '('(0.0 0.0) 1
    '(0.03 0.0) 0
    )
    )
    list('(lowerlayer "M1")
    '(upperLayer "M2")
    '(cutClass "square")
    )
    t t)
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • WTony
    WTony over 8 years ago
    I found what's going wrong

    I replace " ' " by list and it works
    cstCreateConstraint(cgID "allowedCutClass" list("VIA2")
    list(list(list("width" "width2"))
    list(list(0.0 0.0) 1
    list(0.03 0.0) 0
    )
    )
    list('(lowerLayer "M1")
    '(upperLayer "M2")
    '(cutClass "square")
    )
    t t)

    I don't know the difference between ' and list. I'm still a novice in skill.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    If you use the quote operator ('), it stops everything after it (to the matching parenthesis) from being evaluated - you are just specifying literal values. So it doesn't make sense to put quoted lists inside quoted lists, otherwise the quote is not evaluated.

    If you use the list() function, all the arguments are evaluated before the list is created.

    If you do:

    a=1
    b=2
    '(a b)   ; this will be (a b)
    list(a b)   ; this will be (1 2)

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • WTony
    WTony over 8 years ago
    thanks Andrew for the clarification
    • 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