Add PCB intra-pair skew only when the datasheet gives millimetres.

PS-SI-001 and decoupling skip without a numeric layout_rule. Tests use simple_project nets, not invented USBPHY boards.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-10 23:34:57 +02:00
co-authored by Cursor
parent be0fed7979
commit 45e820fabc
13 changed files with 201 additions and 149 deletions
+9
View File
@@ -29,6 +29,15 @@ def test_valid_decoupling_proximity_keeps_distance():
assert ok[0]["kind"] == "decoupling_proximity"
def test_length_match_kind_is_accepted():
ok, errors = validate_layout_rules([
{"kind": "length_match", "net_class": "diff", "max_distance_mm": 2.0, "source_page": 9},
])
assert errors == []
assert ok[0]["kind"] == "length_match"
assert ok[0]["max_distance_mm"] == 2.0
def test_empty_list_is_explicit_skip():
ok, errors = validate_layout_rules([])
assert ok == []