• 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. Help on skill code to add PIN information

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 14883
  • 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

Help on skill code to add PIN information

narendra046
narendra046 over 13 years ago

Hi Friends,

         I have a library with many digital cells(like AND, OR,...etc). Every cell had a met1(tt) label with port name to define PIN inforamation & to pass LVS. But I need to add a MET1 PIN at wherever met1(tt) layer exists for every digital cell of library by automation.

So, Plz help on skill code to do this.

Regards,

Narendra

  • Cancel
Parents
  • dmay
    dmay over 13 years ago

    If you have a top cell with all of your digital cells placed in it (maybe for verification purposes), you can use leHiCreatePinsFromLabels(). This has an option to convert labels to pins in all the selected instances or can be used one cell at a time.

    If you need to loop through all the cells in the library with a script, you can use some code like this to get you started:

    procedure(myLabelsToPins(@optional (cv geGetEditCellView()))
      let((pin disp)
        foreach(lbl setof(x cv~>shapes x~>objType=="label")
            pin=leCreatePin(cv lbl~>lpp "rectangle" myMakeBox(lbl~>xy 0.5) lbl~>theLabel "inputOutput" list("top" "bottom" "left" "right"))
            ;The next two commands are optional
            ;You can create a textDisplay attached to the pin and delete the label
            ;or you can simply keep the label
            disp=dbCreateTextDisplay(
                pin~>term
                pin~>term
                list("text" "drawing")
                list("justify" "orient")
                lbl~>xy
                "centerCenter"
                lbl~>orient
                lbl~>font
                lbl~>height
                lbl~>isDrafted
                lbl~>isOverbar
                t   ;isVisible
                nil ;isNameVisible
                t   ;isValueVisible
                "name"
            )
            dbDeleteObject(lbl)
        )
      ) ;let
    ) ;proc

    procedure(myMakeBox(ref_pt amount)
        list(xCoord(ref_pt)-amount:yCoord(ref_pt)-amount
             xCoord(ref_pt)+amount:yCoord(ref_pt)+amount
        )
    )

    procedure(myLabelsToPinsInLibrary(libName)
      let((lib cv)
        lib=ddGetObj(libName)
        foreach(cell lib~>cells
            when(ddGetObj(libName cell~>name "layout")
                cv = dbOpenCellViewByType(libName cell~>name "layout" "maskLayout" "a")
                myLabelsToPins(cv)
                dbSave(cv)
                dbReopen(cv "r")
            )
        )
      ) ;let
    ) ;proc

    You'll need to run this with your library name as the string:

    myLabelsToPinsInLibrary("libName")

    This creates all pins as "inputOutput" which may not be what you want. It shouldn't matter for LVS, but might for some routing tools. Also, the pin is created 1.0 micron wide. You'll want to adjust this according to your metal width. It also assumes that the pin layer will be the same as the label layer. If this is not the case, you'll need to provide your pin layer to the leCreatePin function as the second argument. Something like list("metal1" "pin"). The pin rectangle is centered on the label. Hopefully the labels are centered on the metals. You should probably try running myLabelsToPins() on one cellview until you get the result you want, then run it on the entire library.

    Derek

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • dmay
    dmay over 13 years ago

    If you have a top cell with all of your digital cells placed in it (maybe for verification purposes), you can use leHiCreatePinsFromLabels(). This has an option to convert labels to pins in all the selected instances or can be used one cell at a time.

    If you need to loop through all the cells in the library with a script, you can use some code like this to get you started:

    procedure(myLabelsToPins(@optional (cv geGetEditCellView()))
      let((pin disp)
        foreach(lbl setof(x cv~>shapes x~>objType=="label")
            pin=leCreatePin(cv lbl~>lpp "rectangle" myMakeBox(lbl~>xy 0.5) lbl~>theLabel "inputOutput" list("top" "bottom" "left" "right"))
            ;The next two commands are optional
            ;You can create a textDisplay attached to the pin and delete the label
            ;or you can simply keep the label
            disp=dbCreateTextDisplay(
                pin~>term
                pin~>term
                list("text" "drawing")
                list("justify" "orient")
                lbl~>xy
                "centerCenter"
                lbl~>orient
                lbl~>font
                lbl~>height
                lbl~>isDrafted
                lbl~>isOverbar
                t   ;isVisible
                nil ;isNameVisible
                t   ;isValueVisible
                "name"
            )
            dbDeleteObject(lbl)
        )
      ) ;let
    ) ;proc

    procedure(myMakeBox(ref_pt amount)
        list(xCoord(ref_pt)-amount:yCoord(ref_pt)-amount
             xCoord(ref_pt)+amount:yCoord(ref_pt)+amount
        )
    )

    procedure(myLabelsToPinsInLibrary(libName)
      let((lib cv)
        lib=ddGetObj(libName)
        foreach(cell lib~>cells
            when(ddGetObj(libName cell~>name "layout")
                cv = dbOpenCellViewByType(libName cell~>name "layout" "maskLayout" "a")
                myLabelsToPins(cv)
                dbSave(cv)
                dbReopen(cv "r")
            )
        )
      ) ;let
    ) ;proc

    You'll need to run this with your library name as the string:

    myLabelsToPinsInLibrary("libName")

    This creates all pins as "inputOutput" which may not be what you want. It shouldn't matter for LVS, but might for some routing tools. Also, the pin is created 1.0 micron wide. You'll want to adjust this according to your metal width. It also assumes that the pin layer will be the same as the label layer. If this is not the case, you'll need to provide your pin layer to the leCreatePin function as the second argument. Something like list("metal1" "pin"). The pin rectangle is centered on the label. Hopefully the labels are centered on the metals. You should probably try running myLabelsToPins() on one cellview until you get the result you want, then run it on the entire library.

    Derek

     

    • 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