Check ImpedenceFinder against datasheet SI rules, not a dump table.
Each layout_rules SI requirement (diff/SE Z, skew, max length, spacing, ref plane, vias, layer, return, series R) is one PASS/FAIL/MARGIN finding with FACT and REQUIREMENT. USB/HDMI/PCIe/ETH/LVDS/DDR only; I2C GPIO CC and analog REGN are skipped. No invented 90 Ω.
This commit is contained in:
@@ -18,7 +18,18 @@ def test_numeric_max_distance_mm_is_kept():
|
||||
assert ok[0]["max_distance_mm"] == given
|
||||
|
||||
|
||||
def test_length_match_keeps_max_distance_mm_parameter():
|
||||
def test_impedance_kind_keeps_zdiff_window():
|
||||
ok, errors = validate_layout_rules([{
|
||||
"kind": "impedance",
|
||||
"zdiff_ohm": 90,
|
||||
"tolerance_pct": 10,
|
||||
"net_class": "usb",
|
||||
"source_page": 12,
|
||||
}])
|
||||
assert errors == []
|
||||
assert ok[0]["zdiff_ohm"] == 90
|
||||
assert ok[0]["tolerance_pct"] == 10
|
||||
assert ok[0]["net_class"] == "usb"
|
||||
given = 2.0
|
||||
ok, errors = validate_layout_rules([
|
||||
{"kind": "length_match", "max_distance_mm": given},
|
||||
|
||||
Reference in New Issue
Block a user