• 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. Reqular expression in skill programmin

Stats

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

Reqular expression in skill programmin

Vaasu
Vaasu over 11 years ago

Can anyone explain me how to use use the regular expression in skill programming........

I'm geeting many info from cadence from that I want only PMOS and  NMOS information from this command geGetEditCellView()~>instances~>cellName

Result is  ("N_18_MM" "N_18_MM" "N_18_MM" "opin" "ipin" "ipin" "ipin" "ipin" "ipin" "ipin""ipin" "P_18_MM" "P_18_MM" "P_18_MM")

From this I want only  "N_18_MM" &"P_18_MM" info

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    If using IC61X, you can use:

    pat=pcreCompile("^[PN]_18") ; or "^[PN]_18_MM$" if you want to be complete
    instances=setof(inst geGetEditCellView()~>instances pcreExecute(pat inst~>cellName))

    I'm assuming you wanted the instance objects, not the names.

    In IC5141, you'd have to use the older rex functions. PCRE is the Perl Compatible Regular Expression library and has a much richer pattern matching syntax than the very basic "rex" regular expressions. For rex, you'd use:

    rexCompile("^[PN]_18")
    instances=setof(inst geGetEditCellView()~>instances rexExecute(inst~>cellName))

    In this specific case, the regular expression needed is very simple, so either would do.

    You don't even really need a regular expression:

    instances=setof(inst geGetEditCellView()~>instances member(inst~>cellName) '("P_18_MM" "N_18_MM")) )

    Best Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tweeks
    tweeks over 11 years ago

    This approach is more complex, but also more efficient for designs with a lot of instances:

    instances = 
      foreach(mapcan instHeader setof(instHeader deGetCellView()->instHeaders 
                                     member(instHeader->cellName '("P_18_MM" "N_18_MM")))
          instHeader->instances
      )
    
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Vaasu
    Vaasu over 11 years ago

     Yea it is working thanks for your suggestion

    • 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