Data Center Software Series: USB 3.0 Simple and Complex Matching/Triggers

The Data Center Software is Total Phase’s free bus monitoring software that allows users to interface with Total Phase protocol analyzers supporting I2C, SPI, USB, CAN, and eSPI protocols. These analyzers include the Beagle I2C/SPI Protocol Analyzer, the line of Beagle USB Protocol Analyzers, the USB Power Delivery Analyzer, the Komodo CAN Duo Interface, and the Promira Serial Platform with the eSPI Analysis Application.

When monitoring and debugging USB systems, engineers may want to perform triggers on data captures to better understand the bus events, data, or errors that are linked to USB bugs. The Match/Action triggering and filtering capability in the Data Center Software allows developers to trigger the capture, filter data, or set external triggers by matching data patterns, packet types, error types, and much more.

For USB 3.0 debugging, the Data Center Software offers both simple and complex matching and triggers. In this article, we’ll discuss more about these functionalities and the different settings that can be configured in each option.

USB 3.0 Matching Tab

Under the “Analyzer” settings located at the top menu, users can find “Device Settings”. Within this dialog there is an option to configure “Additional Settings”. Here, users can find a variety of different settings for both USB 2.0 and USB 3.0 captures. Focusing on USB 3.0, there are options for both simple and complex configurations.

USB 3.0 Simple Matching System

By using the Beagle USB 5000 v2 SuperSpeed Protocol Analyzer – Standard or Ultimate Edition, users can perform USB 3.0 simple triggers.

The USB 3.0 Simple Matching System is capable of triggering a USB 3.0 capture or asserting the external output on the following types of data or events, in either stream direction:

  • Link Command
  • Header Packet
  • Data Payload
  • CRC Error
  • Training Sequences
  • VBUSDetection
  • External Input
  • Reverse Polarity
  • Termination Detection
  • Scrambling Disable
  • LFPS
  • PHY Error

The simple matching system is designed to be a quick method of setting capture triggers. For example, selecting Header Packet will match whenever a Link Management Packet, Transaction Packet, Data Payload Packet, or Isochronous Timestamp Packet occurs on the bus.

When a match occurs, the protocol analyzer can trigger and/or assert the external output. The external output can be asserted on the capture trigger or on every time the match occurs.

Additionally, as a convenience, this dialog provides common configurations including:

  • Check All CRC Errors
  • Check All Training Sequences
  • Check All
  • Clear All
USB 3.0 Simple Matching Configuration Dialog USB 3.0 Simple Matching Configuration Dialog

USB 3.0 Complex Matching System

The USB 3.0 Complex Matching System provides additional capabilities that allow users to perform state-based triggers on match conditions such as specific packet types or data patterns, bus events, and timers. These match conditions can trigger a desired action to occur.

This function is supported with the Beagle USB 5000 v2 SuperSpeed Protocol Analyzer – Standard and Ultimate Editions. The Standard version allows for a single state with a single match per stream to be defined, while the Ultimate edition allows for up to eight states to be defined with three matches per stream per state.

USB 3.0 Complex Matching Configuration Dialog USB 3.0 Complex Matching Configuration Dialog

 

Settings

With the complex matching configuration selected, the top of the USB 3.0 Matching tab has various settings including:

  • Validate States: to verify there are no errors of the state configuration
  • Write Config/Read Config: to save and load complicated matching for later use
  • Clear All: to delete all complex state match data
  • Enabled: to indicate whether the complex matching system is enabled

State Configuration

Each state in the complex state machine is delimited by a graphical box and is identified by the state number. By default, the first state is created when creating a new complex match.

A new state can be created by clicking the New State button. States can be reordered by clicking and dragging the state box. Once the box is released, all other states will automatically be renumbered accordingly.

USB 3.0 Complex Matching – Reordering States USB 3.0 Complex Matching – Reordering States

 

Match Action Units

Within each state, one or more match action units can be defined by clicking on the New Match Action button. When clicked, the available match action units will appear as a dropdown menu, including DS (Downstream) Data Match, US (Upstream) Data Match, Timer, and Event.

The Beagle USB 5000 v2 analyzer – Standard edition provides only one upstream data match, one downstream data match, and an event match. The Ultimate edition allows for up to three upstream data matches, up to three downstream data matches, an event match, and a timer per state.

 

New Unit USB 3.0 Complex Matching USB 3.0 Complex Matching – Creating a new match action unit

