mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
feat(precheck): fail on overlapping pins
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
|
from itertools import combinations
|
||||||
|
|
||||||
import gdstk
|
import gdstk
|
||||||
from precheck_failure import PrecheckFailure
|
from precheck_failure import PrecheckFailure
|
||||||
@@ -234,6 +235,20 @@ def pin_check(gds: str, lef: str, template_def: str, toplevel: str):
|
|||||||
)
|
)
|
||||||
lef_errors += 1
|
lef_errors += 1
|
||||||
|
|
||||||
|
# check for overlapping pins
|
||||||
|
|
||||||
|
for (pin1, rects1), (pin2, rects2) in combinations(sorted(lef_ports.items()), 2):
|
||||||
|
for layer1, lx1, by1, rx1, ty1 in rects1:
|
||||||
|
for layer2, lx2, by2, rx2, ty2 in rects2:
|
||||||
|
if layer1 != layer2:
|
||||||
|
continue
|
||||||
|
if rx1 < lx2 or rx2 < lx1:
|
||||||
|
continue
|
||||||
|
if ty1 < by2 or ty2 < by1:
|
||||||
|
continue
|
||||||
|
logging.error(f"Overlapping pins in {lef}: {pin1} and {pin2}")
|
||||||
|
lef_errors += 1
|
||||||
|
|
||||||
# check gds for the ports being present
|
# check gds for the ports being present
|
||||||
|
|
||||||
lib = gdstk.read_gds(gds)
|
lib = gdstk.read_gds(gds)
|
||||||
|
|||||||
Reference in New Issue
Block a user