Routing problem for multi-pin port and anchors are debugged

This commit is contained in:
2026-05-31 22:16:44 +08:00
parent 9b4e8da796
commit ce7f6e95c4
36 changed files with 2470 additions and 676 deletions
+7 -1
View File
@@ -360,7 +360,13 @@ def readCompYaml(compName, comps_root=None):
if ymlFiles:
ymlPath = os.path.join(root, ymlFiles[0])
with open(ymlPath, 'r', encoding='utf-8') as f:
return yaml.safe_load(f)
data = yaml.safe_load(f) or {}
normalized_root = os.path.abspath(search_root).replace("\\", "/").lower()
pdk_ports_allowed = "/opt_pdk_public/" in f"{normalized_root}/" or "/opt_pdk_atlas/" in f"{normalized_root}/"
if pdk_ports_allowed and isinstance(data, dict) and "pins" not in data and isinstance(data.get("ports"), dict):
data = dict(data)
data["pins"] = data["ports"]
return data
return None