• 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. Most efficient db function to move all shapes in a design...

Stats

  • Locked Locked
  • Replies 15
  • Subscribers 143
  • Views 19000
  • 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

Most efficient db function to move all shapes in a design?

jaleco
jaleco over 8 years ago

Working in ic5141, what is the most efficient way to move all shapes in a design using the db functions?

I'm dealing with millions of shapes and would like to use a function like Move Origin, but this is not a db function.

Is it more efficient to create a figure group, add each shape to the group and move the group, or to select and move each shape?

Neither seem like good options for a list of millions of shapes.

  • Cancel
  • jaleco
    jaleco over 8 years ago
    Thank you both for your responses.
    Andrew, I am opening a case to look into the issue I am having with dbGetOverlaps().
    I agree, the main issue has to do with the difference in how dbGetOverlaps() and geSelectArea()|geGetSelectedSet() produce their lists.
    The difference between -nograph and a graphic session is more about how geSelectArea() is not an option for a -nograph session, and I keep thinking doing this non-graphically simply has to be more efficient.

    I am working with a single layer mask reticle view with no hierarchy.
    It is a flat design consisting only of shapes, and there are no shapes overlapping the selection bounding box.
    I'm selecting die regions of the mask and comparing them with XOR to confirm the mask data in each region is identical.
    Using results from the graphic session extractions, I have already confirmed the process works.

    Lawrence, given the single layer, shape only, and flat nature of the design data, I don't think there would be any benefit to looping through the shapes within a selection bounding box. I can't cull the potential selection set by layer or object type. They are all the same in that respect. Writing a setoff(shapes cv~>shapes bbox<test>) loop seems like it would not be any more efficient than a predefined function. Is this what you are thinking might work better?

    Without getting into the actual code, yes it is identical to the example code - with the understanding that to run it, I have the parent cellview open, and I use looping constructs to define different bbox, new cellnames, and new cell centerpoints for each selection area and leMakeCell().
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 8 years ago
    One more thing to try/think about - have you tried the Yank and Paste commands? leYankFigs() (not sure if that's present in IC5141, but leHiYank() should be), and then lePasteFigs()/leHiPaste() - compare these with what you have... Good luck, happy coding :-) - Lawrence.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 8 years ago
    I recall having performance problems in 5.1.41 when dealing with many flat shapes. I was able to get much better results after pre-allocating some memory to help eliminate garbage collection. If I recall correctly, I had to use needNCells on the dbobject. The following command will set aside enough memory to handle 4 million objects before garbage collection. You could also try increasing the number (but you'll need to stay within the memory limits of the tool). Use "top" to see how much memory your icfb or layout process is using before and after this command:
    needNCells('dbobject 4M)

    You can use gcsummary to see a list of all the object types and how many times garbage collection was run on that object in the last column.

    Another possibility is that dbProduceOverlap is more efficient in 5.1.41 than dbGetOverlaps. In 6.1.7, they appear about equal. The doc says this:
    Returns a list of all the shapes in a cellview whose bounding boxes overlap the area specified by l_bBox. This function interface is simpler than dbGetOverlaps if you are only interested in finding the overlapping shapes.

    Derek
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jaleco
    jaleco over 8 years ago
    Thanks for the tip Lawrence.
    leYankFigs() and lePasteFigs() works much faster - seconds - graphically.
    But I get no results in my new layout when trying Yank and Paste in -nograph mode. I get an empty layout.

    Derek, are you thinking that -nograph mode may need special memory allocation, uniquely from graphics mode?
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    I'm not sure how many times I have to say that -nograph is running the same way as in graphics mode as far as icfb is concerned. The memory allocation is the same. Derek was merely explaining that if you're dealing with very large numbers of shapes, you might be better off pre-allocating memory (using needNCells) for database objects rather than letting it dynamically allocate them in smaller chunks. Otherwise it can spend a lot of time in trying to garbage collect each time it allocates more memory. This is NOTHING to do with it being in graphical or non-graphical mode.

    That said, I did a quick experiment in IC5141 and found that if I use this code:

    cv=dbOpenCellView("ether" "top" "layout")
    ;dbOpenHier(cv 32)
    cv2=dbOpenCellViewByType("ether" "top" "filtered" "maskLayout" "w")
    leYankFigs(cv list((0:0) (2000:0) (2000:2000) (0:2000)) 0)
    lePasteFigs(cv2 (0:0))
    dbSave(cv2)

    (I assume you're remembering to save), then if I do:

    icfb -restore yankpaste.il

    then it's missing the top level shapes. If I run icfb and then load("yankpaste.il") then it's OK. There's some strange timing issue at startup. In non-graphics mode, it never quite works properly (I didn't extensively test it - and anyway my data isn't really setup to directly replicate what you're doing).

    Anyway, I'm not spending time on this if somebody from the customer support team elsewhere in the world is looking at it; I don't want to double up on effort, particularly when it's a Friday night and I want to go home!

    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