Skip to content
VLSI Mentor
Labs · USB

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.

50Labs
10Modules
50Published
RTL Design & Design VerificationCategory
Scope. These labs cover the digital logic above a byte-wide PHY boundary. The SuperSpeed labs use simplified, single-lane teaching models. Electrical compliance, Type-C, USB Power Delivery and USB4 are outside this curriculum.
All 50 labs are published. One purchase covers the entire collection.
USB Labs

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.

Module 15 labs

USB 2.0 packet building blocks

USB 2.0 device controller · Labs 01–40

USBC-01 · USBC-02 · USBC-03 · USBC-04 · USBC-05

Module 25 labs

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

Module 35 labs

Transactions, handshakes, and retries

USB 2.0 device controller · Labs 01–40

USBC-11 · USBC-12 · USBC-13 · USBC-14 · USBC-15

Module 45 labs

Endpoint 0, control transfers, and enumeration

USB 2.0 device controller · Labs 01–40

USBC-16 · USBC-17 · USBC-18 · USBC-19 · USBC-20

Module 55 labs

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

Module 65 labs

Transfer types, timing, and device state

USB 2.0 device controller · Labs 01–40

USBC-26 · USBC-27 · USBC-28 · USBC-29 · USBC-30

Module 75 labs

Reusable UVM verification environment

USB 2.0 device controller · Labs 01–40

USBC-31 · USBC-32 · USBC-33 · USBC-34 · USBC-35

Module 85 labs

Integrated USB 2.0 device controller

USB 2.0 device controller · Labs 01–40

USBC-36 · USBC-37 · USBC-38 · USBC-39 · USBC-40

Module 95 labs

SuperSpeed digital link building blocks

Selected SuperSpeed digital link models · Labs 41–50

USBC-41 · USBC-42 · USBC-43 · USBC-44 · USBC-45

Module 105 labs

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.

50 of 50
Module
Status

Module 1USB 2.0 packet building blocks

USB 2.0 device controller · Labs 01–40

5 labs · 5 published
  1. Lab 1
    USB 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
  2. Lab 2
    USB 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
  3. Lab 3
    USB 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
  4. Lab 4
    USB 2.0 packet building blocks

    Token CRC5

    How do you implement token CRC5 and check bit ordering against an independent reference model?

    PublishedPaid
  5. Lab 5
    USB 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

5 labs · 5 published
  1. Lab 6
    USB 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
  2. Lab 7
    USB 2.0 signaling and receive logic

    Bit Stuffing and De-Stuffing

    How do you implement bit stuffing and de-stuffing across byte boundaries?

    PublishedPaid
  3. Lab 8
    USB 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
  4. Lab 9
    USB 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
  5. Lab 10
    USB 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

5 labs · 5 published
  1. Lab 11
    Transactions, 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
  2. Lab 12
    Transactions, 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
  3. Lab 13
    Transactions, 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
  4. Lab 14
    Transactions, 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
  5. Lab 15
    Transactions, 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

5 labs · 5 published
  1. Lab 16
    Endpoint 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
  2. Lab 17
    Endpoint 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
  3. Lab 18
    Endpoint 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
  4. Lab 19
    Endpoint 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
  5. Lab 20
    Endpoint 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

5 labs · 5 published
  1. Lab 21
    Endpoint 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
  2. Lab 22
    Endpoint 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
  3. Lab 23
    Endpoint 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
  4. Lab 24
    Endpoint 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
  5. Lab 25
    Endpoint 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

5 labs · 5 published
  1. Lab 26
    Transfer 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
  2. Lab 27
    Transfer 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
  3. Lab 28
    Transfer 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
  4. Lab 29
    Transfer 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
  5. Lab 30
    Transfer 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

5 labs · 5 published
  1. Lab 31
    Reusable 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
  2. Lab 32
    Reusable UVM verification environment

    Passive Transaction Monitor

    How do you build a passive monitor that reconstructs complete, aborted, and retried transactions?

    PublishedPaid
  3. Lab 33
    Reusable 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
  4. Lab 34
    Reusable 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
  5. Lab 35
    Reusable 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

5 labs · 5 published
  1. Lab 36
    Integrated 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
  2. Lab 37
    Integrated 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
  3. Lab 38
    Integrated 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
  4. Lab 39
    Integrated 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
  5. Lab 40
    Integrated 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