• 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. newbie SKILL question: how to create a via

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 145
  • Views 18403
  • 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

newbie SKILL question: how to create a via

chrisgregg
chrisgregg over 16 years ago
Hi everybody-- I'm writing some SKILL code to layout an adder. I need to place some vias to go from a metal 2 layer to a metal 1 layer, but I can't figure out how to do this. In the interactive layout, I'd just click Create-->Via (I'm using Cadence 6.1), and select VIA12_A and the other parameters, and then click where I want the via. But, looking through the Cadence docs, I can't seem to figure out how to do this with code. I found the "dbCreateVia" function, but it needs "d_viaDefId" for the second parameter, which I can't seem to get without first placing another via by hand and using the dbFindViaHeaderByName(cvid "VIA12_A") function. I'd like to do this without having to have that extra via to begin with. Thanks! -Chris
  • Cancel
  • Andrew Beckett
    Andrew Beckett over 16 years ago

    You need to use:

    tf=techGetTechFile(cvId) viaDef=techFindViaDefByName(tf "M3_M2") dbCreateVia(cvId viaDef 10:20 "R0") ; could also pass parameterList

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • chrisgregg
    chrisgregg over 16 years ago
    Great -- thank you! -Chris
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • blankman
    blankman over 13 years ago

    Andrew, this has been very helpful, thank you.

    I am using the code below, and am seeing that even when the cellview is not editable it still places the via. Is there a workaround for this so that it only places it during edit mode?

    hiSetBindKey("Layout" "Shift<key>1" "dbCreateVia(geGetEditCellView() techFindViaDefByName(techGetTechFile(geGetEditCellView()) \"met3_met2_b\") geWindowToEditPoint(hiGetCurrentWindow() hiGetPoint(hiGetCurrentWindow())) \"R0\" list( list(\"cutRows\" 1) list(\"cutColumns\" 2) list(\"cutSpacing\" list(0.26 0.26)) list(\"layer1Enc\" list(0.06 0.06)) list(\"layer2Enc\" list(0.06 0.06)) list(\"cutWidth\" 0.26) list(\"cutHeight\" 0.26) list(\"originOffset\" list(0 0)))")

     

    Also, I am hoping to add this to a script along with bindkeys for IC5, and have the code select which function to assign based on what version of Cadence im running.

    eg if(cadence5 -> use ...leCreateContact

          if(cadence6 -> use ...dbCreateVia

    Is there a way this can be implemented? ie a way the code can identify the Cadence version?

    Thanks/Rgds,

    Brian.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

     You could use geGetEditCellView()~>mode to determine whether in "r" mode or not. In OpenAccess, you're allowed to modify readonly cellViews - this is akin to "s" mode (scratch mode) in CDB - but the normal editing commands in the editor are disabled to avoid you accidentally changing things - but the low level functions still allow it.

    And to determine whether to use dbCreateVia - you could use dbGetDatabaseType() - this returns "OpenAccess" or "CDBA" (a misnomer, it should really return "CDB", but hey, we can't be perfect).

    Then you could do:

    if(dbGetDatabaseType()=="OpenAccess" then dbCreateVia(...) else leCreateContact(...))

    etc.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • TeeBro
    TeeBro over 13 years ago

     Since I have more than one bindkey that changes between OA and CDB I have two bindkey sets.  I have some code in my

    .cdsinit that tests the database type and loads the appropriate set when I start. This may be helpful for you as well.

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Define bind keys for Layout, Schematic and Symbol editors

    if( (dbGetDatabaseType()=="CDBA")
       then
          printf( "Defining bind keys for schematic editor.\n" )
          loadi( "~/skill/schBindKeys.il" )
          printf( "Defining bindkeys for layout editor.\n" )
          loadi("~/skill/leBindKeys.il")
       else
          printf( "Defining bindkeys for OA schematic editor.\n" )
          loadi( "~/skill/schBindKeys_OA.il" )
          printf( "Defining bindkeys for OA layout editor.\n" )
          loadi( "~/skill/leBindKeys_OA.il")

    ); end if
     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • blankman
    blankman over 13 years ago

    Works perfectly Andrew, Thanks!

    • 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