Hub Latency Calculation using Beagle 5000 Analyzer – Total Phase
Hub Latency Calculation using Beagle 5000 Analyzer

Introduction

Calculating hub latency is a common use case for the Beagle 5000 analyzer. There are several ways to do this with the Beagle 5000 analyzer, including using Data Center, or the Beagle analyzer API. Using the Beagle 5000 analyzer with the Data Center software makes it extremely easy to calculate hub latency. With a few Data Center clicks the user can get hub latency report including the highest, lowest, and average values of the delta time statistics across packets. This article focuses on how to setup hub, target device, and host with two Beagle analyzers in order to calculate hub latency. Although the following describes the USB 3.0 4-Port SIIG hub, Windows 7 64 bit, and Super-Speed flash stick, similar steps can be used for other devices. The goal of this article is to demonstrate how to sync two Beagle 5000 analyzers, and then use the analyzers for the hub latency calculation.

Overview

In this article we use a hub system and two Beagle 5000 analyzers. For the first Beagle analyzer the Windows 7 64 bit machine is used as the target host and the USB 3.0 4-Port SIIG hub is used as the target device. For the second Beagle analyzer the USB 3.0 4-Port SIIG hub is used as the target host and the Super-Speed flash stick is used as the target device. For both Beagle analyzers the Windows 7 64 bit is used as the analysis device.

Figure 1: Hub System Block Diagram

It's first helpful to understand Data Center Sync process and the different operations and parameters provided by Data Center Hub Latency.

Hub Latency View Parameters

The Data Center Hub Latency View can be used to evaluate latency of USB hubs. The view is accessible in the application toolbar by clicking VIEW and choosing Hub Latency View. It also opens automatically when one of Log sync packet time commands is executed. The operations and parameters provided by Data Center Hub Latency View are described below.

    • Start time - Displays the time when the hub latency test began, which is when the first record was added to this view.

 

    • Beagle 5000 v2 #1/Beagle 5000 v2 #2 - Display the serial numbers of the Beagle 5000 analyzers connected to the current and the other Data Center at the start of a test, if any. These fields can be modified, and they are used only for generation of the hub latency report.

 

    • Export - Generates Hub latency report in CSV format.

 

    • Hub Latency table - Contains latency information for individual packets and has the following columns:
      • B1 Index – Index of the packet in the Transaction View in the current Data Center.
      • B1 Time – Timestamp of the packet in the current Data Center.
      • B2 Index – Index of the packet in the Transaction View in the other Data Center.
      • B2 Time – Timestamp of the packet in the other Data Center.
      • Delta Time – Latency of the packet over the USB hub.

 

    • wHubDelay reported - The wHubDelay value in the Hub Descriptor captured by one of the Beagle analyzers. This value is applicable only for Super-Speed hubs.

 

    • Highest/Lowest/Average Value - Delta Time statistics across the packets in the current view.

 

    • Sample Size - Number of samples with valid data.

 

    • Table's context menu - Contains the following commands:
      • Remove - Remove all selected rows from the table.
      • Remove duplicates - Remove all rows with duplicate B1 Index value, leaving only the first occurrence of each.

 

    • Double-clicking the row in the table will highlight the matching packets in both Data Center instances.

 

Hub Latency Calculation

For USB 3.0 packets, the latency value is the difference between the start time captured by the Beagle 5000 farther from the transmitter and the end time captured by the Beagle 5000 closer to the transmitter. Only the following Super-Speed packet types are supported for latency calculation:

    • Transaction Packet
    • Data Packet Header
    • Isochronous Timestamp

For USB 2.0 packets, the latency value is the difference between the start time captured by the Beagle 5000 farther from the transmitter and the start time captured by the Beagle 5000 closer to the transmitter. Only the following High-Speed packet types are supported for latency calculation:

    • These tokens: OUT, IN, SETUP, PING, EXT, LPM, SOF, NAK, NYET, and STALL
    • DATA and ACK tokens captured as part of the IN, OUT, SETUP, PING, or EXT

Log sync packet time command

Clicking Log sync packet time will calculate latency for the selected packet and add the result into the Hub Latency View. The matching packet will become highlighted in the other Data Center Transaction View.

This command is available only if selected packet is supported for latency calculation. These packets are always the inner most records in the Transaction View and can be found by expanding the higher-level transaction records. They can also be made visible by clicking on + (Expand All) button at the bottom of the transaction view, or changing the view to Packet View.

Batch log sync packet time command

