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:
@@ -60,6 +60,16 @@ You **must** look for layout guidance. Emit `layout_rules` as a list. Use `[]` o
|
||||
| `thermal_via` | Vias under exposed pad / thermal pad / EP |
|
||||
| `keepout` | Keep foreign nets, digital return, or copper out of a region |
|
||||
| `length_match` | Intra-pair skew / matched length limit in mm |
|
||||
| `impedance` | Single-ended `z0_ohm` or differential `zdiff_ohm` (plus `tolerance_pct` or `z_min_ohm`/`z_max_ohm`) |
|
||||
| `max_length` | Maximum routed length in mm |
|
||||
| `spacing` | Intra-pair / coupling gap (`min_spacing_mm`) |
|
||||
| `ref_plane` | Required reference plane (`ref_plane`, `topology`) |
|
||||
| `si_via` | Min/max vias on the HS net |
|
||||
| `layer` | Required copper layer / topology |
|
||||
| `series_resistor` | Series R on the HS net (`value_ohms`) |
|
||||
| `return_path` | GND return via next to the pair |
|
||||
|
||||
Do **not** emit impedance/50 Ω rules for I2C, GPIO, EN, analog REGN, or USB CC. Do **not** invent USB 90 Ω unless **this** datasheet states a number.
|
||||
|
||||
#### Fields
|
||||
- `pin` — number or name as printed (`"5"`, `"VIN"`, `"VDD"`, `"EP"`)
|
||||
@@ -116,7 +126,8 @@ Thermal vias:
|
||||
|
||||
#### Hard negatives
|
||||
- Do not invent land-pattern pad sizes from the mechanical drawing alone
|
||||
- Do not emit `length_match` for USB/HDMI/PCIe unless the **this** datasheet states a skew/length number
|
||||
- Do not emit `length_match` or `impedance` for USB/HDMI/PCIe unless **this** datasheet states a skew/Z number
|
||||
- Do not treat I2C, GPIO, EN, analog, or USB-CC as 50 Ω / 90 Ω pairs
|
||||
- Do not use kinds outside the closed set
|
||||
- One rule per distinct pin/guidance; prefer supply pins that show caps in the application figure
|
||||
|
||||
|
||||
@@ -66,7 +66,16 @@
|
||||
"decoupling_proximity",
|
||||
"thermal_via",
|
||||
"keepout",
|
||||
"length_match"
|
||||
"length_match",
|
||||
"impedance",
|
||||
"max_length",
|
||||
"spacing",
|
||||
"ref_plane",
|
||||
"si_via",
|
||||
"layer",
|
||||
"series_resistor",
|
||||
"return_path",
|
||||
"si"
|
||||
]
|
||||
},
|
||||
"pin": {"type": ["string", "null"]},
|
||||
@@ -74,9 +83,20 @@
|
||||
"max_distance_mm": {"type": ["number", "null"]},
|
||||
"same_layer": {"type": ["boolean", "null"]},
|
||||
"min_via_count": {"type": ["integer", "null"]},
|
||||
"max_via_count": {"type": ["integer", "null"]},
|
||||
"net_class": {"type": ["string", "null"]},
|
||||
"note": {"type": ["string", "null"]},
|
||||
"source_page": {"type": ["integer", "null"]}
|
||||
"source_page": {"type": ["integer", "null"]},
|
||||
"z0_ohm": {"type": ["number", "null"]},
|
||||
"zdiff_ohm": {"type": ["number", "null"]},
|
||||
"tolerance_pct": {"type": ["number", "null"]},
|
||||
"z_min_ohm": {"type": ["number", "null"]},
|
||||
"z_max_ohm": {"type": ["number", "null"]},
|
||||
"topology": {"type": ["string", "null"]},
|
||||
"min_spacing_mm": {"type": ["number", "null"]},
|
||||
"value_ohms": {"type": ["number", "null"]},
|
||||
"ref_plane": {"type": ["string", "null"]},
|
||||
"parameter": {"type": ["string", "null"]}
|
||||
},
|
||||
"required": ["kind"]
|
||||
}
|
||||
|
||||
@@ -85,7 +85,11 @@ def validate(data: dict) -> list[str]:
|
||||
if not isinstance(data["layout_rules"], list):
|
||||
errors.append("layout_rules must be an array")
|
||||
else:
|
||||
kinds = {"decoupling_proximity", "thermal_via", "keepout", "length_match"}
|
||||
kinds = {
|
||||
"decoupling_proximity", "thermal_via", "keepout", "length_match",
|
||||
"impedance", "max_length", "spacing", "ref_plane", "si_via",
|
||||
"layer", "series_resistor", "return_path", "si",
|
||||
}
|
||||
for i, row in enumerate(data["layout_rules"]):
|
||||
if not isinstance(row, dict):
|
||||
errors.append(f"layout_rules[{i}] must be an object")
|
||||
|
||||
Reference in New Issue
Block a user