• 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 3897
  • 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
Parents
  • 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
Reply
  • 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
Children
No Data

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