• 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. rodFillWithRects not giving any output rectangles

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 9210
  • 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

rodFillWithRects not giving any output rectangles

Sheppie
Sheppie over 3 years ago

Hi,

In the past, I have used rodFillWithRects many times inside code for p-cells. This time I want to use it just as part of a bit of code to be run from the CIW to generate some rectangles in a given area (polygon). However, this time it fails on me. This is the code:

INDDMYShape = car( setof( shape cvIdWithFill~>shapes equal( shape~>lpp list( "INDDMY" "drawing" ) ) ) )
when( INDDMYShape
    printf( "INDDMYShape: %L\n" INDDMYShape )
    ;fillM1 = list( nil )
    tempId = dbCreatePolygon( cvIdWithFill list( "text" "drawing" ) INDDMYShape~>points )
    printf( "tempId: %L\n" tempId )
    valid = rodFillWithRects(    ?shapeId        tempId
                    ?fillShapeLPP        list( "M2" "drawing" )
                    ?fillShapeWidth        0.25
                    ?fillShapeLength    0.25
                    ?justification        "centerCenter"
                    ?spaceX            0.50
                    ?spaceY            0.50
                    ?enclosureX        0.50
                    ?enclosureY        0.50
                    ;?outputFillShape     fillM1
                )
    printf( "valid: %L\n" valid )
) ;;; end of when

This is printed in the CIW:

INDDMYShape: db:0x5dd8fb1a
tempId: db:0x5dd8fb42
valid: t

The shape INDDMYShape is a polygon, and at first I tried to use this shape as the input shape for rodFillWithRects, but this failed.

Then I thought: maybe I need ot add a new shape and use that, so i created tempId. Still no luck.

Then I decided to have a look at the output of rodFillWithRects, and assign that to variable "valid". As you can see, valid is "t" thus the filling should have worked, but clearly didn't.

I also tried using an "outputFillShape", but that didn't do the trick either.

The only reason I have a "when()" statement around this bit of code is to be able to "see" that my original shape (INDDMYShape) was not "nil". No other reason.

As i said, I used it in pcell code, and it works just fine. Is that a limitation of rod objects: they can only be used inside a pcell?

If so, what other procedure can I use to fill a certain are with small rectangles?

Any help is greatly appreciated.

Thanks in advance.

With kind regards,

Sjoerd

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    Sjoerd,

    This works for me. I don't need to create the temporary polygon either - I just pass the INDDMYShape to the rod function (it behaves the same if I do this or use the tempId). Also, if I use the ?outputFillShape I get the list of created shapes:

    The only time it fails is if the area is too small (it still returns t normally), or there's also the fact that if the rectangles are too small compared with the area you might not see them unless you increase the resolution on the Options->Display form (although I'm guessing that's not your problem).

    I can't see any reason why this would fail otherwise.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Sheppie
    Sheppie over 3 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thank you for your response.

    The odd thing is, this works:

    rodCreateRect(
        ?layer        list( "M1" "pin" )
        ?width        tileWidthLength
        ?length        tileWidthLength
        ?spaceX        tileSpacing
        ?spaceY        tileSpacing
        ?cvId        cvIdWithFill
        ?fillBBox    car( INDDMY4M1 )~>bBox
        )

    Unfortunately, some post-processing is needed to remove tiles from the layout that shouldn't be there (difference between the actual shape and its bBox). Part of post-processing I do this:

    foreach( shape setof( shape cvIdWithFill~>shapes equal( shape~>lpp list( "M1" "pin" ) ) ) dbDeleteObject( shape ) )

    This takes ages if there are >350,000 shapes to process. I couldn't find a dbDeleteObjects() to do this (a function that deletes all objects at once). This foreach takes a very long time...

    With kind regards,

    Sjoerd

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to Sheppie

    Hi Sjoerd,

    I'm surprised that the performance is that bad for that number of objects - for me it's less than 2 seconds with ~380,000 shapes to delete. There isn't a function to delete multiple objects - I do have a long-standing request (CCR 728684) asking for an efficient function to delete all shapes on a layer, but it's not been implemented yet (you could contact support and request a duplicate).

    Note that it would generally be more efficient to go to via the layer-purpose-pairs and process just the shapes on a single lpp rather than iterating over all shapes in the cellVIew:

    lpp=car(exists(LP cvIdWithFill~>lpps LP~>layerName=="M1" && LP~>purpose=="pin"))

    then lpp~>shapes only has the shapes on M1/pin. Maybe that will help improve performance when there's a lot of shapes in the cellView?

    The SKILL profiler is your friend here - it will help identify the bottlenecks in the code.

    Regards,

    Andrew

    • 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