feat(precheck): verify top level macro name

This issue appeared in tt06, in the following analog project: https://github.com/davidparent/tt_resistor_test/tree/fdc74c92ec0ec2b9817f0ea6823daa62f8ca5401/
This commit is contained in:
Uri Shaked
2024-04-23 22:57:52 +03:00
parent 793d01ab13
commit 4b2bb6d000
2 changed files with 40 additions and 9 deletions
+8
View File
@@ -96,6 +96,14 @@ def klayout_checks(gds: str):
layout.read(gds)
layers = parse_lyp_layers(LYP_FILE)
logging.info("Running top macro name check...")
top_cell = layout.top_cell()
expected_name = os.path.splitext(os.path.basename(gds))[0]
if top_cell.name != expected_name:
raise PrecheckFailure(
f"Top macro name mismatch: expected {expected_name}, got {top_cell.name}"
)
logging.info("Running forbidden layer check...")
forbidden_layers = [
"met5.drawing",