For my question I think that I have undestood that @tagger5896 's code should be executed from macro menu :smile:
I'm used to creating scripts that I execute always in batch mode.
Regards
Thank you @tagger5896 and @sebastian for your valuable help.
I will make a test with your code. I see that the code looks for the name of the layout at the beginning, so I guess I need to run the script using the command line:
klayout -r <scrip…
Hello @MoBe
You should specify the starting point (instead of nil) to make the fill_region work correctly:
region = db.Region(db.Box(x_start,y_start,x_end,y_end))while not region.is_empty(): topcell_o.fill_region(region, input_t…
Hi @wishalpha
Thank you very much for your help.
The function explode() (instance.explode()) that you pointed me to allowed me to resolve an instance array to remove the instances inside an exclusion area.
For information, this function makes all…
Thank you @tagger5896.
The issue is that all these actions could be done via Klayout Gui. I was asking if it is possible to do it within a python script.
Regards,
Hi @akita11,
I have understood what you are trying to check. The code (diff - poly).wdith(A).output..." and "(poly - diff).width(B).output..." is not always correct if the width of the transistor (vertical edge of the diffusion -poly…
Hello @atika11
What is usually checked in the transistor are: channel length (L), the transistor width and the poly extension on diffusion.
With Calibre, L is checked by looking the length the edge of the gate (poly AND diffusion) (klayout equival…
Hello Matthias,
Thank you so much for your response and for the code examples that you have shared in this discussion. I know that it should take some of your time to help us resolve our layout related issues :smile:.
I have made tests with the la…
Sorry, I have omitted a part of the program as I have exceeded the limit of the caracters I could write in a single post.
Example of usage:
time python ./mergeLayoutFiles.py -i input.gds -i input2.gds -m rename -t MERGE_MASK --force -o output.gd…
else: # We are in the case of the cells which have a conflicting names (2 cells with the same name in both input dbs) if cell.name == topcell: new_cell_name = cell.name + "_DB" + forma…
args = parser.parse_args() # Display the script usage and exit if the user demands this. if args.usage: Usage() exit(1) # Setup logging log_level = logging.INFO if args.verbose: log…
Hello Matthias,
Thank you for your answer.
The script takes some time in reading the oasis file (~1-2 minutes). The merge takes a lot of time (~20min) and the writing of the oasis takes almost 1 minute.
I didn't monitor the memory usage, but I a…
Hello,
I think that your code could be simplified:
while not shapes_iterator.at_end(): via_bbox_center = shapes_iterator.shape().polygon.transformed(shapes_iterator.trans()).bbox().center() via_centers.append(via_bbox_center.x, via_bbox_cen…