mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
feat: reharden script
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# Usage:
|
||||
# klayout -b -r gds_compare.py -rd gds1=file1.gds -rd gds2=file2.gds
|
||||
|
||||
import sys
|
||||
|
||||
import pya
|
||||
|
||||
|
||||
def compare_gds(file1, file2):
|
||||
diff = pya.LayoutDiff()
|
||||
|
||||
# Load the layouts
|
||||
layout1 = pya.Layout()
|
||||
layout1.read(file1)
|
||||
|
||||
layout2 = pya.Layout()
|
||||
layout2.read(file2)
|
||||
|
||||
# Check if the layouts are identical
|
||||
return diff.compare(layout1, layout2)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if compare_gds(gds1, gds2): # noqa: F821
|
||||
sys.exit(0)
|
||||
else:
|
||||
sys.exit(-1)
|
||||
Reference in New Issue
Block a user