• 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. SKILL code to change all the existing Metal layers to its...

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 143
  • Views 18149
  • 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

SKILL code to change all the existing Metal layers to its corresponding fillBlock layer

ssram
ssram over 6 years ago

I'm a very beginner to the SKILL scripting, so just looking out for help to write a SKILL code to change all the existing Metal layers to its corresponding fillBlock layer in my layout.

As a start i wrote a few lines to check if the selected metal is "m2" in my layout

and to print "Layer name is m2" if it is

& if it is not, and print "Layer name is NOT m2"

The code is below, but its not doing what i intend it to, please help me fix it:

procedure(MetalToFillBlock()
let((m2)
if(geGetSelSet()~>layerName == m2
then
printf("Layer name is m2")
else
printf("Layer name is NOT m2"))
);let
);procedure

  • Cancel
Parents
  • skillUser
    skillUser over 6 years ago

    There are a couple of issues with the code, the first is that variable 'm2' will be nil, but perhaps more importantly, geGetSelSet() returns a list, and so the result might be 'nil' or '("M2") or '("M2" "M2")' and so on.

    Perhaps something like 'forall' would be useful here?

    procedure(MetalToFillBlock()
      let((m2)
        m2 = "M2"
        if(forall(object geGetSelSet() object~>layerName == m2)  then
          printf("Layer name is %L for all selected objects\n" m2)
        else
          printf("Layer name is NOT %L for all selected objects\n" m2)
        ); if
      );let
    );procedure

    Hopefully this will help a little?

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ssram
    ssram over 6 years ago in reply to skillUser

    Now i'm doing the following, but its coming wrong since my layer generation is not coming good.

    procedure(MetalToFillBlock()
    cv=geGetWindowCellView()
    shapes=geGetSelSet()
    let((m0)
    m2 = "m2"
    foreach(object geGetSelSet() object~>layerName == m2
    dbLayerOr(cv list("m1" "fillBlock") shapes)
    dbLayerOr(cv list("m2" "fillBlock") shapes)
    dbLayerOr(cv list("m3a" "fillBlock") shapes)
    );foreach
    );let
    );procedure

    I know its wrong since in dbLayerOr i'm mentioning shapes as the whole selected list. So my, foreach seems not working. I think i'm doing it horribly wrong.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • ssram
    ssram over 6 years ago in reply to skillUser

    Now i'm doing the following, but its coming wrong since my layer generation is not coming good.

    procedure(MetalToFillBlock()
    cv=geGetWindowCellView()
    shapes=geGetSelSet()
    let((m0)
    m2 = "m2"
    foreach(object geGetSelSet() object~>layerName == m2
    dbLayerOr(cv list("m1" "fillBlock") shapes)
    dbLayerOr(cv list("m2" "fillBlock") shapes)
    dbLayerOr(cv list("m3a" "fillBlock") shapes)
    );foreach
    );let
    );procedure

    I know its wrong since in dbLayerOr i'm mentioning shapes as the whole selected list. So my, foreach seems not working. I think i'm doing it horribly wrong.

    • 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