• 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 Design
  3. Schematic terminals location and position for automated...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 125
  • Views 14466
  • 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

Schematic terminals location and position for automated routing.

KishanVNs
KishanVNs over 15 years ago

Hi,

 I am trying to create a testchip schematic from a inputfile. But i am facing a small problem.

i.e when i am trying to find the loaction of the terminals whether they are  top , bottom, left , right .. some times it is working . but some times it is giving nil. which i don't understand at all. Instead of beating around the bush i am trying to find an alternate solution.

 Here is the sample code that i am trying to creat for a single instance.

 /**

SchConnectivity("Marvel8_testchips" "SingleCell" "padlib_m6p50derclrev18" "PGB_CSEA_CMGPxA_DxAA_BxL")

**/

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Procedure 1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure( SchConnectivity(templibName tempcellName sourcelibName sourcecellName "tt")
  let( (masterId x y cvId instTermBbox instTermBboxInCv
        instTermLLX instTermLLY instTermURX instTermURY
        wireOriginX wireOriginY wireSpace wireWidth wireLength
        deltaX deltaY wireLabel wireOrientation wireJustification
        wireEndX wireEndY termWire Loc_x Loc_y Inst_num  cells  direction
        accessdirection 
  )

;; Opening the Created Cell View ;;

cvSinglecell = dbOpenCellViewByType(templibName tempcellName "schematic" "" "a")
geOpen(    ?lib   "Marvel8_testchips"
        ?cell  "SingleCell"
        ?view  "schematic"
        ?mode  "a"
        )

/*************************************************************************
; symbolId = dbOpenCellViewByType( "ifxbasic" "c_term" "symbol" "" 'r )
; instId = schCreateInst( cvSinglecell  symbolId "I23" -10:5 "R0" )
*************************************************************************/

;; Deleting all the content in the present Cell View
schSelectAllFig( cvSinglecell )
schHiDelete()

Loc_x = 0
Loc_y = 0

cells = 1000
Inst_num = sprintf(nil "IN%d" cells)
symbolId2 = dbOpenCellViewByType( sourcelibName sourcecellName "symbol" "" 'r )
instId2 = schCreateInst( cvSinglecell  symbolId2  Inst_num   Loc_x:Loc_y "R0" )
dbClose(symbolId2)
dbSave(cvSinglecell)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    x=1
    y=1
    wireSpace=0.0625
    wireWidth=0
    wireLength=0.6
    cterm_num = 0

Instance_BBox = cvSinglecell~>instances~>bBox
println(Instance_BBox )
foreach( inst cvSinglecell~>instances
      printf( "Instance : %s\n" inst~>name )
      ; Print all the Instance terminals for each instance found
      ; in the CV.
      foreach( instTerm inst~>instTerms
          ; For each instance terminal, i.e D-S-B-G, get the bbox
          ; of the  terminal's little square then use dbTransformBBox
          ; to transform the pin bbox to the cellview
          instTermBbox=car(instTerm~>term~>pins~>fig~>bBox)
          instTermBboxInCv=dbTransformBBox(instTermBbox
                           inst~>transform)
          printf( " Instance Terminal= %s : absBbox=%L :
                  relBbox=%L\n" instTerm~>name
          instTermBbox instTermBboxInCv)
          ; get the X/Y coordinates from the BBOX
          instTermLLX=xCoord(lowerLeft(instTermBboxInCv))
          instTermLLY=yCoord(lowerLeft(instTermBboxInCv))
          instTermURX=xCoord(upperRight(instTermBboxInCv))
          instTermURY=yCoord(upperRight(instTermBboxInCv))
          wireOriginX=(instTermLLX+instTermURX)/2
          wireOriginY=(instTermLLY+instTermURY)/2
       
    ;; Reading the lable

direction =    instTerm~>term~>pins~>accessDir
    accessdirection = caar(direction)
     println(accessdirection)

        case(lowerCase(accessdirection)
            ("top"
              deltaX=0
              deltaY=wireLength
              wireLabel="Drain"
              wireOrientation="R270"
              wireJustification="lowerRight"
            )
            ("bottom"
              deltaX=0
              deltaY=-wireLength
              wireLabel="Source"
              wireOrientation="R90"
              wireJustification="lowerLeft"
            )
            ("right"
              deltaX=wireLength
              deltaY=0
              wireLabel="Bulk"
              wireOrientation="R180"
              wireJustification="lowerRight"
            )
            ("left"
              deltaX=-wireLength
              deltaY=0
              wireLabel="Gate"
              wireOrientation="R0"
              wireJustification="lowerLeft"
            )
            ("nil"
              printf("cannot access direction !!! \n")
            )
          )

        wireEndX=wireOriginX+deltaX
        wireEndY=wireOriginY+deltaY

        ; Create the wire
          termWire=schCreateWire(cvSinglecell "draw" "full"
          list(wireOriginX:wireOriginY wireEndX:wireEndY)
          wireSpace wireSpace wireWidth)
        ; Create the Label
        schCreateWireLabel(cvSinglecell car(termWire)
                             wireEndX:wireEndY wireLabel
                              wireJustification wireOrientation
                              "fixed"  wireSpace nil)

        ; Create the c_term
        cterm_num = cterm_num  +1
        ctermInst_num = sprintf(nil "IN%d" cterm_num)
        ctermid = dbOpenCellViewByType( "ifxbasic" "c_term" "symbol" "" 'r )
        ctermID2 = schCreateInst( cvSinglecell  ctermid   ctermInst_num  wireEndX:wireEndY wireOrientation )
        dbClose(ctermid)

       
        ) ; foreach
    ) ; foreach

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
dbSave(cvSinglecell)
dbClose(cvSinglecell)
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; END OF Procedure 1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 

 If you see the above script ther is a line

 

direction =    instTerm~>term~>pins~>accessDir

 

from where i get which side the terminal is located.

But it doesn't work for every thing. Please let me know if you know any other way.

 

With Regards

Kishan VNs

  • Cancel
Parents
  • vijay_arm
    vijay_arm over 9 years ago
    Please note there is a typo in the above script, which can result in false returns.

    (list (yCoord (upperRight bBox)) (yCoord xy) 'top)

    thanks
    Vijay
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • vijay_arm
    vijay_arm over 9 years ago
    Please note there is a typo in the above script, which can result in false returns.

    (list (yCoord (upperRight bBox)) (yCoord xy) 'top)

    thanks
    Vijay
    • 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