I'm interested in writing a SKILL code that calculates local density of any layers specified based on bbox given. I'm wondering what is the best way to achieve this. The function will be given a cellview, bbox, and layers to be processed. For example, getLocalDensity(d_cellview, l_bBox, l_layers)"
Based on the bbox, the code needs to identify all the objects such as instances, pcells, shapes, vias etc. within the bbox and calculate the total areas of the layers given in argument.
Since we have to do this hierarchically, I need some advice on which API functions will give me the best performance and allows me to get all the objects within that bbox through the hierarchy.
Thanks for sharing any insights into this kind of operation!
Hi YaosanActually density calculation can be quite complex so I think it might not be so easy to implement it using SKILL. If it is possible, you might want to just consider using the density functions in verification tools such as Assura or PVS.I think an easy approach would be to make a copy of the instances in the layout and flatten the copied instances in memory. You can then easily get the shape bBox info from the flattened layouts. This method would of course not work too well on larget layouts.Best regardsQuek