Title: USB 2.0 Hub Testing
1(No Transcript)
2USB 2.0 Hub Testing
3Agenda
- USB 2.0 Hub Overview
- Electrical and Chapter 11 Test Additions
- High Speed Repeater Testing
- Test Hardware Requirements
- Transaction Translator Testing
- Full Speed and Low Speed Compliance Devices
- Functional Testing
- Protocol Testing
- Non-Periodic Buffer Affinity
- Periodic Microframe Scheduling
4Hub Overview Architecture
High Speed Only
Port
HS/Classic Hub Controller
Transaction Translator (1 or N)
HS/Classic Hub State Machine
HS/Classic Hub Repeater
Full/Low Speed
Routing Logic
. . . . .
Port
Port
Port
- Unchanged From 1.1 Hubs (Except HS Signaling)
- HS FS/LS Repeaters, Determined by Upstream
Facing Link - Hub Controller
- Minor changes from classic hub
- Hub state machine (HS Detect, HS Termination
Transitions, Test Mode) - New Hub Functional Units
- Transaction Translator
- Port Routing logic
5Hub Overview New Pieces
High Speed Only
Port
Transaction Translator
Repeater, Controller, ...
Full/Low Speed
Routing Logic
Port
Port
Port
. . . . .
- Port Routing Logic
- Controllable Electrical Connection Between
- Full/Low (Transaction Translator), or
- High-Speed (Repeater)
- Route Done Once Per Device Reset
- Transaction Translator
- Major addition for USB 2.0
- Uses Split Transaction Protocol
6Transaction Translator
- What is a Transaction Translator?
- Component of the hub that handles data transfers
to/from full and low speed downstream devices - When is it Used?
- Active when hub is configured at high speed and
full and/or low speed devices connected
downstream - Buffers data transfers
- Finite space
- 2 kind of Buffers - Periodic and Non-Periodic
- 1 TT per hub OR 1 TT per port
7Transaction Translator
Hub Components
8Hub Overview Transaction Translator
- Bulk/Control
- 2 or More Buffers - 1 Per Transfer
- Uses USB Flow Control
- PING not used
- Interrupt/Isochronous
- Scheduled Transaction Pipeline
- Separate Buffer From Bulk/Control
- Separate SS and CS FIFOs
Transaction Translator
Bulk Control
Interrupt Isochronous
9Electrical and Chapter 11Test Additions Review
- Electrical (New Test Fixture)
- HS Signal Quality
- TDR
- Receiver Sensitivity
- J and K Voltage Levels
- Chapter 11 Additions
- TT Command Support
- Port Indicator Manual Mode Support
- New Status Bits
10High Speed Repeater Electrical Testing
- Packet Connectivity
- Sync Truncation (4 bits)
- EOP Dribble
- Repeater Path
- Jitter
- Latency
- Noise Filtering
- RWU Filter
- SORP Filter
- EOF1 and EOF2 Rules
- End of Resume Generation
High Speed Only
Port
Transaction Translator
Repeater, Controller, ...
Full/Low Speed
Routing Logic
Port
Port
Port
11Example Testing Sync Truncation and EOP Dribble
Oscilloscope
- Put Hub Port in Test_Force_Enable
- Test SW Generates Downstream Traffic
- Capture Pre/Post Hub Signals
- Analyze Data to Test Sync Truncation andEOP
Dribble
Hub Under Test
Breakout Board
Breakout Board
12Example - Testing Latency
- Put Hub Port in Test_Force_Enable
- Test SW Generates Downstream Traffic
- Capture Pre/PostHub Signals
- Analyze Data toTest Latency
- Start of SyncReference
13TT Testing Overview
TT Testing
Periodic
Non Periodic
Combination
Type
Control And Bulk Loopback Data Integrity Enumerati
on
Isoch and Interrupt Loopback Data Integrity Drop
Rate
Speed Combinations Multiple Transfer Type
Multiple Endpoints
Functional
Stall Timeout Nak
Stall Timeout Nak
Protocol
Buffer Size SS Microframe Arrival Abort Rules
Number of Buffers Buffer Affinity
Implementation
14TT Testing Compliance Devices
- Basic Functionality
- Full Speed
- Low Speed
- All Transfer Types
- Multiple Endpoints
- Protocol Level Control
- Produce All Possible Device Responses
- Allows Testing of Corner Cases, Buffer Affinity,
etc. - Defined Device Interface
- Allow Any Capable PDK/Device to Be Used
15Functional TestingExample Bulk
- Set Device In Loopback Mode
- Send Out Data Transfer
- Read In Data Transfer
- Compare Data
- Repeat For Multiple Iterations
- Repeat for Different Data Sizes
- 8,16,32,64
- Repeat for Multiple EndPoints
- Test all TT Buffer Space
16Protocol TestingExample Bulk Out
- Device Actions
- Device Naks
- Device Stalls
- Device TransmitsCorrupt Data
- Device Doesnt Respond
- First TT Attempt
- 3 or more Attempts
- Tradeoffs DeviceComplexity vs.Thorough
Coverage
Host
Nak Ack Or Stall
SS
Out
Data0
Ack
TT
Nak Ack Stall Nothing Bad CRC
Out
Data0
Device
17Implementation Testing Example Buffer Affinity
Rules
- Buffer Affinity Rules
- Control Endpoints - One Transfer Buffered At a
Time - Bulk Enpoints - Same Rule - But Direction Matters
- Same Buffer Reused For Transaction For Same
Endpoint - Why Do Rules Matter?
- Drivers Use Only One TD List Per Endpoint
- Error Cases Can Produce Similar Behavior
- How Do You Determine If Rules Are Correct?
- Cant Control SS and CS Separately (Handled in
Hardware) - No Specific SW Level Behavior Difference
18Buffer Affinity Correct Operation
Host
1
3
SS
Out
Data0
Ack
SS
Out
Data0
Ack
CS
Ack
2
One Transaction Buffered
TT
Buf A
Buf B
Out
Data0
Ack
4
Device
Buf A
Old
Pending
Ready/Ack
Old/Ack
SS
Ack
CS
1
4
3
19Buffer Affinity Incorrect Operation
Host
1
3
SS
Out
Data0
Ack
SS
Out
Data0
Ack
CS
Ack or Nak
2
Two Transactions Buffered
TT
Buf A
Buf B
Out
Ack
Out
Nak
Data0
Data0
4
5
Device
Buf A
Old
Pending
Ready/Ack
Old/Ack
Could See Either - Even For Subsequent CS
SS
Ack
CS
1
4
3
Old
Pending
Ready/Nak
Old/Nak
Buf B
SS
Ack
CS
2
5
3
20Buffer Affinity Testing The Behavior
- Simulating An Ack Smash (Two SS Same Transaction)
- Need to Ensure Both SS Reach TT Before First CS
- Example Solution
Async Queue Head
Bulk Out siTD
Dummy TD
Poll On Status On Do Complete Reset To Do
Start Correct Pointer
- Difference In Behavior Is On Device Side
- Tell Device To Count Transactions
- 1 Correct, 2 Incorrect
21Microframe Scheduling Rules
HS Start-Splits
Y0
Y1
Y2
Y3
Y4
Y5
Y6
Y7
- All Allowed HS Start Split Arrivals
- Abort Cases - Eof, X4
- Free Cases - Eof (Except Y7), X4
22Hub Testing Summary
- Hub Testing Areas
- HS Repeater Testing
- Electrical Testing
- Chapter 11 Command Additions (USBCheck)
- Transaction Translator
- Transaction Translator - Most Important Test Area
- Functional Testing For all Transfers
- Protocol Testing Through All Device Behaviors
- Buffer Affinity
- Microframe Scheduling Cases
23Questions?