Fill USB 2.0 Rev 2.0 and Type-C CabCon R2.5 numbers (2.75.0).

LS/FS rates, pull-up/down, and VBUS come from the base spec. Cable Z0 90 ohm is CABLE; PCB should 90 ohm is RECOMMENDED. L2 differential_impedance stays UNKNOWN. Rp/Rd/Ra from CabCon Tables 4-27/28/29. IEEE Section One/Three and HDMI still missing. PDFs not in git.
This commit is contained in:
2026-09-22 16:53:49 +02:00
parent f3be485b75
commit c4cd046ea9
6 changed files with 955 additions and 353 deletions
@@ -552,34 +552,36 @@ DVI_CHECKS = [
"return_path", "return_path",
"topology", "topology",
] ]
# Recovered PDFs (USB Electrical CTS v1.08, Type-C Functional Test Rev 0.91, DVI 1.0). # Recovered PDFs. IEEE 802.3 Section One/Three and HDMI Adopter still not on file.
# IEEE 802.3 is not on file — do not fill Ethernet numbers from these documents.
DOC_USB_CTS_108 = "USB 2.0 Electrical Compliance Test Specification" DOC_USB_CTS_108 = "USB 2.0 Electrical Compliance Test Specification"
REV_USB_CTS_108 = "Version 1.08, April 2026" REV_USB_CTS_108 = "Version 1.08, April 2026"
ORG_USBIF = "USB-IF" ORG_USBIF = "USB-IF"
DOC_USB20 = "Universal Serial Bus Specification"
REV_USB20 = "Revision 2.0, April 27, 2000"
DOC_USBC_FTS = ( DOC_USBC_FTS = (
"Universal Serial Bus Type-C Functional Test Specification Chapters 4 and 5" "Universal Serial Bus Type-C Functional Test Specification Chapters 4 and 5"
) )
REV_USBC_FTS = "Revision 0.91, March 3, 2024" REV_USBC_FTS = "Revision 0.91, March 3, 2024"
DOC_USBC_CABCON = "USB Type-C Cable and Connector Specification"
REV_USBC_CABCON = "Release 2.5, March 2026"
ORG_USB30PG = "USB 3.0 Promoter Group"
DOC_DVI_10 = "Digital Visual Interface (DVI)" DOC_DVI_10 = "Digital Visual Interface (DVI)"
REV_DVI_10 = "Revision 1.0, 02 April 1999" REV_DVI_10 = "Revision 1.0, 02 April 1999"
ORG_DDWG = "DDWG" ORG_DDWG = "DDWG"
DOC_USB_BASE = ( DOC_USB_BASE = DOC_USB20 + " " + REV_USB20
"USB-IF USB 2.0 Specification (not on file; Electrical CTS v1.08 does not state this field)"
)
DOC_USB_ELEC = ( DOC_USB_ELEC = (
"USB 2.0 Electrical Compliance Test Specification Version 1.08 April 2026 " "USB 2.0 Electrical Compliance Test Specification Version 1.08 April 2026 "
"(recovered; this PCB limit is not stated in the CTS)" "(recovered; this PCB limit is not stated in the CTS)"
) )
DOC_USB_CABLE = ( DOC_USB_CABLE = DOC_USBC_CABCON + " " + REV_USBC_CABCON
"USB Type-C Cable and Connector Specification (not on file; "
"Functional Test Spec Rev 0.91 references Table 4-15 / 4.4.2 without stating ohms or volts)"
)
DOC_USB_CTS = DOC_USB_CTS_108 + " " + REV_USB_CTS_108 DOC_USB_CTS = DOC_USB_CTS_108 + " " + REV_USB_CTS_108
DOC_USB_ECN = "USB ENGINEERING CHANGE NOTICE USB 2.0 DC Resistance (cited by Electrical CTS v1.08 §3.9)" DOC_USB_ECN = "USB ENGINEERING CHANGE NOTICE USB 2.0 DC Resistance (cited by Electrical CTS v1.08 §3.9)"
DOC_USB_LSFS = ( DOC_USB_LSFS = (
"USB 2.0 Specification LS/FS electrical (not on file; Electrical CTS v1.08 " "Universal Serial Bus Specification Revision 2.0 §7 (field not a single PCB number)"
"§2 lists LS/FS test names without numeric criteria)" )
DOC_USB_PD_VSAFE = (
"USB Power Delivery specification vSafe5V (not on file; Type-C CabCon R2.5 names vSafe5V "
"without restating the volt range)"
) )
DOC_IEEE_8023 = "IEEE 802.3 (clause for this variant; not on file)" DOC_IEEE_8023 = "IEEE 802.3 (clause for this variant; not on file)"
DOC_IEEE_2012 = "IEEE Std 802.3-2012 IEEE Standard for Ethernet" DOC_IEEE_2012 = "IEEE Std 802.3-2012 IEEE Standard for Ethernet"
@@ -789,35 +791,51 @@ def build_m0_catalog() -> dict[str, Any]:
L("can", "CAN / CAN FD", "PERIPHERAL", "CAN") L("can", "CAN / CAN FD", "PERIPHERAL", "CAN")
L("rgmii", "RGMII MAC-PHY", "PERIPHERAL", "ETHERNET") L("rgmii", "RGMII MAC-PHY", "PERIPHERAL", "ETHERNET")
def _usb2_cons(pid: str, *, hs: bool = False) -> list[dict[str, Any]]: def _usb2_cons(pid: str, *, speed: str) -> list[dict[str, Any]]:
docs = { """speed: ls | fs | hs | lsfs. PCB Zdiff stays UNKNOWN (cable 90 Ω is CABLE; PCB is should)."""
"differential_impedance": DOC_USB_ELEC if hs else DOC_USB_LSFS,
"impedance_tolerance": DOC_USB_ELEC if hs else DOC_USB_LSFS,
"electrical_levels": DOC_USB_ELEC if hs else DOC_USB_LSFS,
"rise_time": DOC_USB_ELEC if hs else DOC_USB_LSFS,
"fall_time": DOC_USB_ELEC if hs else DOC_USB_LSFS,
"intra_pair_skew": DOC_USB_ELEC if hs else DOC_USB_LSFS,
"termination": DOC_USB_ELEC if hs else DOC_USB_LSFS,
"dc_resistance": DOC_USB_ELEC if hs else DOC_USB_LSFS,
"connector_requirements": DOC_USB_CABLE,
"vbus_requirements": DOC_USB_BASE,
"pull_up": DOC_USB_BASE if not hs else DOC_USB_ELEC,
"pull_down": DOC_USB_BASE,
"signaling": DOC_USB_BASE if not hs else DOC_USB_CTS_108,
"data_rate": DOC_USB_LSFS if not hs else DOC_USB_CTS_108,
"test_method": DOC_USB_CTS,
"compliance_test": DOC_USB_CTS,
}
rec = {"return_path"} rec = {"return_path"}
out = [] out = []
hs = speed == "hs"
for p in USB2_CHECKS: for p in USB2_CHECKS:
mand: MandatoryClass = "RECOMMENDED" if p in rec else "MANDATORY" mand: MandatoryClass = "RECOMMENDED" if p in rec else "MANDATORY"
if speed == "ls" and p == "data_rate":
out.append(_num(
pid, p, 1.50, "Mb/s",
document=DOC_USB20, organization=ORG_USBIF,
revision=REV_USB20, section="7.1.11", page="159",
conditions=["low-speed only functions", "TLDRATE ±1.5% (15,000 ppm)"],
))
continue
if speed == "fs" and p == "data_rate":
out.append(_num(
pid, p, 12.000, "Mb/s",
document=DOC_USB20, organization=ORG_USBIF,
revision=REV_USB20, section="7.1.11", page="159",
conditions=["full-speed only functions", "TFDRATE ±0.25% (2,500 ppm)"],
))
continue
if hs and p == "data_rate": if hs and p == "data_rate":
out.append(_num( out.append(_num(
pid, p, 480.0, "Mb/s", pid, p, 480.00, "Mb/s",
document=DOC_USB_CTS_108, organization=ORG_USBIF, document=DOC_USB20, organization=ORG_USBIF,
revision=REV_USB_CTS_108, section="3.2 EL_2", page="3", revision=REV_USB20, section="7.1.11", page="159",
conditions=["HS transmitter", "tolerance ±0.05%"], conditions=["THSDRAT", "hosts/hubs/HS-capable ±0.05% (500 ppm)"],
))
continue
if speed == "ls" and p in {"rise_time", "fall_time"}:
out.append(_num(
pid, p, 75.0, "ns",
document=DOC_USB20, organization=ORG_USBIF,
revision=REV_USB20, section="7.1.2.1", page="130",
conditions=["10% to 90%", "minimum 75 ns", "maximum 300 ns", "balanced capacitive test load"],
))
continue
if speed == "fs" and p in {"rise_time", "fall_time"}:
out.append(_num(
pid, p, 4.0, "ns",
document=DOC_USB20, organization=ORG_USBIF,
revision=REV_USB20, section="7.1.2.1", page="130",
conditions=["10% to 90%", "minimum 4 ns", "maximum 20 ns", "matched to within ±10%"],
)) ))
continue continue
if hs and p in {"rise_time", "fall_time"}: if hs and p in {"rise_time", "fall_time"}:
@@ -825,18 +843,31 @@ def build_m0_catalog() -> dict[str, Any]:
pid, p, 300.0, "ps", pid, p, 300.0, "ps",
document=DOC_USB_CTS_108, organization=ORG_USBIF, document=DOC_USB_CTS_108, organization=ORG_USBIF,
revision=REV_USB_CTS_108, section="3.2 EL_6", page="3", revision=REV_USB_CTS_108, section="3.2 EL_6", page="3",
conditions=[ conditions=["HS driver 10% to 90% differential", "minimum greater than 300 ps"],
"HS driver 10% to 90% differential",
"minimum greater than 300 ps",
],
)) ))
continue continue
if hs and p == "pull_up": if speed in {"ls", "fs", "hs"} and p == "pull_up":
out.append(_num( out.append(_num(
pid, p, 1500.0, "ohm", pid, p, 1500.0, "ohm",
document=DOC_USB_CTS_108, organization=ORG_USBIF, document=DOC_USB20, organization=ORG_USBIF,
revision=REV_USB_CTS_108, section="3.5 EL_31", page="4", revision=REV_USB20, section="7.1.5.1", page="141",
conditions=["device speed detection 1.5K pull-up"], conditions=["detachable cable", "1.5 kΩ ±5%", "tied to 3.0 V to 3.6 V VTERM"],
))
continue
if speed in {"ls", "fs", "hs"} and p == "pull_down":
out.append(_num(
pid, p, 15000.0, "ohm",
document=DOC_USB20, organization=ORG_USBIF,
revision=REV_USB20, section="7.1.5.1", page="141",
conditions=["downstream facing ports", "RPD 15 kΩ ±5% to ground"],
))
continue
if speed in {"ls", "fs", "hs"} and p == "vbus_requirements":
out.append(_num(
pid, p, 4.75, "V",
document=DOC_USB20, organization=ORG_USBIF,
revision=REV_USB20, section="7.3.2", table="Table 7-7", page="178",
conditions=["high-power port VBUS minimum 4.75 V", "maximum 5.25 V"],
)) ))
continue continue
if hs and p == "dc_resistance": if hs and p == "dc_resistance":
@@ -844,19 +875,71 @@ def build_m0_catalog() -> dict[str, Any]:
pid, p, 17.0, "ohm", pid, p, 17.0, "ohm",
document=DOC_USB_CTS_108, organization=ORG_USBIF, document=DOC_USB_CTS_108, organization=ORG_USBIF,
revision=REV_USB_CTS_108, section="3.9.1", page="7", revision=REV_USB_CTS_108, section="3.9.1", page="7",
conditions=[ conditions=["HS device-only upstream", "D+ and D- individually", "maximum series DC resistance"],
"HS device-only upstream",
"D+ and D- individually",
"maximum series DC resistance",
],
)) ))
continue continue
zdoc = DOC_USB_LSFS
if speed == "ls":
zdoc = (
"Universal Serial Bus Specification Revision 2.0 §7.1.1.2 "
"(LS captive cable 200450 pF lumped C; not a differential cable Z0 PCB shall)"
)
elif speed == "fs":
zdoc = (
"Universal Serial Bus Specification Revision 2.0 §7.1.1.1 "
"(cable Z0 is packed as cable_differential_impedance, source_type CABLE; "
"FS-only text does not state a PCB trace Zdiff shall)"
)
elif hs:
zdoc = (
"Universal Serial Bus Specification Revision 2.0 §7.1.1.3 "
"(cable Z0 is CABLE cable_differential_impedance; PCB traces should is "
"RECOMMENDED pcb_trace_nominal_zdiff; CTS 45/50 ohm are fixture, not Zdiff)"
)
else:
zdoc = (
"Universal Serial Bus Specification Revision 2.0 §7 "
"(LS vs FS electrical differ; speed not selected)"
)
if p == "differential_impedance":
out.append(_c(pid, p, "UNKNOWN", mandatory=mand, needed_document=zdoc))
continue
out.append(_c( out.append(_c(
pid, p, "UNKNOWN", pid, p, "UNKNOWN",
mandatory=mand, mandatory=mand,
needed_document=docs.get(p, DOC_USB_LSFS if not hs else DOC_USB_BASE), needed_document={
"impedance_tolerance": zdoc,
"connector_requirements": DOC_USB_CABLE,
"test_method": DOC_USB_CTS,
"compliance_test": DOC_USB_CTS,
}.get(p, DOC_USB_LSFS),
))
if speed in {"fs", "hs"}:
out.append(_num(
pid, "cable_differential_impedance", 90.0, "ohm",
document=DOC_USB20, organization=ORG_USBIF,
revision=REV_USB20,
section="7.1.1.3" if hs else "7.1.1.1",
page="129" if hs else "124",
source_type="CABLE",
conditions=[
"shielded twisted-pair cable differential characteristic impedance Z0",
"±15%",
"not a PCB trace shall; not CTS 45/50 Ω fixture",
],
)) ))
if hs: if hs:
out.append(_num(
pid, "pcb_trace_nominal_zdiff", 90.0, "ohm",
document=DOC_USB20, organization=ORG_USBIF,
revision=REV_USB20, section="7.1.1.3", page="129",
mandatory="RECOMMENDED", source_type="PCB",
conditions=[
"D+ and D- circuit board traces between transceiver and connector",
"spec uses should (nominal 90 Ω), not shall",
"not CTS 45/50 Ω fixture",
],
))
out.append(_num( out.append(_num(
pid, "dc_resistance_captive_cable_device", 23.0, "ohm", pid, "dc_resistance_captive_cable_device", 23.0, "ohm",
document=DOC_USB_CTS_108, organization=ORG_USBIF, document=DOC_USB_CTS_108, organization=ORG_USBIF,
@@ -872,15 +955,65 @@ def build_m0_catalog() -> dict[str, Any]:
return out return out
def _usbc_cons(pid: str) -> list[dict[str, Any]]: def _usbc_cons(pid: str) -> list[dict[str, Any]]:
cable = {"rp", "rd", "ra", "cc", "connector_requirements", "current_advertisement"}
out = [] out = []
for p in USB_C_CHECKS: for p in USB_C_CHECKS:
doc = DOC_USB_CABLE if p in cable else DOC_USB_ELEC if p == "rp":
out.append(_num(
pid, p, 56000.0, "ohm",
document=DOC_USBC_CABCON, organization=ORG_USB30PG,
revision=REV_USBC_CABCON, section="4.11.1", table="Table 4-27", page="245",
source_type="CONNECTOR",
conditions=[
"Default USB Power advertisement",
"resistor pull-up to 4.755.5 V",
"56 kΩ ±20%",
"not 1.5 A / 3.0 A rows",
],
))
continue
if p == "rd":
out.append(_num(
pid, p, 5100.0, "ohm",
document=DOC_USBC_CABCON, organization=ORG_USB30PG,
revision=REV_USBC_CABCON, section="4.11.1", table="Table 4-28", page="245",
source_type="CONNECTOR",
conditions=["Sink CC termination resistor to GND", "nominal 5.1 kΩ"],
))
continue
if p == "ra":
out.append(_num(
pid, p, 800.0, "ohm",
document=DOC_USBC_CABCON, organization=ORG_USB30PG,
revision=REV_USBC_CABCON, section="4.11.1", table="Table 4-29", page="246",
source_type="CABLE",
conditions=["powered cable VCONN", "Ra minimum 800 Ω", "maximum 1.2 kΩ"],
))
continue
doc = DOC_USB_CABLE
if p == "usb2_channel_requirements": if p == "usb2_channel_requirements":
doc = DOC_USB_ELEC doc = DOC_USB_ELEC
if p in {"vbus_requirements", "voltage"}: if p in {"vbus_requirements", "voltage"}:
doc = DOC_USB_CABLE doc = DOC_USB_PD_VSAFE
if p == "current_advertisement":
doc = (
"USB Type-C Cable and Connector Specification Release 2.5 Table 4-27 "
"(Default USB Power / 1.5 A @ 5 V / 3.0 A @ 5 V — not a single ampere)"
)
out.append(_c(pid, p, "UNKNOWN", needed_document=doc)) out.append(_c(pid, p, "UNKNOWN", needed_document=doc))
out.append(_num(
pid, "rp_1a5", 22000.0, "ohm",
document=DOC_USBC_CABCON, organization=ORG_USB30PG,
revision=REV_USBC_CABCON, section="4.11.1", table="Table 4-27", page="245",
source_type="CONNECTOR",
conditions=["1.5 A @ 5 V advertisement", "resistor pull-up to 4.755.5 V", "22 kΩ ±5%"],
))
out.append(_num(
pid, "rp_3a", 10000.0, "ohm",
document=DOC_USBC_CABCON, organization=ORG_USB30PG,
revision=REV_USBC_CABCON, section="4.11.1", table="Table 4-27", page="245",
source_type="CONNECTOR",
conditions=["3.0 A @ 5 V advertisement", "resistor pull-up to 4.755.5 V", "10 kΩ ±5%"],
))
out.append(_num( out.append(_num(
pid, "gnd_ir_drop_cable", 250.0, "mV", pid, "gnd_ir_drop_cable", 250.0, "mV",
document=DOC_USBC_FTS, organization=ORG_USBIF, document=DOC_USBC_FTS, organization=ORG_USBIF,
@@ -1085,19 +1218,19 @@ def build_m0_catalog() -> dict[str, Any]:
)) ))
return out return out
for lid, pid, hints, note, hs in ( for lid, pid, hints, note, speed in (
("usb2-ls", "usb2-ls-dpair", ["USB_D+", "USB_LS"], ("usb2-ls", "usb2-ls-dpair", ["USB_D+", "USB_LS"],
"USB 2.0 Low Speed. Electrical CTS v1.08 lists LS tests without numeric criteria.", False), "USB 2.0 Low Speed. Rates/edges/pull-ups from USB 2.0 Rev 2.0 §7. LS is lumped C, not cable Z0.", "ls"),
("usb2-fs", "usb2-fs-dpair", ["USB_D+", "USB_FS"], ("usb2-fs", "usb2-fs-dpair", ["USB_D+", "USB_FS"],
"USB 2.0 Full Speed. Electrical CTS v1.08 lists FS tests without numeric criteria.", False), "USB 2.0 Full Speed. Cable differential Z0 is packed as CABLE, not a PCB shall.", "fs"),
("usb2-ls-fs", "usb2-ls-fs-dpair", ["USB_D+", "USB_D-", "USB_DP", "USB_DM", "D+", "D-"], ("usb2-ls-fs", "usb2-ls-fs-dpair", ["USB_D+", "USB_D-", "USB_DP", "USB_DM", "D+", "D-"],
"LS/FS umbrella pair. No LS/FS ohms in Electrical CTS v1.08.", False), "LS/FS umbrella pair. Speed-specific electrical not applied until LS vs FS is known.", "lsfs"),
("usb2-hs", "usb2-hs-dpair", ["USB_D+", "USB_D-", "USB_HS"], ("usb2-hs", "usb2-hs-dpair", ["USB_D+", "USB_D-", "USB_HS"],
"USB 2.0 High Speed. Zdiff is not stated in Electrical CTS v1.08 (do not invent differential ohms).", True), "USB 2.0 High Speed. Cable Z0 is CABLE; PCB trace nominal is RECOMMENDED. L2 Z check stays UNKNOWN.", "hs"),
): ):
physical.append(_iface( physical.append(_iface(
pid, lid, "SERIAL", "SERIAL_DIFFERENTIAL", "YES", pid, lid, "SERIAL", "SERIAL_DIFFERENTIAL", "YES",
USB2_CHECKS, _usb2_cons(pid, hs=hs), USB2_CHECKS, _usb2_cons(pid, speed=speed),
hints=hints, notes=note, hints=hints, notes=note,
)) ))
physical.append(_iface( physical.append(_iface(
@@ -1107,10 +1240,10 @@ def build_m0_catalog() -> dict[str, Any]:
hints=["USB_C", "TYPE_C", "CC1", "CC2"], hints=["USB_C", "TYPE_C", "CC1", "CC2"],
notes=( notes=(
"USB Type-C connector/interface system. Not USB 2.0/3.x/USB4 protocol. " "USB Type-C connector/interface system. Not USB 2.0/3.x/USB4 protocol. "
"No invented Rd/Rp ohms." "Rp/Rd/Ra from CabCon R2.5 Tables 4-27/4-28/4-29. VBUS volts still USB PD vSafe5V."
), ),
)) ))
usb2_over_c = _usb2_cons("usb-c-usb2-receptacle", hs=True) usb2_over_c = _usb2_cons("usb-c-usb2-receptacle", speed="hs")
seen_p = {c["parameter"] for c in usb2_over_c} seen_p = {c["parameter"] for c in usb2_over_c}
for c in _usbc_cons("usb-c-usb2-receptacle"): for c in _usbc_cons("usb-c-usb2-receptacle"):
if c["parameter"] not in seen_p: if c["parameter"] not in seen_p:
File diff suppressed because it is too large Load Diff
@@ -2,6 +2,13 @@
What's new in Periscope. What's new in Periscope.
## 2.75.0 — 2026-09-22 — Protocol packs from USB 2.0 Rev 2.0 and Type-C CabCon R2.5
USB 2.0 Base Specification (April 27, 2000) fills LS 1.50 Mb/s, FS 12 Mb/s, HS 480 Mb/s, pull-up/down, VBUS 4.755.25 V, LS/FS edges. Cable Z0 90 Ω is `source_type=CABLE`; HS PCB traces *should* 90 Ω is RECOMMENDED PCB — L2 `differential_impedance` stays UNKNOWN so 45/50 Ω fixtures are not treated as Zdiff. Type-C Cable and Connector Specification Release 2.5 fills Rp/Rd/Ra from Tables 4-27/4-28/4-29. VBUS volts still need USB PD vSafe5V. IEEE 802.3 Section One/Three and HDMI Adopter remain missing.
- [Changed] `protocol_catalog.py` + `catalog.json`.
- [Changed] pytest `tests/pcb/test_protocol_pdf_pack.py`.
## 2.74.0 — 2026-09-22 — Protocol packs from recovered PDFs (USB CTS, Type-C FTS, DVI 1.0, IEEE 802.3-2012 §2) ## 2.74.0 — 2026-09-22 — Protocol packs from recovered PDFs (USB CTS, Type-C FTS, DVI 1.0, IEEE 802.3-2012 §2)
NUMERIC constraints now carry title, revision, section/table, and page from the recovered PDFs. USB 2.0 HS fills data rate / rise-fall / 1.5 kΩ pull-up / DCR from Electrical CTS v1.08; Zdiff stays UNKNOWN (CTS does not state 90 Ω). Type-C Rp/Rd/VBUS volts stay UNKNOWN (Functional Test Spec points at Cable and Connector tables). DVI 1.0 is a separate protocol from HDMI. IEEE 802.3-2012 Section Two fills 100BASE-TX cabling 100 Ω / 100 m / isolation and 100 Mb/s; 10BASE-T Clause 14 and 1000BASE-T Clause 40 are not in Section Two. NUMERIC constraints now carry title, revision, section/table, and page from the recovered PDFs. USB 2.0 HS fills data rate / rise-fall / 1.5 kΩ pull-up / DCR from Electrical CTS v1.08; Zdiff stays UNKNOWN (CTS does not state 90 Ω). Type-C Rp/Rd/VBUS volts stay UNKNOWN (Functional Test Spec points at Cable and Connector tables). DVI 1.0 is a separate protocol from HDMI. IEEE 802.3-2012 Section Two fills 100BASE-TX cabling 100 Ω / 100 m / isolation and 100 Mb/s; 10BASE-T Clause 14 and 1000BASE-T Clause 40 are not in Section Two.
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "periscope-web", "name": "periscope-web",
"version": "2.74.0", "version": "2.75.0",
"private": true, "private": true,
"scripts": { "scripts": {
"sync-version": "node scripts/sync-version.mjs", "sync-version": "node scripts/sync-version.mjs",
+2 -1
View File
@@ -98,7 +98,8 @@ def test_usb2_and_usb_c_unknown_with_usbif_needed_document_no_90ohm():
assert c.needed_document assert c.needed_document
assert "USB-IF" in c.needed_document or "specification" in c.needed_document.lower() or "Specification" in c.needed_document assert "USB-IF" in c.needed_document or "specification" in c.needed_document.lower() or "Specification" in c.needed_document
if p.logical_protocol_id == "usb-c" and c.parameter in {"rp", "rd"}: if p.logical_protocol_id == "usb-c" and c.parameter in {"rp", "rd"}:
assert c.value_kind == "UNKNOWN" assert c.value_kind == "NUMERIC"
assert c.source and "Type-C" in (c.source.document or "")
over = next(p for p in cat.physical_interfaces if p.id == "usb-c-usb2-receptacle") over = next(p for p in cat.physical_interfaces if p.id == "usb-c-usb2-receptacle")
assert over.logical_protocol_id == "usb2-hs" assert over.logical_protocol_id == "usb2-hs"
assert over.connector == "Type-C" assert over.connector == "Type-C"
+28 -10
View File
@@ -33,11 +33,11 @@ def test_usb_cts_hs_numeric_cited_no_zdiff_90():
hs = next(p for p in cat.physical_interfaces if p.id == "usb2-hs-dpair") hs = next(p for p in cat.physical_interfaces if p.id == "usb2-hs-dpair")
by = {c.parameter: c for c in hs.constraints} by = {c.parameter: c for c in hs.constraints}
_cite_ok(by["data_rate"]) _cite_ok(by["data_rate"])
assert by["data_rate"].value == 480.0 assert by["data_rate"].value == 480.00
assert by["data_rate"].unit == "Mb/s" assert by["data_rate"].unit == "Mb/s"
assert by["data_rate"].source.document == "USB 2.0 Electrical Compliance Test Specification" assert by["data_rate"].source.document == "Universal Serial Bus Specification"
assert "1.08" in by["data_rate"].source.revision assert "2.0" in by["data_rate"].source.revision
assert "EL_2" in (by["data_rate"].source.section or "") assert by["data_rate"].source.section == "7.1.11"
assert by["rise_time"].value == 300.0 assert by["rise_time"].value == 300.0
assert by["fall_time"].value == 300.0 assert by["fall_time"].value == 300.0
assert by["pull_up"].value == 1500.0 assert by["pull_up"].value == 1500.0
@@ -47,27 +47,45 @@ def test_usb_cts_hs_numeric_cited_no_zdiff_90():
for key in ( for key in (
"data_rate", "rise_time", "fall_time", "pull_up", "dc_resistance", "data_rate", "rise_time", "fall_time", "pull_up", "dc_resistance",
"dc_resistance_captive_cable_device", "dc_resistance_host_hub_downstream", "dc_resistance_captive_cable_device", "dc_resistance_host_hub_downstream",
"cable_differential_impedance", "pcb_trace_nominal_zdiff",
): ):
_cite_ok(by[key]) _cite_ok(by[key])
assert by[key].source.organization == "USB-IF" assert by["cable_differential_impedance"].value == 90.0
assert by["cable_differential_impedance"].source_type == "CABLE"
assert by["pcb_trace_nominal_zdiff"].value == 90.0
assert by["pcb_trace_nominal_zdiff"].mandatory == "RECOMMENDED"
assert by["pcb_trace_nominal_zdiff"].source_type == "PCB"
z = by["differential_impedance"] z = by["differential_impedance"]
assert z.value_kind == "UNKNOWN" assert z.value_kind == "UNKNOWN"
assert z.value is None assert z.value is None
ls = next(p for p in cat.physical_interfaces if p.id == "usb2-ls-dpair") ls = next(p for p in cat.physical_interfaces if p.id == "usb2-ls-dpair")
ls_rate = next(c for c in ls.constraints if c.parameter == "data_rate") ls_rate = next(c for c in ls.constraints if c.parameter == "data_rate")
assert ls_rate.value_kind == "UNKNOWN" _cite_ok(ls_rate)
assert ls_rate.value == 1.50
fs = next(p for p in cat.physical_interfaces if p.id == "usb2-fs-dpair")
fs_rate = next(c for c in fs.constraints if c.parameter == "data_rate")
_cite_ok(fs_rate)
assert fs_rate.value == 12.000
blob = json.dumps(z.model_dump()) blob = json.dumps(z.model_dump())
assert "90" not in blob assert "90" not in blob
def test_type_c_rp_rd_unknown_fts_does_not_state_ohms(): def test_type_c_rp_rd_from_cabcon_r25_vbus_volts_unknown():
cat = load_catalog() cat = load_catalog()
rec = next(p for p in cat.physical_interfaces if p.id == "usb-c-receptacle") rec = next(p for p in cat.physical_interfaces if p.id == "usb-c-receptacle")
by = {c.parameter: c for c in rec.constraints} by = {c.parameter: c for c in rec.constraints}
for p in ("rp", "rd", "ra", "cc"): _cite_ok(by["rp"])
assert by[p].value_kind == "UNKNOWN" assert by["rp"].value == 56000.0
assert "Cable and Connector" in (by[p].needed_document or "") assert by["rp"].source.table == "Table 4-27"
assert by["rp"].source_type == "CONNECTOR"
_cite_ok(by["rd"])
assert by["rd"].value == 5100.0
assert by["rd"].source.table == "Table 4-28"
_cite_ok(by["ra"])
assert by["ra"].value == 800.0
assert by["ra"].source_type == "CABLE"
assert by["voltage"].value_kind == "UNKNOWN" assert by["voltage"].value_kind == "UNKNOWN"
assert "vSafe5V" in (by["voltage"].needed_document or "")
_cite_ok(by["gnd_ir_drop_cable"]) _cite_ok(by["gnd_ir_drop_cable"])
assert by["gnd_ir_drop_cable"].value == 250.0 assert by["gnd_ir_drop_cable"].value == 250.0
assert by["gnd_ir_drop_cable"].source_type == "CABLE" assert by["gnd_ir_drop_cable"].source_type == "CABLE"