• 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. Automated Labelling

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 13363
  • 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

Automated Labelling

ARB9
ARB9 over 6 years ago

I'm making a python code that will write SKILL code that will place pads into a pad ring. As of right now, when placed, the pads all have the same exact labels. While this works for most, I do want to have some of them change. For example, there is something named P and something named PADR1. I want these names to change to P<n> and PADR1<n> where n is the number pad that is being placed. I found a post from 13 years ago that was close to solving the problem using rexMatchp and rexReplace. To call The function these were in looked something like: ReplaceFunction( "old string"  "new string"). This came really close to working. I did run into a couple problems with it, however. First, when my code places the pads for the ring, it isn't in the right view to be able to change labels. What I mean by that is that you have to double click and/or shift-f to see a view that has the labels up. So the first thing I want to know is how to get to the correct view using SKILL to be able to edit the labels. The second issue I ran into was that, when I used the ReplaceFunction, I got some funky results. For example, if I did ReplaceFunction( "P"  "P<0>"), everywhere that had a P in the name anywhere would get effected. This means that, yes P was changed to P<0>, but also that PADR1 was changed to P<0>ADR1. Is there any way make SKILL look at the whole string instead of just looking at a string, and say "This has that P at the start of a longer string, better replace it!" Any help y'all could give would be a huge help. Thank you :)

  • Cancel
  • mbracht
    mbracht over 6 years ago

    Hi,

    I have to admit that I understand your problem only partially - specifically I have no idea why you create the SKILL code with python...but anyway.
    As for your "view issue" a shift-f does not switch the view - it only turns on the visibility of figures in all levels of the design hierarchy. A double click does something entirely different - it calls the leDoubleClick() function which makes an edit in place of an instance. So I assuming that what you want is the cell view object of  an instance's master, that's easy,- deselect everything, then select the instance in question and then
    (car (geGetSelectedSet))->master

    Now as for your replace problem you should use the pcre API and specify so called anchors indicating the beginning and the end of a string (^ for begin of string and $ for end of string) :
    (pcreReplace (pcreCompile "^P$") <your label text...> "P<0>" 0)
    That way "P" will become "P<0>" but "PADR1" will remain unchanged.

    Hope that helps at least a little...

    Max

    • Cancel
    • Vote Up +1 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