• 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. skill script to add layout pin for given metal intersec...

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 144
  • Views 18231
  • 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

skill script to add layout pin for given metal intersect

GDCRA
GDCRA over 6 years ago

Hi,

Lets say I have metal 9 and metal 10 intersecting each other. I want to add layout pin at all the location where these 2 metal intersect. Pin name should be same as metal 9 label.

Is there simple script that can do the job ?

Thanks

GC

  • Cancel
Parents
  • psill000
    psill000 over 6 years ago

    There's a lot question of the environment and results:

    Are the metals at cellview or in hierarchy?

    Is there connectivity on the wires, labels or something else?

    Is there more than one intersection?

    Maybe the quickest way to solve the problem would be to use leHiMarkNet.

    Then save the markNet of the two nets and do a Boolean on the intersections.

    Paul

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • GDCRA
    GDCRA over 6 years ago in reply to psill000

    Hi Paul,

    Metal are at cellview.  There is connectivity on wires. 

    There are more than one intersection.

     leHiMarkNet may not work since I expect atleast 5-6 thousand intersection point. Its massive layout.

    --

    GC

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to GDCRA

    I'd probably use dbLayerAnd or maybe abeLayerAnd if you need the capacity - this would find the overlapping regions of metal9 and metal10 and end up with a set of candidate pin shapes (presumably on metal9 - you didn't say). You could then iterate over the list of shapes and for each use dbShapeQuery to find the shape on metal9 underneath the rectangles you've created. Then use dbCreatePin using the ~>net of that shape and the rectangle you've found from the dbLayerAnd operation as the pin figure.

    Seems a bit of an odd requirement though - presumably you'd end up with a lot of pins which might not be terribly accessible - but maybe I can't visualise what your layout looks like. It's unlikely to be anything that is a standard feature because it sounds rather specific to how your  layout is constructed.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • psill000
    psill000 over 6 years ago in reply to GDCRA

    More questions or possible ways to get a solution.

    Are you looking for help on writing or something already written?

    Is there more than two layers involved?

    You could do a search for the two layers with the nets you want copyFig to a tmp layer and do a Boolean on the intersections to output your pin locations

    dbCreatePin from the Boolean nad delete the tmp shapes.

    Paul

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • GDCRA
    GDCRA over 6 years ago in reply to Andrew Beckett

    Hi Andrew, I could scramble only upto following code. I am having difficulty to iterate over list of shapes. If its fairy quick, do you mind giving me actual code ?.

    Here is what I could write

    M8 = abeLayerFromCellView( "M8" ?purpose "drawing" )
    M9 = abeLayerFromCellView( "M9" ?purpose "drawing" )
    OverlapLayer= abeNewLayer()
    abeLayerAnd( M8 M9 OverlapLayer )

    I am struggling with dbShapeQuery and beyond logic.

    Thanks

    GC

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • psill000
    psill000 over 6 years ago in reply to GDCRA

    Here's something to get you started. Disclaimer dont know env and I did some simple tests of the functionality of the script.

    Edit the script to your application.

    How to:

    set the layers you want to pin be visible

    load the file and and drop the command in the CIW

    command example: genPin("baam" "booyaa" '("M3" "pin") "M3M4" '("M3" "label") )

    ------------------------------skill script-----------------------------------------------------

    procedure(genPin(net1 net2 pinLpp pinNet labLpp)
    when(getMode()
             genPinExe(net1 net2 pinLpp pinNet labLpp))
    )

    procedure(getMode()
    let(((bool t))
    if(equal(geGetEditCellView()~>mode "r") then
             printf("Cell is in read only mode.\n")
             bool = nil)
    bool
    ))

    procedure(genPinExe(net1 net2 pinLpp pinNet labLpp)
    let( (netDb tmp delTmpList labDb
             (tmpLp0 '("y0" "drawing"))
             (tmpLp1 '("y1" "drawing"))
             (cv geGetEditCellView()))

    netDb = dbFindNetByName(cv pinNet)
    unless(netDb netDb = dbCreateNet(cv pinNet))

    foreach(shp setof(s cv~>shapes leIsLayerVisible(s~>lpp))
             cond( (equal(shp~>net~>name net1)
                               tmp = dbCopyFig(shp cv)
                               tmp~>lpp = tmpLp0
                               delTmpList = cons(tmp delTmpList))
                      (equal(shp~>net~>name net2)
                               tmp = dbCopyFig(shp cv)
                               tmp~>lpp = tmpLp1
                               delTmpList = cons(tmp delTmpList))
                               )
                      )

    foreach(pin leLayerAnd(cv tmpLp0 tmpLp1 pinLpp)
             dbCreatePin(netDb pin)
             labDb = dbCreateLabel(cv labLpp centerBox(pin~>bBox) pinNet "centerCenter" "R0" "stick" 0.015)
             leAttachFig(labDb pin))

    foreach(tmp delTmpList dbDeleteObject(tmp))
    t
    ); end of let
    ); end of genPinExe

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to GDCRA

    Something like this. My technology had layers called Metal8 and Metal9 (and I put the pins on Metal7 for visibility, with the connectivity info coming from the Metal8 shapes).

    Using dbLayerAnd would have been slightly easier, because then you'd get a list of the pin shapes directly which you could iterate over using foreach - but it's a good example of the abe functions nevertheless:

    cv=geGetEditCellView()
    abeInit(cv)
    M8LayerName="Metal8"
    M9LayerName="Metal9"
    pinLayerName="Metal7"
    M8 = abeLayerFromCellView(M8LayerName ?purpose "drawing" )
    M9 = abeLayerFromCellView(M9LayerName ?purpose "drawing" )
    OverlapLayer= abeNewLayer()
    abeLayerAnd( M8 M9 OverlapLayer )
    ;; could use abeLayerToCellView to generate real shapes
    ;; but since we don't know what was produced unless
    ;; we write to an empty layer, perhaps should just iterate
    iter=abeIslandIterator(OverlapLayer)
    while(polygon=iter->next
        pinFig=dbCreatePolygon(cv pinLayerName polygon)
        underneath=dbShapeQuery(cv M8LayerName pinFig~>bBox 0 0)
        ; find the net info from any M8 shapes under the pin which 
        ; have a net attribute
        net=car(exists(shape underneath shape~>net))~>net
        ; if found, convert the pin figure to a pin
        when(net
    	dbCreatePin(net pinFig)
        )
    )
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • GDCRA
    GDCRA over 6 years ago in reply to Andrew Beckett

    Thank you Paul and Andrew. Both code are working like charm if my metal are in top most cell of hierarchy. What if some of metals are down in hierarchy ? Can we modify script to travel through hierarchy ? 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • psill000
    psill000 over 6 years ago in reply to GDCRA

    Its a little more work to go through the hierarchy to trace a net. If you dont have a trace script you might want to try the markNet functions and save the trace to a alternate view. Then you can do the Boolean from the scripts above. After the Boolean move the shapes to your cellview and create the pins.

    If you have a cadence account you can go Cadences script library and search from there sources. 

    I think this is the link to Cadences script library. Its a good resource of skill examples to get you started.

    https://support.cadence.com/

    Paul

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to GDCRA

    The abe functions will by default find all shapes throughout the hierarchy - there are several ways to limit this (including the ?depth argument to abeInit). If the shape with the connectivity information isn't at the top level, then you might need to increase the last argument to dbShapeQuery to increase the depth that it's looking (in my code it is 0, so only looking at the top level shapes).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to GDCRA

    The abe functions will by default find all shapes throughout the hierarchy - there are several ways to limit this (including the ?depth argument to abeInit). If the shape with the connectivity information isn't at the top level, then you might need to increase the last argument to dbShapeQuery to increase the depth that it's looking (in my code it is 0, so only looking at the top level shapes).

    Regards,

    Andrew.

    • 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