It looks like you're new here. If you want to get involved, click one of these buttons!
Hi Matthias,
I remember that you mentioned the layer operating functions in Edit=>Layer=>BooleanOperations/Size with semi hierarchical option is different from the DRC boolean engine(flat mode) and working with it, Is it possible to run semi hierarchical layer operations via RBA or DRC code now?
In some case I hope to use this function to do layer operations in batch mode to avoid typo~
chhung
Comments
Hi chhung,
"semi-hierarchical" mode is not available for DRC. I can be emulated with RBA, but it's easier with the upcoming 0.25 version. For this version there will be a constructor
RBA::Regionthat takes aShapescontainer:With version <0.25 you'll need to emulate the XOR with
RBA::ShapeProcessor:Matthias
Thanks for your code, it works like a charm.
And another two questions. XD
According to the document in http://www.klayout.de/doc/code/class_ShapeProcessor.html , the first false option is "hierarchical: Collect shapes from sub cells as well", once I change it to true, the program stop running, is it because the program is running on "layout.each_cell" and should not set the hierarchical to true ?
If two layer operations are independence(for ex: B = Sizing Up A 0.1um ; C = Sizing Up A 0.2um), could I parallel run the two operations to reduce run time?
Thank you~ :D
--
chhung
Hi chhung,
Setting the "hierarchical" flag to true will make the boolean collect all shapes include the ones from the child cells. That's what we don't want to do if we iterate over the cells independently.
And regarding parallel runs: I'm sorry, but multi core usage is something for C++ and rather tricky on a complex data structure such as a layout object. No way to do this in Python or Ruby currently.
Matthias
If the hierarchy is:
Cell TOP (With layer 1/0 pattern) => Cell A (With layer 1/0 pattern)
Once we tried to TOP OR A, the result is correct, however if we tried to TOP NOT A or TOP AND A with hierarchical=false, due to the layer 1/0 pattern are in different cells, the boolean result isn't what we want.
So if we want to avoid this condition, we have to set hierarchical=true, and only run it on topcell, not layout.each_cell, is it correct ?
Best Regards,
--
chhung
Hi chhung,
the "semi-hierarchical" approach is a very weak approximation, so please don't expect the same results as "hierarchical=true". It is valid only, if all inputs for an operation are available within the same cell and if there no cross-hierarchy interactions that would modify the output. That's why I call it "semi-hierarchical": it considers cells to be independent entities and assumes that each cell can be considered isolated from child, sibling or parent cells.
There are very few good use cases for this. One example is an oversize of via layers. The OR operation is trivial, so it works out of the box in semi-hierarchical mode. For other operations this may or may not be the case. I don't know your actual use case, so I can't advise here.
Bottom line is that this mode is rarely applicable. That's why it's not part of the DRC feature.
Matthias
Thanks for the explanation in detail, now we know the limitation of semi-hierarchical. We would only use this function carefully on layer OR/Sizing operations. :)
Best Regards,
--
chhung