Finer routing grid: --grid-resolution K with trace halos

A cell was exactly one trace plus its clearance, so a trace owning its cell
was the whole clearance model, and the 0.4 mm grid could not reach most
pins of a 0.5 mm pitch package: between two 0.3 mm pads a trace's centre
has a legal band only 0.15 mm wide. Resolution K makes cells K times
finer and has every trace claim a halo, the cells whose centre is nearer
than trace + clearance to one of its own, released again on rip-up.

K = 1 has an empty halo and is the old grid exactly (tested). On a 0.5 mm
row, K = 4 gets every pin out where K = 1 gets two. On the rc4 boards, K = 2
cuts the sense board's opens from 66 to 41 (JAR: 32) and the power board's
to 7 (JAR: 12), still with no DRC errors from freeroute's own copper.
This commit is contained in:
2026-09-27 07:59:05 -06:00
parent 9fa5432953
commit 8929fd367e
5 changed files with 90 additions and 16 deletions
+10 -1
View File
@@ -110,6 +110,14 @@ def build_parser() -> argparse.ArgumentParser:
help="disable rip-up-and-retry (grid and exact engines)",
)
parser.add_argument("--layers", help="comma-separated signal layer indices to route on")
parser.add_argument(
"--grid-resolution",
type=int,
default=1,
metavar="K",
help="grid and exact engines: cells K times finer than trace + clearance "
"(default 1); 2 or more reaches fine-pitch pins, at some cost in time",
)
parser.add_argument(
"--edge-clearance",
type=float,
@@ -166,6 +174,7 @@ def main(argv: list[str] | None = None) -> int:
rip_up=rip_up,
max_passes=max_passes,
edge_clearance_mm=args.edge_clearance,
resolution=args.grid_resolution,
)
elif args.engine == "room":
result = build_rooms_routing_result(
@@ -175,7 +184,7 @@ def main(argv: list[str] | None = None) -> int:
else:
result = build_routing_result(
dsn, layers=layers, rip_up=rip_up, max_passes=max_passes,
edge_clearance_mm=args.edge_clearance,
edge_clearance_mm=args.edge_clearance, resolution=args.grid_resolution,
)
ses_text = write_ses(dsn, result)