• 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. pin placement script with softMacro

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 144
  • Views 14029
  • 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

pin placement script with softMacro

19Martin84
19Martin84 over 7 years ago

Hi all,

I have a script that does some automatic pin placement for me on very "lowlevel" contraints. It works with XL connectivity if there is a subblock where toplevel pins are bound to.

This works pretty fine and does a great job. Now I would like to do it vice versa. E.g. I have a digital part as "blackbox" with just pins inside. I would like to align those pins to one hierarchy above.

Upfront, I know there is the PinPlacer and the Align commands available, but I do not always get exactly what I want or simply some unexplainable pin placement happens (even though we have VCAD support onsite we did not manage to get it as we want it to be).

My approach so far:

I have changed my subblock (digital part) to a softMacro celltype. Now I see the connectivity one hierarchy above and I can access the pins from analog top level. But how do I access those pins via skill and how do I get the location from toplevel to move the pins inside digital hierarchy to a proper place?

Here is my script I'm using so far (majority is derived from this forum):

procedure(MovePins()
  let((cv term pinFig net instTerm childTerm childPinFig childPinLayer location pinFigLocation transform pinFig)
    cv=geGetEditCellView()
    if(cv~>cellViewType == "maskLayout" then
    selectedElements = flatten(geGetObjectSelectedSet(cv))
      foreach(term selectedElements
        when(term~>pin ;check if element is a pin
      ; iterate over all the pins for this terminal
      pinFig=term~>pin~>fig
      net=term~>net
      ; only do this if there aren't more than one inst term
      instTerm=car(net~>instTerms)
      childTerm=instTerm~>term
      childPinFig=car(instTerm~>term~>pins)~>fig
      childPinLayer=car(instTerm~>term~>pins)~>fig~>layerName
      ; location within the instance master
      location=centerBox(childPinFig~>bBox)
      ; transform to the top level coordinate system
      if( instTerm~>inst~>transform != nil && location != nil then  
            location=dbTransformPoint(location instTerm~>inst~>transform)
            pinFigLocation=centerBox(pinFig~>bBox)
            ; calculate the overall transform to move the pin to the new location
            ;transform=dbConcatTransform(list(-xCoord(pinFigLocation):-yCoord(pinFigLocation) "R0" 1) location)
            transform=dbConcatTransform(list(-xCoord(pinFigLocation):-yCoord(pinFigLocation) "R0" 1) list(xCoord(location):yCoord(location) "R0" 1))

            locationLowerLeft=dbTransformPoint(car(childPinFig~>bBox) instTerm~>inst~>transform)     ;calculate pinsize and transform coordinates
            locationUpperRight=dbTransformPoint(cadr(childPinFig~>bBox) instTerm~>inst~>transform)    ;calculate pinsize and transform coordinates

        dbMoveFig(pinFig cv transform)
            pinFig~>layerName=childPinLayer
        pinFig~>bBox=list(locationLowerLeft locationUpperRight)
      else
            warn("%L is unbound (no connectivity to other cells)\n" term~>pin~>name)
      ) ;** if
        ) ;** when
      ) ;** foreach
    else
      warn("MovePins does only work on layout views of type \"maskLayout\"\n")
    ) ;**ifelse
  ) ;**let
) ;**procedure

;FLATTEN A NESTED LIST
procedure(flatten(numberList)
  foreach(mapcan element numberList
    if( listp( element )
      flatten(copy(element)) ;; then
      ncons(element)
    ) ; if
  ) ; foreach
) ; procedure

Thanks in advance,

Martin

  • Cancel
  • huqy
    huqy over 4 years ago

    Any body can help on this?  I face the same probelm. thanks

    • 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