Refactor routing internals and archive retry benchmarks

This commit is contained in:
Jan Petykiewicz 2026-11-26 19:58:46 -08:00
commit ea5cfe7f31

View file

@ -103,6 +103,7 @@ def _fixture(
*,
die: tuple[float, float, float, float] | None = None,
min_straight: float = 0.5,
expected_routed: int | None = None,
) -> dict:
if not connections:
raise ValueError(f"No compatible connections in {name}")
@ -150,6 +151,7 @@ def _fixture(
obstacles.append(encoded)
return {
"name": name,
**({"expected_routed": expected_routed} if expected_routed is not None else {}),
"source": source,
"member": member,
"crop_um": list(die),
@ -292,7 +294,8 @@ def _lidar_cases(archive: TarFile) -> list[dict]:
settings = netlist["settings"]
die = tuple(value for corner in settings["die_area"] for value in corner) if not selected else None
name = f"lidar-{settings['design'].replace('_', '-')}"
cases.append(_fixture(name, "lidar", member, devices, connections, settings["wg_radius"], 1.0, die=die))
expected_routed = 3 if name == "lidar-clements-8x8" else None
cases.append(_fixture(name, "lidar", member, devices, connections, settings["wg_radius"], 1.0, die=die, expected_routed=expected_routed))
return cases