• 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. Getting coordinates for pin placement

Stats

  • Locked Locked
  • Replies 15
  • Subscribers 143
  • Views 21274
  • 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

Getting coordinates for pin placement

LongTimeNovice
LongTimeNovice over 10 years ago

Hello, everyone.  I'm trying to examine a pin that's in a layout subcell, and then draw a pin directly over it.  I'm having trouble getting my coordinates in the correct format.  I'm sure of two things: 1) I'm probably making this harder than it needs to be, and 2) I'm probably missing something obvious.  I've pasted the code, and below that is the response from Cadence.

############# Here is my code #############

;GET bBox OF PIN IN TARGET INSTANCE

pBox=car(instTerm~>term~>pins)~>fig~>bBox

;SEPARATE OUT LOWER LEFT COORDINATES

pBoxLL=car(car(pBox))
pBoxFixLL=dbTransformPoint(pBoxLL inst~>transform)

;GET LOWER COORDINATE AND CONVERT TO STRING

pBoxFixLower=car(pBoxFixLL)
sprintf(pBoxFixLower "%L" pBoxFixLower)

;GET LEFT COORDINATE AND CONVERT TO STRING

pBoxFixLeft=cdr(pBoxFixLL)
sprintf(pBoxFixLeft "%L" pBoxFixLeft)
pBoxFixLeft = substring(pBoxFixLeft 2 strlen(pBoxFixLeft)-2)

;MAKE A STRING WITH LOWER AND THEN A COLON AND THEN LEFT

pinCoordsLL=strcat(pBoxFixLower ":" pBoxFixLeft)

;SEPARATE OUT UPPER RIGHT COORDINATES

pBoxUR= cdr(car(pBox))
pBoxUR=car(pBoxUR)
pBoxFixUR=dbTransformPoint(pBoxUR inst~>transform)

;GET UPPER COORDINATE AND CONVERT TO STRING

pBoxFixUpper=car(pBoxFixUR)
sprintf(pBoxFixUpper "%L" pBoxFixUpper)

;GET RIGHT COORDINATE AND CONVERT TO STRING

pBoxFixRight=cdr(pBoxFixUR)
sprintf(pBoxFixRight "%L" pBoxFixRight)
pBoxFixRight = substring(pBoxFixRight 2 strlen(pBoxFixRight)-2)

;MAKE A STRING WITH UPPER AND THEN A COLON AND THEN RIGHT

pinCoordsUR=strcat(pBoxFixUpper ":" pBoxFixRight)

;MAKE STRING WITH UPPER-LEFT COORDS AND LOWER-RIGHT COORDS SEPARATED BY A "/"

pinCoords=strcat(pinCoordsLL "/" pinCoordsUR)

;CONVERT THIS STRING TO A LIST CONTAINING L:L AND U:R

pinCoords = parseString(pinCoords "/")

;PRINT THESE VARIABLES FOR DEBUGGING PURPOSES

printf("  *** pinCoordsLL is %A\n" pinCoordsLL)
printf("  *** PinCoordsUR is %A\n" pinCoordsUR)
printf("  *** PinCoords is %A\n" pinCoords)

;MAKE A PIN USING pinCoords VARIABLE

leCreatePin( cv  pLPP  "rectangle"  pinCoords  pName  "inputOutput"  list("left" "right" "top" "bottom") )

############# This is the response from Cadence starting with the debugging lines and ending with the error #############

*** pinCoordsLL is "11.175:10.315"

*** PinCoordsUR is "11.605:10.745"

*** PinCoords is ("11.175:10.315" "11.605:10.745")

*Error* length: argument must be a list or an array - "11.175:10.315"

<<< Stack Trace >>>

leCreatePin(cv pLPP "rectangle" pinCoords pName ... )

I notice that the PinCoords list, when printed, looks right but has quotes in it.  I wonder if this throwing off my leCreatePin statement.

I'd love to hear your thoughts.

Thank you!

Steven.

  • Cancel
  • LongTimeNovice
    LongTimeNovice over 10 years ago
    Ok, now I see that my previous post appears twice in this thread. I'm sorry for the confusion! If there's a moderator reading this, please feel free to delete one of the duplicated posts. Thank you!
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    Stephen,

    Your code is a little strange - the foreach loop has a loop variable called instTerm, but it's actually going to be a list of pins. That's because:

    instPinList=inst~>instTerms~>term~>pins

    will be a list of lists (one list per inst term, and then an inner list which is one per pin).

    Then your pinFig assignment will start from the list of pins, and for each it will get the terminal and then back to all the pins again. This will be a list of lists of pins, and then when you take the car, it will be a list of pins - and for each you're getting the fig. So you have a list of figs. Then when you get th e bBox, you've got a list of bBoxes, which is your problem.

    I think you want:

    instTermList=inst~>instTerms

    and then:

    foreach(instTerm instTermList

    and then the rest of the code should be OK.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • LongTimeNovice
    LongTimeNovice over 10 years ago
    Hi, Andrew. Thank you! I had found my problem already, and I tried to describe it a few posts above this one, but you did a much better job explaining my issue concisely and clearly. And renaming my variable instPinList to instTermList is a really good improvement that will make my code more understandable in the future. I'll make that change in my script. Thank you!
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    LongTimeNovice said:
    Ok, now I see that my previous post appears twice in this thread. I'm sorry for the confusion! If there's a moderator reading this, please feel free to delete one of the duplicated posts. Thank you!

    All your posts were being moderated (not sure why) - I think I've addressed that (I'm the moderator). So I was having to approve each one.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • LongTimeNovice
    LongTimeNovice over 10 years ago
    Thank you, Andrew. Yes, they had never been moderated in the past. Thank you for fixing that. Have a great day.
    • 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