• 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. how to get the orientation of the terminal in "symbol"

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 144
  • Views 3896
  • 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

how to get the orientation of the terminal in "symbol"

Derek WANG
Derek WANG over 10 years ago

Hi All.

I'd like to get the orientation of the terminal for the "symbol" view in the cadence.

Suppose I get the cellview ID by

cv = dbOpenCellViewByType(libId~>name cellId~>name "symbol" "" "a")

and then get the first terminal by

term = car( cv~>terminals )

and how can I find the orientation for the terminal "term", or the orientation of its corresponding shape of the pin.

Thanks in advance.

Best Regards

Yi

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    Yi,

    Terminals are a logical rather than physical object, so they don't have an orientation. The associated pins can be found by looking at term~>pins and for each pin you can find the pin figures by looking at pin~>figs (in IC5141 there could only be one, so it would be pin~>fig). Even in IC61X, a symbol will only ever have one pin figure (there can be multiple pins though).

    For symbols, these pin figures are nearly always shapes (e.g. a rectangle or ellipse (circle)), and shapes do not have an orientation.

    So I'm not really sure what you're trying to find here and why you need that. Perhaps if  you explain your motivation, then I could suggest a different approach?

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Derek WANG
    Derek WANG over 10 years ago

    Hi Andrew

    Thank you for your reply

    The motivation of the question is from the script I have written to add the "cdsTerm" into a existing "symbol".

    Although there is procedure in the cadence we can add the "cdsTerm" while creating the "symbol" from "schematic", not every designer inside the company follow such procedure. Then it ends up that there are a lot of "symbols" do not have "cdsTerm" for every pin (terminal).

    my script is to add the "cdsTerm" to each pin, when the "symbol" is already there.

    The "cdsTerm" is added based on an assumption that "input pin" is on the left side of the block, "output pin" is on the right side of the block, and "inout pin" is on the top/bottom side of the block. So after running the script, the "cdsTerm" should be added like this, take input pin for example.

     the "cdsTerm" is always at the left side of the input pin.

      unfortunately, such assumption is not sure, as some designers do put the pins in the location they want, and do not care about the pin type.

    so, we have the user case like this:

    the "cdsTerm" are overlapped on each other.

    I thought it's caused by the orientation of the pins (terminals), and I did not include such info into the script.

    So, I was thinking, if I can get the orientation of the pins (terminals), then I can use this information to put the "cdsTerm" at the right place with right orientation.

    above is my motivation to search for the orientation of the pins(terminals), hope you can help me to find an alternative.

    Best Regards


    Yi

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ebecheto
    ebecheto over 10 years ago

    I have done a little script that gives you the orientation of a point XY concidering the potition of the bounding box (in that case : the bBox of your symbol).


    Hope it helps,

    defun( angleSectionr (XY @optional (teta acos(-1)/2)) ;<= marche aussi
    let((phi X Y pi Xr Yr) X=car(XY) Y=cadr(XY) pi=acos(-1)
    ;; printf("[angleSectionr]%L\n" list(XY X==0))
    phi=cond(
    (X==0 if(Y<0 -pi/2  pi/2))
    (X<0 if(Y<0 atan(Y/X)-pi atan(Y/X)+pi))
    (t atan(Y/X) ))
    ;; printf("phi:teta = %L\n" phi:teta)
    ;; printf("phi:teta = %L[deg]\n" list(phi/pi*180 teta/pi*180))
    cond(
    (teta-pi<=phi&&phi<-teta 0)
    (-teta<=phi&&phi<teta 1)
    (teta<=phi&&phi<pi-teta 2)
    (t 3)
    )))
    
    ;; phi se retrouve entre -pi et +pi
    ;; \ 2 2/
    ;;  \  /
    ;; 3 \/ 1
    ;; 3 /\ 1
    ;;  /  \
    ;; / 0 0\
    
    ; angleSection(x:y atan(cadadr(bBox)/cadar(bBox)))
    
    defun( angleBox (XY bBox) let((X0 Y0 X1 Y1 teta)
    X0 = caar(bBox)     
    Y0 = cadar(bBox) 
    X1 = caadr(bBox)     
    Y1 = cadadr(bBox)
    teta=atan((Y1-Y0)/abs(X1-X0))
    ;printf("xy%L centr%L teta%L\n" XY centerBox(bBox) teta/acos(-1)*180)
    ;; angleSection(rodSubPoints(XY centerBox(bBox)) teta)
    angleSectionr(rodSubPoints(XY centerBox(bBox)) teta)
    ))
    
    ;; angleBox('())
    ;; angleBox(0:0 '((0.0 -1.125) (0.5 0.0)))
    ;; angleBox(0.5:-1.125 '((0.0 -1.125) (0.5 0.0)))
    

    ____

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Joseph Aziz
    Joseph Aziz over 10 years ago
    I'm actually interested in knowing this too. How does one know what the orientation of pin is? or more accurately, the orientation of the terminal label (if it exists)? -j
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    If you're trying to find the orientation of the labels, then if the labels are "attached" to the pin figure, you can do this:

    cv=geGetEditCellView() ; or whatever you need to get hold of the symbol cellView
    term=dbFindTermByName(cv "VSS") ; I'm looking for a terminal called VSS
    foreach(pin term~>pins
      foreach(fig pin~>figs  ; typically only 1 figure per pin
        foreach(child fig~>children
          when(child~>objType=="label"
            printf("Label %L has orientation %s\n" child~>theLabel child~>orient)
          )
        )
      )
    )

    So for example, one symbol I tried this on:

    Label "VSS" has orientation R270
    Label "cdsTerm(\"VSS\")" has orientation R0

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Joseph Aziz
    Joseph Aziz over 10 years ago
    Thanks Andrew!! My mistake was assuming that the label was a child of the pin than the pin figure.
    • 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