• 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. Request for SKILL to search for vias with metal enclosure...

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 143
  • Views 15694
  • 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

Request for SKILL to search for vias with metal enclosure less than value X then update it to have a metal enclosure value X

Tom Sawyer
Tom Sawyer over 4 years ago

Hi Cadence Forum
Good day

So I am clearing some DFM violations and it's taking a lot of time.

The DFM rule for all the via is to have a metal enclosure of at least 0.09um.
If the metal enclosure is greater than or equal to 0.09um, leave it as it is.
If the metal enclosure is less than 0.09um, change it to 0.09um.

Is there a way to automate this?
Please see the image for the illustration.

Best regards,

,

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

    You could use this SKILL code (I think I tested it thoroughly enough, I hope!):

    /* abSetViaMinMetalEnclosure.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Apr 22, 2021 
    Modified   
    By         
    
    A function to set the minimum enclosure on metal layers
    in vias to the specified dimension.
    
    Can be used with all vias by doing (for example):
    
    foreach(via geGetEditCellView()~>vias
      abSetViaMinMetalEnclosure(via 0.09)
    )
    
    Of course, you could check the via type from the viaHeader
    and only apply this to certain vias if you wish.
    
    ***************************************************
    
    SCCS Info: @(#) abSetViaMinMetalEnclosure.il 04/22/21.17:24:26 1.1
    
    */
    
    /***************************************************************
    *                                                              *
    *            abSetViaMinMetalEnclosure(via minimum)            *
    *                                                              *
    *        check both layer enclosures, and if the layer         *
    *      is a metal layer, ensure that the enclosure is at       *
    *        least the minimum. Note that this will end up         *
    *     setting the offset override, even if the enclosures      *
    *                       are symmetrical.                       *
    *                                                              *
    ***************************************************************/
    
    procedure(abSetViaMinMetalEnclosure(via minimum)
      let((viaDef encList changed encChanged)
        viaDef=via~>viaHeader~>viaDef
        foreach((enc offset material) 
            '(layer1Enc layer2Enc) 
            '(layer1Offset layer2Offset) 
            list(viaDef~>layer1~>material viaDef~>layer2~>material)
          ;------------------------------------------------------------------
          ; Only change enclosures on metal layers
          ;------------------------------------------------------------------
          when(material=="metal"
            ;----------------------------------------------------------------
            ; ordered Left, Right, Top, Bottom
            ;----------------------------------------------------------------
            encList=
              destructuringBind(
                  ((xEnc yEnc) (xOff yOff)) 
                  list(get(via enc) get(via offset))
                list(xEnc-xOff xEnc+xOff yEnc+yOff yEnc-yOff)
              )
            ;----------------------------------------------------------------
            ; Compute a new list of the four enclosures, tracking
            ; whether anything changed
            ;----------------------------------------------------------------
            encChanged=nil
            encList=foreach(mapcar encVal encList
              if(encVal<minimum then
                encChanged=t
                minimum
              else
                encVal
              )
            )
            ;----------------------------------------------------------------
            ; If the enclosures changed, set the layerNEnc to the average
            ; enclosure, and layerNOffset to half the difference
            ;----------------------------------------------------------------
            when(encChanged
              changed=t
              destructuringBind((lEnc rEnc tEnc bEnc) encList
                putprop(via
                  list((lEnc+rEnc)/2 (tEnc+bEnc)/2)
                  enc
                )
                putprop(via
                  list((rEnc-lEnc)/2 (tEnc-bEnc)/2)
                  offset
                )
              )
            )
          )
        )
        changed
      )
    )
    

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    You could use this SKILL code (I think I tested it thoroughly enough, I hope!):

    /* abSetViaMinMetalEnclosure.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Apr 22, 2021 
    Modified   
    By         
    
    A function to set the minimum enclosure on metal layers
    in vias to the specified dimension.
    
    Can be used with all vias by doing (for example):
    
    foreach(via geGetEditCellView()~>vias
      abSetViaMinMetalEnclosure(via 0.09)
    )
    
    Of course, you could check the via type from the viaHeader
    and only apply this to certain vias if you wish.
    
    ***************************************************
    
    SCCS Info: @(#) abSetViaMinMetalEnclosure.il 04/22/21.17:24:26 1.1
    
    */
    
    /***************************************************************
    *                                                              *
    *            abSetViaMinMetalEnclosure(via minimum)            *
    *                                                              *
    *        check both layer enclosures, and if the layer         *
    *      is a metal layer, ensure that the enclosure is at       *
    *        least the minimum. Note that this will end up         *
    *     setting the offset override, even if the enclosures      *
    *                       are symmetrical.                       *
    *                                                              *
    ***************************************************************/
    
    procedure(abSetViaMinMetalEnclosure(via minimum)
      let((viaDef encList changed encChanged)
        viaDef=via~>viaHeader~>viaDef
        foreach((enc offset material) 
            '(layer1Enc layer2Enc) 
            '(layer1Offset layer2Offset) 
            list(viaDef~>layer1~>material viaDef~>layer2~>material)
          ;------------------------------------------------------------------
          ; Only change enclosures on metal layers
          ;------------------------------------------------------------------
          when(material=="metal"
            ;----------------------------------------------------------------
            ; ordered Left, Right, Top, Bottom
            ;----------------------------------------------------------------
            encList=
              destructuringBind(
                  ((xEnc yEnc) (xOff yOff)) 
                  list(get(via enc) get(via offset))
                list(xEnc-xOff xEnc+xOff yEnc+yOff yEnc-yOff)
              )
            ;----------------------------------------------------------------
            ; Compute a new list of the four enclosures, tracking
            ; whether anything changed
            ;----------------------------------------------------------------
            encChanged=nil
            encList=foreach(mapcar encVal encList
              if(encVal<minimum then
                encChanged=t
                minimum
              else
                encVal
              )
            )
            ;----------------------------------------------------------------
            ; If the enclosures changed, set the layerNEnc to the average
            ; enclosure, and layerNOffset to half the difference
            ;----------------------------------------------------------------
            when(encChanged
              changed=t
              destructuringBind((lEnc rEnc tEnc bEnc) encList
                putprop(via
                  list((lEnc+rEnc)/2 (tEnc+bEnc)/2)
                  enc
                )
                putprop(via
                  list((rEnc-lEnc)/2 (tEnc-bEnc)/2)
                  offset
                )
              )
            )
          )
        )
        changed
      )
    )
    

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Children
  • Tom Sawyer
    Tom Sawyer over 4 years ago in reply to Andrew Beckett

    Hi Andrew

    Thanks for the reply.

    Follow up noob question.

    How will I use this skill code?

    What I did was to copy your code and save it as abSetViaMinMetalEnclosure.il.

    Then load it on CIW by typing
          load("path/abSetViaMinMetalEnclosure.il")

    I was expecting that the vias on my layout will change but no change so far.

    Am I doing it wrong?

    Maybe I should change some part of your code?
    The via definition I am using is m1m2, m2m3, m3m4, etc.

    Regards,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to Tom Sawyer

    If you want to apply it to all vias, then after loading it, you'd need to use the example as shown in the comments at the top of the code:

    foreach(via geGetEditCellView()~>vias
      abSetViaMinMetalEnclosure(via 0.09)
    )

    This will work on any via that as a metal layer (and only on the enclosures related to metal)

    If you wanted it to only work with a subset of via names, then you'd do:

    viasToWorkOn=list("m1m2" "m2m3" "m3m4") ; the names are case-sensitive, so make sure you get them right
    foreach(via geGetEditCellView()~>vias
      when(member(via~>viaHeader~>viaDefName viasToWorkOn)
        abSetViaMinMetalEnclosure(via 0.09)
      )
    )

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Tom Sawyer
    Tom Sawyer over 4 years ago in reply to Andrew Beckett

    Hi Andrew

    Sorry I missed that.

    Typing

    foreach(via geGetEditCellView()~>vias
      abSetViaMinMetalEnclosure(via 0.09)
    )


    on the CIW worked for me.

    Thank you very much for the help!!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Tom Sawyer
    Tom Sawyer over 4 years ago in reply to Andrew Beckett

    Hi Andrew

    Sorry another thing.
    Can you please paste a complete skill script that includes

    viasToWorkOn=list("m1m2" "m2m3" "m3m4") ; the names are case-sensitive, so make sure you get them right
    foreach(via geGetEditCellView()~>vias
      when(member(via~>viaHeader~>viaDefName viasToWorkOn)
        abSetViaMinMetalEnclosure(via 0.09)
      )
    )

    I don't know on what part of the existing skill code should I insert it or on which part I should append.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to Tom Sawyer

    I don't understand what you're asking me. You wouldn't put this in the existing code - it's another example of how to use the abSetViaMinMetalEnclosure if you wanted to use it on a subset of via types. The core function (abSetViaMinMetalEnclosure) only deals with a single via - both the foreach in the comments in the code, and the second example above are just showing you ways you could use that function.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Tom Sawyer
    Tom Sawyer over 4 years ago in reply to Andrew Beckett

    Sorry for the confusion I am a beginner when it comes to this.

    I thought that

    viasToWorkOn=list("m1m2" "m2m3" "m3m4") ; the names are case-sensitive, so make sure you get them right
    foreach(via geGetEditCellView()~>vias
      when(member(via~>viaHeader~>viaDefName viasToWorkOn)
        abSetViaMinMetalEnclosure(via 0.09)
      )
    )

    need to be added on the .il file.

    But upon trial and error, I pasted it on the CIW and It did what was expected.

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to Tom Sawyer

    You can always put it in another file, and load that file - it will then run it. Or you could encapsulate it in a function definition - for example:

    procedure(CCFsetEnclosuresForVias(minEnclosure @optional (viaNames list("m1m2" "m2m3" "m3m4"))
      foreach(via geGetEditCellView()~>vias
        when(member(via~>viaHeader~>viaDefName viaNames)
          abSetViaMinMetalEnclosure(via minEnclosure)
        )
      )
    )

    Then you can load this and just do:

    CCFsetEnclosuresForVias(0.09)

    or

    CCFsetEnclosuresForVias(0.09 list("m2m3" "m3m4" "m4m5"))

    if you want a different set of vias to work on.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • VKkumar
    VKkumar over 4 years ago in reply to Andrew Beckett

    Hi Andrew, i have a doubt similar to the above code  but here  i need to highlight the extra portion of passing metal through Via. as i shown in the below image . . in this case i don't need to change the via enclosures. need to check left and Right sides of the V1 for extra M1.(metal1)  if it's touch V0 or V1  we can ignore. those extra Metal.  Thanks in advance.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to VKkumar
    VKkumar said:
    need to check left and Right sides of the V1 for extra M1.(metal1)  if it's touch V0 or V1  we can ignore. those extra Metal

    That's a completely different requirement that has very little to do with the code above. The requirements aren't that clear to me, but to be honest I'm not going to have the time to help with this in the next week or two anyway. So I suggest that you contact customer support.

    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