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
↧