After a match action unit is defined, a match action unit block will appear in the state with a textual description of the match criteria and action settings. If a "Go To" branching action has been defined, the "GOTO" parameters will appear next to the match action unit.

Each state can have a number of match action units. These units can also be reordered by clicking and dragging the unit.

Reorder Unit USB 3.0 Complex Matching

 

Match Action Unit Configuration

Each match action unit, including data match, event match, and timer match, has a different configuration window to suit its properties. Within this window, each match action unit can be configured to execute one or more actions: assert external output, trigger the capture, or go to another state.

Event Match Action Unit

The Event Match Action Unit matches USB 3.0 events similar to what is available in the USB 3.0 simple configuration.

Event Match Action Unit Event Match Action Unit

The following events in the upstream or downstream direction can be selected:

  • LPFS
  • Polarity Inversion
  • Receiver (RX) Termination
  • Disable Scrambling

The following events can also be selected independent of stream direction:

  • VBUSPresence
  • External Input
  • Cross-Analyzer Trigger

The match can be specified on the rising or falling edge for VBUS Presence and External Input, but must be on the rising edge for the Cross-Analyzer Trigger.

Timer Match Action Unit

The Timer Match Action Unit matches after a specified amount of time has elapsed. The amount of time can be configured in seconds, milliseconds, microseconds, or nanoseconds.

Timer Match Action Unit Timer Match Action Unit

 

Data Match Action Unit

The Data Match Action Unit is configured for specifically the upstream (US) or downstream (DS) direction and can be configured for any one of the following packet types: Link Command, Header Packet, Data Packet, Qualified Data Packet, and Training Sequence.

All Data Match Action Units provide the ability to match the opposite of the selection. In this way, a match action unit can be configured to match X or NOT X.

Link Command Match Action Unit
Link Command Data Match Action Unit Link Command Data Match Action Unit

The Link Command match action unit provides the ability to match a specific link command. Checks for the validity of the CRCs can also be set.

Header Packet Match Action Unit
Header Packet Data Match Action Unit Header Packet Data Match Action Unit

The Header Packet match action unit provides the ability to set a specific data pattern to match in the header packet. The fields of the header packet follow the USB 3.0 specification. The fields available will depend on the type of header packet that is specified.

Data Packet
Data Packet Data Match Action Unit Data Packet Data Match Action Unit

The Data Packet match action unit can match a data pattern in the data payload, up to 1024 bytes in length. Users can enter data in hex, ASCII, binary, decimal, or octal. When data pattern matching is enabled, every data packet will have its data payload matched against as much of the pattern as the data payload size.

The CRC-32 and END Framing combo box can be specified to match a data packet which ends in a valid CRC-32 and END framing (Both valid), an invalid CRC-32 or EDB framing ("Either invalid"), or to ignore these fields entirely ("Both ignored").

Qualified Data Packet
Qualified Data Packet Data Match Action Unit Qualified Data Packet Data Match Action Unit

The Qualified Data Packet match action unit provides the same capabilities as the Data Packet match, but also provides the ability to specify additional parameters such as device, endpoint, stream ID, and data length.

Training Sequences
Training Sequence Data Match Action Unit Training Sequence Data Match Action Unit

The Training Sequence match action unit can match a TS1, TS2, or TSEQ packet. For TS1 and TS2, the data pattern for the Link Configuration Field can be supplied.

Error
USB 3.0 Error Data Match Action Unit USB 3.0 Error Data Match Action Unit

The Error match action unit can match on any packet type which exhibits an error. The errors which can be matched are a CRC error, Framing error, or any unknown packet. Matches of this type cannot be filtered. 

5 Gbit Transmission
USB 3.0 5 Gbit Transmission Data Match Action Unit USB 3.0 5 Gbit Transmission Data Match Action Unit

The 5 Gbit Transmission match action unit can match on the start or stop of 5 Gbit transmission. Matches of this type cannot be filtered.

Conclusion

The USB 3.0 simple and complex matching and triggers capability within the Data Center Software offers users a more advanced way to debug USB systems. By matching on various packet types, data patterns, bus events, and timers, users can perform various actions like asserting external output or triggering a capture, helping to streamline debugging efforts. For more information on USB 3.0 simple and complex matching and triggers and how it can help debug your USB 3.0 application, please email sales@totalphase.com.