USB / USB4 — Packet Architecture & Flow Control
Introduction
USB and USB4 have evolved from a simple peripheral bus into a high‑speed, packet‑based, multi‑protocol transport fabric.
Modern USB4 links carry multiple logical flows, virtual channels, and tunneled protocols over a shared physical link, using a rich packet architecture and sophisticated flow control.
This page focuses on packet architecture and flow control in USB/USB4, showing how packets are structured, routed, and regulated across the link.
USB / USB4 Layering Overview
USB4 builds on a layered architecture:
- Protocol / Tunnel Layer
- USB 3.x, DisplayPort, PCIe tunneling
- logical flows and services
- Packet / Transport Layer
- packet formats
- routing IDs and virtual channels
- flow control tokens
- Link / PHY Layer
- high‑speed differential signaling
- lane bonding and training
- scrambling and encoding
The packet layer is responsible for framing, routing, and flow control.
Packet Types and Structure
Packet Types
USB4 defines multiple packet categories, such as:
- data packets
- control packets
- flow control tokens
- management and routing packets
Each type has its own header format and semantics.
Packet Structure
A typical USB4 packet includes:
- Header
- routing ID
- virtual channel ID
- packet type
- length and attributes
- Payload (optional)
- tunneled protocol data (USB, DP, PCIe, etc.)
- Integrity Fields
- CRC or checksum (depending on layer)
The header determines how the packet is routed and handled.
Routing and Virtual Channels
Routing IDs
Packets carry routing IDs that identify:
- source and destination
- path through hubs or routers
- logical endpoints
Routing is performed at the packet layer, independent of tunneled protocols.
Virtual Channels
USB4 supports virtual channels to:
- separate traffic classes
- isolate tunneled protocols
- provide QoS and latency guarantees
Each virtual channel has its own flow control and scheduling state.
Flow Control in USB4
Credit‑Based Flow Control
Similar to PCIe, USB4 uses credit‑based flow control:
- receivers advertise credits per virtual channel
- transmitters may send packets only when credits are available
- credits are returned as packets are consumed
This ensures lossless operation and prevents buffer overflow.
Flow Control Tokens
USB4 uses explicit flow control tokens to:
- update credit state
- signal buffer availability
- coordinate between routers and endpoints
Tokens are packets themselves, processed by the packet layer.
Packetization and Tunneling
Tunneling Protocols
USB4 can tunnel:
- USB 3.x
- DisplayPort
- PCIe (in some configurations)
Each tunneled protocol is mapped into USB4 packets with:
- appropriate headers
- routing and VC information
- flow control integration
Segmentation and Reassembly
Large tunneled transfers are:
- segmented into multiple USB4 packets
- reassembled at the destination tunnel endpoint
This mirrors the generic segmentation/reassembly architecture.
Scheduling and QoS
Per‑Virtual‑Channel Scheduling
Schedulers operate per virtual channel:
- strict priority for control or latency‑sensitive traffic
- weighted or deficit‑based scheduling for data traffic
QoS and Latency
USB4 can provide:
- bandwidth guarantees
- latency bounds for specific flows
- isolation between display, storage, and generic data traffic
Scheduling and flow control work together to enforce QoS.
Interaction with PHY and PCS‑Like Functions
Although USB4 does not use the exact MAC/PCS terminology, conceptually:
- the packet layer plays the role of MAC/Transport
- the link/PHY layer handles scrambling, encoding, lane bonding, and training
Scrambling and alignment are handled below the packet layer, ensuring robust high‑speed signaling.
Performance Considerations
- High throughput via multi‑lane operation and efficient packetization
- Low latency for control and display traffic via prioritization
- Scalability through virtual channels and tunneling
- Robustness via credit‑based flow control and CRC
Endpoint and hub/router designs must carefully balance buffer sizes, flow control granularity, and scheduling policies.
Related Pages
- Protocol Layering — Architecture & Fundamentals
- MAC / PCS / PHY — Roles & Interactions
- Packetization — Architecture & Data Flow
- Protocol Flow Control — Architecture & Mechanisms
- Reassembly & Segmentation — Architecture & Use Cases
- CRC — Overview, Families & Architecture
Summary
USB4 extends USB into a high‑speed, multi‑protocol, packet‑based fabric.
Its packet architecture, routing IDs, virtual channels, and credit‑based flow control enable efficient tunneling of diverse protocols with strong QoS and reliability guarantees.
Understanding USB4 packet architecture is key to designing endpoints, hubs, and bridges that fully exploit the capabilities of the link.