USB Hands-On Labs.
Build and verify a USB 2.0 device controller in RTL and UVM. Labs 01–40 take you from packet fields, CRCs, NRZI and bit stuffing through transactions, enumeration, endpoint buffers, transfer types and a reusable UVM environment to an integrated controller. Labs 41–50 cover selected SuperSpeed digital link models.

10 modules · 50 labs
Each lab poses one engineering question about building or verifying part of a USB device or link. Modules 1–8 build a USB 2.0 device controller; Modules 9–10 add selected SuperSpeed digital link models.
USB 2.0 packet building blocks
USB 2.0 device controller · Labs 01–40
USBC-01 · USBC-02 · USBC-03 · USBC-04 · USBC-05
USB 2.0 signaling and receive logic
USB 2.0 device controller · Labs 01–40
USBC-06 · USBC-07 · USBC-08 · USBC-09 · USBC-10
Transactions, handshakes, and retries
USB 2.0 device controller · Labs 01–40
USBC-11 · USBC-12 · USBC-13 · USBC-14 · USBC-15
Endpoint 0, control transfers, and enumeration
USB 2.0 device controller · Labs 01–40
USBC-16 · USBC-17 · USBC-18 · USBC-19 · USBC-20
Endpoint buffers and application-side data flow
USB 2.0 device controller · Labs 01–40
USBC-21 · USBC-22 · USBC-23 · USBC-24 · USBC-25
Transfer types, timing, and device state
USB 2.0 device controller · Labs 01–40
USBC-26 · USBC-27 · USBC-28 · USBC-29 · USBC-30
Reusable UVM verification environment
USB 2.0 device controller · Labs 01–40
USBC-31 · USBC-32 · USBC-33 · USBC-34 · USBC-35
Integrated USB 2.0 device controller
USB 2.0 device controller · Labs 01–40
USBC-36 · USBC-37 · USBC-38 · USBC-39 · USBC-40
SuperSpeed digital link building blocks
Selected SuperSpeed digital link models · Labs 41–50
USBC-41 · USBC-42 · USBC-43 · USBC-44 · USBC-45
SuperSpeed link verification and capstone
Selected SuperSpeed digital link models · Labs 41–50
USBC-46 · USBC-47 · USBC-48 · USBC-49 · USBC-50
Lab numbers are stable IDs (Lab 7 is USBC-07). Labs build on earlier ones in module order, ending in the Lab 50 capstone.
All 50 labs
Search and filter the full curriculum. Titles, previews and metadata are free to browse — full lab content requires the labs package.
Module 1USB 2.0 packet building blocks
USB 2.0 device controller · Labs 01–40
- Lab 1USB 2.0 packet building blocks
Packet Framing
How do you frame USB packets in a byte stream and verify back-to-back packets in UVM?
PublishedPaid - Lab 2USB 2.0 packet building blocks
PID Encode and Decode
How do you encode and decode PIDs and discard packets with a bad PID complement?
PublishedPaid - Lab 3USB 2.0 packet building blocks
Address and Endpoint Extraction
How do you extract the device address and endpoint number and ignore tokens addressed to another device?
PublishedPaid - Lab 4USB 2.0 packet building blocks
Token CRC5
How do you implement token CRC5 and check bit ordering against an independent reference model?
PublishedPaid - Lab 5USB 2.0 packet building blocks
Streaming Data CRC16
How do you implement streaming data CRC16 and verify empty, maximum-length, and corrupted payloads?
PublishedPaid
Module 2USB 2.0 signaling and receive logic
USB 2.0 device controller · Labs 01–40
- Lab 6USB 2.0 signaling and receive logic
NRZI Encoder and Decoder
How do you build an NRZI encoder and decoder and verify synchronization and bit transitions?
PublishedPaid - Lab 7USB 2.0 signaling and receive logic
Bit Stuffing and De-Stuffing
How do you implement bit stuffing and de-stuffing across byte boundaries?
PublishedPaid - Lab 8USB 2.0 signaling and receive logic
SYNC and End-of-Packet Detection
How do you detect full-speed SYNC and end-of-packet signaling and recover from malformed endings?
PublishedPaid - Lab 9USB 2.0 signaling and receive logic
Idle, End-of-Packet, and Reset Line States
How do you distinguish idle, end-of-packet, and sustained reset using sampled full-speed line states?
PublishedPaid - Lab 10USB 2.0 signaling and receive logic
Receive Pipeline Integration
How do you integrate the receive pipeline and prove it accepts the next valid packet after a malformed one?
PublishedPaid
Module 3Transactions, handshakes, and retries
USB 2.0 device controller · Labs 01–40
- Lab 11Transactions, handshakes, and retries
Transaction State Machine
How do you associate token, data, and handshake packets in a transaction state machine and handle out-of-order arrivals?
PublishedPaid - Lab 12Transactions, handshakes, and retries
OUT Endpoint Handshakes
How do you build an OUT endpoint that validates data before committing it and generates ACK, NAK, or STALL?
PublishedPaid - Lab 13Transactions, handshakes, and retries
IN Endpoint Retransmission
How do you build an IN endpoint that holds data for retransmission when the host ACK is missing?
PublishedPaid - Lab 14Transactions, handshakes, and retries
DATA0/DATA1 Toggle Tracking
How do you track DATA0 and DATA1 and acknowledge a retry without delivering the same OUT payload twice?
PublishedPaid - Lab 15Transactions, handshakes, and retries
Missing and Late Responses
How do you verify that missing or late responses leave endpoint state and buffered data consistent?
PublishedPaid
Module 4Endpoint 0, control transfers, and enumeration
USB 2.0 device controller · Labs 01–40
- Lab 16Endpoint 0, control transfers, and enumeration
SETUP Decode and Endpoint 0 Restart
How do you decode the eight-byte SETUP payload and restart Endpoint 0 when a new valid SETUP arrives?
PublishedPaid - Lab 17Endpoint 0, control transfers, and enumeration
Control Transfer Sequencing
How do you sequence control read, control write, and no-data transfers, including status direction and zero-length packets?
PublishedPaid - Lab 18Endpoint 0, control transfers, and enumeration
SET_ADDRESS Timing
How do you implement SET_ADDRESS and verify that the new address takes effect after successful status-stage completion?
PublishedPaid - Lab 19Endpoint 0, control transfers, and enumeration
Descriptor ROM and GET_DESCRIPTOR
How do you serve device and configuration descriptors from ROM and verify GET_DESCRIPTOR truncation and packet termination?
PublishedPaid - Lab 20Endpoint 0, control transfers, and enumeration
SET_CONFIGURATION and Enumeration
How do you implement SET_CONFIGURATION and verify enumeration and noncontrol endpoint activation with a UVM host sequence?
PublishedPaid
Module 5Endpoint buffers and application-side data flow
USB 2.0 device controller · Labs 01–40
- Lab 21Endpoint buffers and application-side data flow
Packet-Aware FIFO
How do you build a packet-aware FIFO that preserves packet boundaries under application backpressure?
PublishedPaid - Lab 22Endpoint buffers and application-side data flow
Dual-Clock Endpoint FIFO
How do you design a dual-clock endpoint FIFO and verify ordering, full and empty behavior, and supported reset sequencing?
PublishedPaid - Lab 23Endpoint buffers and application-side data flow
Ping-Pong Endpoint Buffers
How do you design ping-pong endpoint buffers and prove that the USB engine and application cannot own the same buffer simultaneously?
PublishedPaid - Lab 24Endpoint buffers and application-side data flow
Multi-Endpoint Routing and Isolation
How do you route transactions to multiple endpoints and verify that toggle, halt, and buffer state remain isolated by endpoint and direction?
PublishedPaid - Lab 25Endpoint buffers and application-side data flow
Endpoint Registers With UVM RAL
How do you expose endpoint configuration and interrupt status through registers and verify a simultaneous write-one-to-clear and hardware event with UVM RAL?
PublishedPaid
Module 6Transfer types, timing, and device state
USB 2.0 device controller · Labs 01–40
- Lab 26Transfer types, timing, and device state
Bulk Loopback
How do you build bulk loopback and verify payload integrity under retries, short packets, and FIFO pressure?
PublishedPaid - Lab 27Transfer types, timing, and device state
Interrupt IN Endpoint
How do you build an interrupt IN endpoint and verify NAK on empty and event delivery under host polling?
PublishedPaid - Lab 28Transfer types, timing, and device state
Isochronous OUT Sink
How do you build an isochronous OUT sink and verify frame-associated delivery and error handling without a handshake or retry?
PublishedPaid - Lab 29Transfer types, timing, and device state
Start-of-Frame Timing
How do you track Start-of-Frame timing and verify scheduled behavior across frame counter wraparound and missing SOF indications?
PublishedPaid - Lab 30Transfer types, timing, and device state
Bus Reset, Suspend, and Resume
How do you implement bus reset, suspend, and resume and verify address, configuration, and endpoint state after each event?
PublishedPaid
Module 7Reusable UVM verification environment
USB 2.0 device controller · Labs 01–40
- Lab 31Reusable UVM verification environment
UVM Host Agent
How do you build and self-check a UVM host agent that drives token, data, and handshake packets?
PublishedPaid - Lab 32Reusable UVM verification environment
Passive Transaction Monitor
How do you build a passive monitor that reconstructs complete, aborted, and retried transactions?
PublishedPaid - Lab 33Reusable UVM verification environment
Reference Model and Scoreboard
How do you build a reference model and scoreboard that predict endpoint state, check payloads, and detect duplicate commits?
PublishedPaid - Lab 34Reusable UVM verification environment
Ownership, Toggle, and Timing Assertions
How do you write and validate assertions for buffer ownership, data toggle updates, and response timing?
PublishedPaid - Lab 35Reusable UVM verification environment
Fault Injection and Cross Coverage
How do you use constrained-random fault injection and cross coverage to measure endpoint direction, response, error type, and recovery?
PublishedPaid
Module 8Integrated USB 2.0 device controller
USB 2.0 device controller · Labs 01–40
- Lab 36Integrated USB 2.0 device controller
Controller Integration at the PHY Boundary
How do you connect the packet engine, Endpoint 0, and endpoint buffers through a byte-wide digital PHY boundary and verify end-to-end data flow?
PublishedPaid - Lab 37Integrated USB 2.0 device controller
Full-Speed and High-Speed Timing Model
How do you model full-speed and high-speed packet timing and verify microframe handling using a modeled speed indication?
PublishedPaid - Lab 38Integrated USB 2.0 device controller
Reset Isolation Across Sessions
How do you verify that resets during packet reception, control status, and application buffer access cannot leak stale data into the next session?
PublishedPaid - Lab 39Integrated USB 2.0 device controller
Waveform and Scoreboard Debug
How do you use waveforms and scoreboard logs to debug early address activation, duplicate OUT delivery, and a buffer ownership race?
PublishedPaid - Lab 40Integrated USB 2.0 device controller
Verification Plan Closure
How do you close the controller verification plan using enumeration, bulk loopback, fault recovery, and traceable functional coverage?
PublishedPaid
Module 9SuperSpeed digital link building blocks
Selected SuperSpeed digital link models · Labs 41–50
- Lab 41SuperSpeed digital link building blocks
Scrambler and Descrambler
How do you build a bypassable scrambler and descrambler for a single-lane Gen 1 teaching model and verify seed and restart behavior?
PublishedPaid - Lab 42SuperSpeed digital link building blocks
Ordered-Set Detection
How do you detect selected ordered sets in a decoded symbol stream and reject partial or corrupted matches?
PublishedPaid - Lab 43SuperSpeed digital link building blocks
Simplified Link Training
How do you build a simplified link-training state machine and verify bring-up, timeout, and recovery?
PublishedPaid - Lab 44SuperSpeed digital link building blocks
Elastic Buffer With SKP Compensation
How do you design an elastic buffer with modeled SKP compensation and verify payload ordering under bounded clock drift?
PublishedPaid - Lab 45SuperSpeed digital link building blocks
Link Header Parsing
How do you parse a modeled SuperSpeed link header and verify integrity checks, sequence handling, and recovery after a bad header?
PublishedPaid
Module 10SuperSpeed link verification and capstone
Selected SuperSpeed digital link models · Labs 41–50
- Lab 46SuperSpeed link verification and capstone
Link Header Credits
How do you track link header credits and verify that exhausted credits stall transmission and returned credits restore progress?
PublishedPaid - Lab 47SuperSpeed link verification and capstone
Header Retry Buffer
How do you build a bounded header retry buffer and verify replay order and credit accounting after a negative acknowledgment?
PublishedPaid - Lab 48SuperSpeed link verification and capstone
Link Power-State Transitions
How do you model selected link power-state transitions and verify pending traffic during low-power entry and exit?
PublishedPaid - Lab 49SuperSpeed link verification and capstone
Two-Partner UVM Link Stress
How do you coordinate two UVM link partners to inject header corruption, delayed credit returns, and recovery events during active traffic?
PublishedPaid - Lab 50SuperSpeed link verification and capstone
SuperSpeed Link Capstone
How do you integrate the SuperSpeed teaching blocks and use assertions, scoreboards, and coverage to show that traffic resumes after a link error?
PublishedPaid