Batch log sync packet time allows adding data to the Hub Latency View for several packets at a time. Clicking it will open a Hub Latency Options Dialog with the following options:

    • USB3 TP - De-selecting it will exclude all USB 3.0 Transaction Packets from calculations.

 

    • USB3 DPH - De-selecting it will exclude all USB 3.0 Data Packet Header Packets from calculations.

 

    • USB3 ITP - De-selecting it will exclude all USB 3.0 Isochronous Timestamp Packets from calculations.

 

    • USB2 packets - De-selecting it will exclude all USB 2.0 Packets from calculations.

 

    • Number of packets - Number of packets to be added to the Hub Latency View. The maximum allowed number is 500. This command will find the specified number of eligible packets starting at the current selection, calculate latency for each packet and add results into the Hub Latency View.

 

Cross-Analyzer Synchronization

Two HDMI ports on the back of the Beagle USB 5000 analyzer allow two or more analyzers to synchronize their capture timestamps, as well as their capture start, capture trigger, and capture stop events. Data Center Cross-Analyzer Sync feature is automatically enabled when two or more Beagle USB 5000 analyzers are properly connected by their back panel HDMI ports.

Any time a Sync-connected analyzer triggers, a trigger signal is sent to the other analyzers in the Sync chain. The trigger signal tells the other analyzers to trigger their captures (advancing past pre-trigger). Any time a Sync-connected analyzer has its capture stopped, a stop signal is sent to the other analyzers in the Sync chain. The stop signal tells the other analyzers to stop their captures. These capture event signals can be accepted or ignored on a per-analyzer and per-signal basis. In Data Center, these options are presented in the form of two check boxes Accept Cross Trigger and Accept Cross Capture Stop.

USB HUB Latency Calculation Guidelines

    1. Download and run the latest version of the Total Phase USB Drivers Installer.
    2. Download and unzip the latest version of Data Center. (?)
    3. Connect Beagle-1 analysis connector to PC-1. Connect Beagle-1 target host connector to PC-2. Connect Beagle-1 target device connector to hub main connector. (?)
    4. Connect Beagle-2 analysis connector to PC-1. Connect Beagle-2 target host connector to hub port connector. Connect Beagle-2 target device connector to flash stick. (?)
    5. Connect Beagle-1 HDMI SYNC IN connector to Beagle-2 HDMI SYNC OUT connector. (?)
    6. Launch Data Center - 1 and Data Center - 2 on the same computer. (?)
    7. Turn on Beagle-1. (?)
    8. Connect Beagle-1 to Data Center - 1. (?)
      1. Click Analyzer.
      2. Click Connect to Analyzer.
      3. Select Beagle-1.
      4. Click OK to connect to Beagle-1.
    9. Turn on Beagle-2. (?)
    10. Connect Beagle-2 to Data Center - 2. (?)
      1. Click Analyzer.
      2. Click Connect to Analyzer.
      3. Select Beagle-2.
      4. Click OK to connect to Beagle-2.
    11. On both Data Center instances enable Accept Cross Trigger and Accept Cross Capture Stop in Device Settings window. (?)
    12. On both Data Center instances disable Trigger Immediately and enable Infinite Capture in Device Settings window. (?)
    13. On both Data Center instances disable Target Power button in Capture Control Window. (?)
    14. On both Data Center instances click Analyzer -> Run Capture (?).

      Figure 2: Data Center 1 - Run Capture

      Figure 3: Data Center 2 - Run Capture

    15. On Data Center - 1 click Trigger Capture button. This will cause both instances of Data Center to start capture.

      Figure 4: Data Center 1 - Trigger Capture

      Figure 5: Data Center 2 - Trigger Capture

    16. On both Data Center instances enable Target Power button in Capture Control Window.
    17. Let the capture for some time.
    18. On Data Center - 1 click Analyzer -> Stop Capture.
    19. On Data Center - 2 click OK on the "The capture has ended..." message.

      Figure 6: Data Center 1 - Stope Capture

      Figure 7: Data Center 2 - Stop Capture

    20. On both Data Center click Edit -> Preference -> enable "Create a remote console...".
    21. On Data Center - 2 right click on an IN packet in the the Transaction View. Choose "Batch log sync packet time". Enter 100 in the "Number of Packets", enable all 4 options, click OK. This will cause the Hub Latency View window to appear in Data Center - 2.

      Figure 8: Data Center 2 - Batch Log Sync Packet Time

      Figure 9: Data Center 2 - Hub Latency View Basic

    22. On Data Center - 2, pop out the Hub Latency View window by dragging out of the dock. This window can be enlarged like any other window. On Data Center - 2, mark a row in Hub Latency View, view the Delta Time for the relevant packets, and verify that the relevant packets are marked in the transaction view in both Data Center instances.  In the example below, row 3 is selected in the Hub Latency View and index 153889 is highlighted in Data Center - 2 and index 161859 is highlighted in Data Center - 1.  The delta time between these indices is 178ns, which is the hub latency.

      Figure 10: Data Center 1 - Hub Latency View

      Figure 11: Data Center 2 - Hub Latency View

Notes

For additional information, take a look at the Beagle analyzer manual, and Data Center manual.

Have more questions? Submit a request