Skip to content

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:

  1. 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.
  2. 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, usb-superspeed defines the pattern for the lane array of superspeed-lane bundles. This same pattern gets used in usb-c.

This is not by accident. The reason we structure the bundles this way is:

  1. They can easily used in supports/require pin assignment statements.
  2. 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
superspeed-lane USB SuperSpeed Lane Bundle

Definitions

USBVersion

public defenum USBVersion <: Equalable & Hashable & JITXValue

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 for
  • route-struct: DifferentialRoutingStructure - Differential Pair Routing Structure - Use pcb-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 superspeed-lanes 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

superspeed-lane

USB SuperSpeed Lane Bundle

public pcb-bundle superspeed-lane

  • TX - transmit differential pair

  • RX - receive differential pair

This is intended to be a lane-pair type - hence the use of TX and RX. See lane-pair for more information.

Related Packages

Forwarded by package: jsl/protocols