USB Protocol¶
Package name: jsl/protocols/usb
References¶
- https://en.wikipedia.org/wiki/USB
- https://www.usb.org/
Transport vs Connector Bundles¶
The USB protocol contains many different layers from physical to logical. The bundles in this package are organized to support two levels in the application:
- Transport - This is the set of signals that convey the information in the bus. These signals typically traverse many components from the connector to the processor endpoint. These signals typically have SI constraints attached to them.
- Connector - This is the physical layer where the USB cable meets the board. This interface may have power, shield, and other accessory pins in addition to the transport layer signals. These additional connections may or may not make there way to the processor endpoint.
In the code below, the transport
bundles are what you would typically use when connecting
up the different modules of your circuit. The connector
bundles are typically used to
define the ports on a physical connector component or module that contains the physical
connector component.
Symmetry in Transport Bundles¶
If you look closely at the bundles defined below, you will notice some symmetry in the definitions of the transport bundles.
The usb-data
bundle defines the USB2.0 interface with port data
. This same interface
gets reused in usb-superspeed
and usb-c
later on.
Similarly, we use lane
to define an array of lane-pair
bundles (RX + TX differential pairs). This same pattern gets used in usb-c
.
This is not by accident. The reason we structure the bundles this way is:
- They can easily used in
supports/require
pin assignment statements. - We can simplify the implementation of the connect, constrain, and routing structure application functions.
Matching Lanes¶
For most of the constraint functions in this package, the bundle types
themselves are not checked for equality. Instead - we check for matching
lane configurations. This allows a usb-superspeed
and usb-c
transport bundle to connect to each other if they have the correct number
of lanes defined.
Summary¶
USBVersion¶
Functions¶
Function | Description |
---|---|
usb-get-trace-impedance | |
USB-Constraint | Construct a USBConstraints object |
usb-get-skew-loss |
General Definitions¶
Function | Description |
---|---|
usb-data | Transport Bundle for the USB 2.0 Interface |
usb-superspeed | Transport Bundle for Superspeed USB |
usb-a-SS-connector | Connector Bundle for USB Type A SuperSpeed(TM) Connectors |
usb-2-connector | Connector Bundle for the USB 2.0 Interface |
usb-c-connector | Connector Bundle - USB Type C Connector |
usb-c | Transport Bundle for USB3/4 |
Definitions¶
USBVersion¶
public defenum USBVersion <: Equalable & Hashable & JITXValue
-
USB2
-
USB3
-
USB4
Functions¶
usb-get-trace-impedance¶
public defn usb-get-trace-impedance (gen:USBVersion) -> Toleranced
- Returns
Toleranced
USB-Constraint¶
Construct a USBConstraints object
public defn USB-Constraint ( -- proto:USBVersion, route-struct:DifferentialRoutingStructure) -> DiffPair-Constraint
proto: USBVersion
- USB Protocol Version to construct a constraint object forroute-struct: DifferentialRoutingStructure
- Differential Pair Routing Structure - Usepcb-differential-routing-structure
to create.- Returns
DiffPair-Constraint
- Diff-Pair Constraint Object
usb-get-skew-loss¶
public defn usb-get-skew-loss (gen:USBVersion) -> [Toleranced, Double]
- Returns
[Toleranced, Double]
General Definitions¶
usb-data¶
Transport Bundle for the USB 2.0 Interface
public pcb-bundle usb-data
data
- Differential pair for USB data
usb-superspeed¶
Transport Bundle for Superspeed USB
public pcb-bundle usb-superspeed (lane-cnt:Int = ?)
lane-cnt: Int
- Number of superspeed lanes in this bundle. Default is 1.
-
data
- Differential pair for USB2.0 data -
lane
- A configurable number of lane-pairs for data transfer
This bundle supports USB 3/4 transport signals. These are the signals that are typically connected with SI constraints from the connector to the MCU or other components.
This bundle type is usually used to construct the ports on MCUs, ESD devices, Muxes, etc in the USB 3/4 applications.
usb-a-SS-connector¶
Connector Bundle for USB Type A SuperSpeed(TM) Connectors
public pcb-bundle usb-a-SS-connector
-
vbus
- Power bundle for connector -
bus
- usb-superspeed bundle for high speed data transfer -
shield
- Pin for connection to cable shield
usb-2-connector¶
Connector Bundle for the USB 2.0 Interface
public pcb-bundle usb-2-connector
-
vbus
- power bundle for USB connector interface -
bus
- usb-data bundle (differential pair) -
id
- ID signal
usb-c-connector¶
Connector Bundle - USB Type C Connector
public pcb-bundle usb-c-connector
-
vbus
- Power bundle for connector -
bus
- USB-C bundle defined for connector -
shield
- Pin for connection to cable shield
This bundle is typically applied to a physical connector component in a board design.
usb-c¶
Transport Bundle for USB3/4
public pcb-bundle usb-c (lane-cnt:Int = ?)
lane-cnt: Int
- Number of superspeed lanes in this bundle. Default is 2
-
data
- Differential pair for data transfer -
lane
- High speed differential pairs for data transfer (lane-cnt) -
cc
- CC pins for capability identification -
sbu
- SBU pins for side band utility
Related Packages¶
Forwarded by package: jsl/protocols