SKILL help! How to get all the shapes of one kind from a Layout View?

Discussion in 'Cadence' started by liudin, Aug 20, 2005.

  1. liudin

    liudin Guest

    I'm trying to get all the shapes of one kind from a layout view, such as all
    the shapes of "Diffusion". Is there any function can do this?

    Thanks

    liudin
     
    liudin, Aug 20, 2005
    #1
  2. Try this

    cv=geGetEditCellViews
    foreach(shape cv~>shapes
    if((shape~>layername == "Diffusion")
    then
    ; Here shape is Diffusion :)

    )
    )


    rds
     
    Guenther Sohler, Aug 21, 2005
    #2
  3. liudin

    fogh Guest

    function setof()
     
    fogh, Aug 22, 2005
    #3
  4. liudin

    redhavoc Guest

    The code work, but you are using pCells and want to count diffusion in
    the pcells too (I assume you do), then you have to flatten the whole
    design first (unless there is a better idea, like searching through
    each pcell for the specific layer)
     
    redhavoc, Aug 23, 2005
    #4
  5. liudin

    tattvamasi Guest

    One can ( without flattening a pcell) get to its contents ( shapes) by
    using inst~>master~>shapes and do target matching.

    where inst = selected pcell

    Partha
     
    tattvamasi, Aug 25, 2005
    #5
  6. liudin

    S. Badel Guest

    doesn't leSearchHierarchy() search into pcells ?
     
    S. Badel, Aug 25, 2005
    #6
  7. Better would be to find the right layer purpose pair first, and then
    get the shapes from that:

    lpp=car(exists(LP cv~>lpps LP~>layerName=="Diffusion" &&
    LP~>purpose=="drawing"))
    lpp~>shapes

    If there are a large number of shapes in a layout, there will typically be fewer
    layer-purpose-pairs. If there are small numbers of shapes compared with the
    layer purpose pairs present, the speed difference is small anyway.

    The database is already organised into the different layer purpose pairs, so you
    might as well use that to filter the shapes first, rather than processing all
    shapes yourself.

    Of course, this only deals with the shapes at this level of hierarchy. If you
    want to get the shapes throughout the hierarchy, you'd need to either flatten
    the design, or do a recursive search throughout the hierarchy (or use the
    leSearchHierarchy function (or whatever it is called)).

    Regards,

    Andrew.
     
    Andrew Beckett, Aug 27, 2005
    #7
  8. One way to get the list of all "Diffusion" shapes through the
    hierarchy :

    cv=geGetEditCellViews
    diffShapes = dbGetTrueOverlaps( cv cv~>bBox list( "Diffusion" ) 0:20 )

    0:20 means that the search will start from level 0 to stop
    at level 20.

    ===================
    Kholdoun TORKI
    http://cmp.imag.fr
    ===================
     
    Kholdoun TORKI, Aug 29, 2005
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.