• 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 for finding the pin which is not in the pitc...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 13306
  • 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 for finding the pin which is not in the pitch

vbhuma
vbhuma over 7 years ago

Hi,

I have bunch of pins in the layout and suppose to be in the pitch, I have written skill code for finding the pin which is not in the pitch. My code is not working and  I have observed that " if " function is problem in below code, I have seen that  few pins are selecting( geSelectFigs(pin) is used inside if  function)  in the layout  even if condition is not satisfied. 

Could anyone help me on finding the problem in below code. 

procedure(flatten( numberlist )
foreach( mapcan element numberlist
element
) ; foreach
) ; procedure

procedure(trMakeSublists( numberlist )
foreach( mapcar element numberlist
list( element )
) ; foreach
) ; procedure

procedure( findPinPitch()
let( (cv allPins count )

cv=geGetWindowCellView()
allPins=setof(x cv~>shapes x~>pin)
bBoxList=allPins~>bBox
inputlist=foreach( mapcar bBox bBoxList
xCoord( lowerLeft( bBox )))

orderlist=sortcar( trMakeSublists( inputlist ) 'lessp)
new_list=flatten( orderlist )
k=length(new_list)
pitch=0.456
i=1
m=k-2
count=0
for(j 0 m

a=(nth(i new_list)-nth(j new_list))


if( a != pitch then

pin=setof(sh cv~>shapes sh~>objType=="rect" && cadr(sh~>lpp)=="pin" && xCoord(car(sh~>bBox))==nth(i new_list))
geSelectFigs(pin)
printf("\n Isolated %L pin with net %s found at %L\n" car(pin~>lpp) car(pin~>net~>name) car(pin~>bBox))
count++


); end if
i=i+1

); end for
printf("\n %n isolated pin(s) selected in cell %s\n" count cv~>cellName)
) ;let
) ;procedure

  • Cancel
Parents
  • mbracht
    mbracht over 7 years ago

    Hi,

    I have had just a quick look at your code - one potential error is that you compare floating point numbers with '==':
    xCoord(car(sh~>bBox))==nth(i new_list)
    ...which might not do what you expect because floating point numbers are just approximations of their decimal equivalents. A safe way to compare floating point numbers is to turn them into strings:
    (sprintf nil "%4.2f" xCoord(car(sh~>bBox))) == (sprintf nil "%4.2f" nth(i new_list))

    On a different note - your way to get a sorted  list of the lower left x--coords of the pins is a little convoluted...how about that one:
    (sort
        (foreach mapcar x
            setof(x cv~>shapes x~>pin) (caar x~>bBox))
    'lessp)

    Max

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • mbracht
    mbracht over 7 years ago

    Hi,

    I have had just a quick look at your code - one potential error is that you compare floating point numbers with '==':
    xCoord(car(sh~>bBox))==nth(i new_list)
    ...which might not do what you expect because floating point numbers are just approximations of their decimal equivalents. A safe way to compare floating point numbers is to turn them into strings:
    (sprintf nil "%4.2f" xCoord(car(sh~>bBox))) == (sprintf nil "%4.2f" nth(i new_list))

    On a different note - your way to get a sorted  list of the lower left x--coords of the pins is a little convoluted...how about that one:
    (sort
        (foreach mapcar x
            setof(x cv~>shapes x~>pin) (caar x~>bBox))
    'lessp)

    Max

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • vbhuma
    vbhuma over 7 years ago in reply to mbracht

    Thank you  Max. It's working now. 

    • 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