Debugging USB3: Waveform + Protocol Analyzer

We have all debugged SOC and IP level issues using signal level waveforms. Its a tedious and laborious process. Are there any ways that can make design debug easier? Wouldn’t it be great if I could look at fully decoded packets and transactions instead of signal toggles? In this series of posts, we will try to come up with the best way to look at some typical interfaces in order to reduce debug effort and increase productivity.

USB3

USB3 is a high-speed serial protocol that provides a peripheral interface for high bandwidth devices such as flash drives and cameras. The USB3 protocol specifies that the Host controls the communication with Devices by exchanging following types of signaling, sequences and packets:

  • Link Command Packets
  • Transaction Packets (Headers and data packets)
  • Training Sequences
  • LFPS

Additionally, USB defines software level transfers that are composed of individual transactions that are composed of transaction packets.

For debugging USB3 related issues, you need to know what’s going on on the interface. You might need answers to questions such as:

  • What packets have been transmitted?
  • Have requests been correctly acknowledged?
  • Have the required link level flow control packets been exchanged?
  • How many packets was a software level transfer broken up into?
Can waveforms give you quick answers to these questions? A waveform will show you the serialized packets on a wire interface. You will then need to decode the contents of the packet by hand. Of course, there are other complications, for example:
  • USB3 permits bursting of packets so requests and acknowledgements get pipelined. This makes it difficult to find the corresponding acknowledgement for a request.
  • Different endpoints act as parallel threads and their packets get interleaved on the interface making it difficult to make sense of traffic
All this means that answering a simple question and getting basic information is a tough task, if we are looking at waveforms that have only signal level details.
An example waveform is shown below:

usb3_lgood7_wf

Wouldnt it be great if there was a tool that could analyze the signal level activity in a waveform and give you easy to digest information? This is what out PDA tool does!

The corresponding activity shown by our PDA tool is as follows:

usb3_lgood7_pda

The input for the waveform and PDA is the same, but the output is very different.

As you can see, the PDA tool recognizes all the USB3 packets and also decodes various fields of the packets into spec defined names and values. For example, figuring out when the last LGOOD_7 was sent would take you 5-10 minutes using the waveform whereas using PDA you can get the same information in less than 30 seconds!

When used along with a traditional waveform viewer, the PDA tool provides excellent debug visibility and traceability; from signal level to transaction level.

If this looks interesting to you, please have a look at a short 3 minute demo video here. (No earphones? No worries! It has subtitles!)

[update] PDA is better than a VIP monitor because:

1. It analyzes signal dumps, so the data presented is more accurate and correlatable with waveforms. No changes are required in the verification environment to get this debug information
2. It can report transaction level activity on internal interfaces which are not driven by a VIP (RTL to RTL interfaces)
3. The GUI allows capability to filter, search and even perform DIFF. All these analysis features are protocol aware
4. The tool provides data in a form that allows engineers to automate analysis and debug tasks using simple Python scripts. This is difficult with text log files dumped by monitors
5. Since this tool analyzes signal activity, it works equally well for Emulation. For example, it can analyze PIPE signals from an emulation run to extract USB transactions

Contact us for more details!

Author: Aditya Mittal

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s