Verification Academy

Search form

My Account Menu

  • Register
  • Log In
  • Topics
  • Courses
  • Forums
  • Patterns Library
  • Cookbooks
  • Events
  • More
  • All Topics
    The Verification Academy offers users multiple entry points to find the information they need. One of these entry points is through Topic collections. These topics are industry standards that all design and verification engineers should recognize. While we continue to add new topics, users are encourage to further refine collection information to meet their specific interests.
    • Languages & Standards

      • Portable Test and Stimulus
      • Functional Safety
      • Design & Verification Languages
    • Methodologies

      • UVM - Universal Verification Methodology
      • UVM Framework
      • UVM Connect
      • FPGA Verification
      • Coverage
    • Techniques & Tools

      • Verification IP
      • Simulation-Based Techniques
      • Planning, Measurement, and Analysis
      • Formal-Based Techniques
      • Debug
      • Clock-Domain Crossing
      • Acceleration
  • All Courses
    The Verification Academy is organized into a collection of free online courses, focusing on various key aspects of advanced functional verification. Each course consists of multiple sessions—allowing the participant to pick and choose specific topics of interest, as well as revisit any specific topics for future reference. After completing a specific course, the participant should be armed with enough knowledge to then understand the necessary steps required for maturing their own organization’s skills and infrastructure on the specific topic of interest. The Verification Academy will provide you with a unique opportunity to develop an understanding of how to mature your organization’s processes so that you can then reap the benefits that advanced functional verification offers.
    • Universal Verification Methodology (UVM)

      • Advanced UVM
      • Basic UVM
      • Introduction to UVM
      • UVM Connect
      • UVM Debug
      • UVMF - One Bite at a Time
    • Featured Courses

      • Introduction to ISO 26262
      • Introduction to DO-254
      • Clock-Domain Crossing Verification
      • Portable Stimulus Basics
      • Power Aware CDC Verification
      • Power Aware Verification
      • SystemVerilog OOP for UVM Verification
    • Additional Courses

      • Assertion-Based Verification
      • An Introduction to Unit Testing with SVUnit
      • Evolving FPGA Verification Capabilities
      • Metrics in SoC Verification
      • SystemVerilog Testbench Acceleration
      • Testbench Co-Emulation: SystemC & TLM-2.0
      • Verification Planning and Management
      • VHDL-2008 Why It Matters
    • Formal-Based Techniques

      • Formal Assertion-Based Verification
      • Formal-Based Technology: Automatic Formal Solutions
      • Formal Coverage
      • Getting Started with Formal-Based Technology
      • Handling Inconclusive Assertions in Formal Verification
      • Sequential Logic Equivalence Checking
    • Analog/Mixed Signal

      • AMS Design Configuration Schemes
      • Improve AMS Verification Performance
      • Improve AMS Verification Quality
  • All Forum Topics
    The Verification Community is eager to answer your UVM, SystemVerilog and Coverage related questions. We encourage you to take an active role in the Forums by answering and commenting to any questions that you are able to.
    • UVM Forum

      • Active Questions
      • Solutions
      • Replies
      • No Replies
      • Search
      • UVM Forum
    • SystemVerilog Forum

      • Active Questions
      • Solutions
      • Replies
      • No Replies
      • Search
      • SystemVerilog Forum
    • Coverage Forum

      • Active Questions
      • Solutions
      • Replies
      • No Replies
      • Search
      • Coverage Forum
    • Additional Forums

      • Announcements
      • Downloads
      • OVM Forum
  • Patterns Library
    The Verification Academy Patterns Library contains a collection of solutions to many of today's verification problems. The patterns contained in the library span across the entire domain of verification (i.e., from specification to methodology to implementation—and across multiple verification engines such as formal, simulation, and emulation).
    • Implementation Patterns

      • Environment Patterns
      • Stimulus Patterns
      • Analysis Patterns
      • All Implementation Patterns
    • Specification Patterns

      • Occurrence Property Patterns
      • Order Property Patterns
      • All Specification Patterns
    • Pattern Resources

      • Start Here - Patterns Library Overview
      • Whitepaper - Taking Reuse to the Next Level
      • Verification Horizons - The Verification Academy Patterns Library
      • Contribute a Pattern to the Library
  • All Cookbooks
    Find all the methodology you need in this comprehensive and vast collection. The UVM and Coverage Cookbooks contain dozens of informative, executable articles covering all aspects of UVM and Coverage.
    • UVM Cookbook

      • UVM Basics
      • Testbench Architecture
      • DUT-Testbench Connections
      • Configuring a Test Environment
      • Analysis Components & Techniques
      • End Of Test Mechanisms
      • Sequences
      • The UVM Messaging System
      • Other Stimulus Techniques
      • Register Abstraction Layer
      • Testbench Acceleration through Co-Emulation
      • Debug of SV and UVM
      • UVM Connect - SV-SystemC interoperability
      • UVM Versions and Compatibility
      • UVM Cookbook
    • Coding Guidelines & Deployment

      • Code Examples
      • UVM Verification Component
      • Package/Organization
      • Questa/Compiling UVM
      • SystemVerilog Guidelines
      • SystemVerilog Performance Guidelines
      • UVM Guidelines
      • UVM Performance Guidelines
    • Coverage Cookbook

      • Introduction
      • What is Coverage?
      • Kinds of Coverage
      • Specification to Testplan
      • Testplan to Functional Coverage
      • Bus Protocol Coverage
      • Block Level Coverage
      • Datapath Coverage
      • SoC Coverage Example
      • Requirements Writing Guidelines
      • Coverage Cookbook
  • All Events
    No one argues that the challenges of verification are growing exponentially. What is needed to meet these challenges are tools, methodologies and processes that can help you transform your verification environment. These recorded seminars from Verification Academy trainers and users provide examples for adoption of new technologies and how to evolve your verification process.
    • Upcoming & Featured Events

      • The Digital Twin: An Aerospace and Defense Revolution - March 9th
      • VIP solutions for Protocol and Memory Verification  - March 11th
      • Advance your Designs with Advances in CDC and RDC - March 23rd
      • Webinar Calendar
    • On Demand Seminars

      • The ABC of Formal Verification
      • I'm Excited About Formal...
      • 2020 Functional Verification Study
      • All On-Demand Seminars
    • Recording Archive

      • Improving Your SystemVerilog & UVM Skills
      • Should I Kill My Formal Run?
      • Visualizer Debug Environment
      • All Recordings
    • Conferences

      • DVCon 2020
      • DAC 2019
      • All Conferences
    • Mentor Learning Center

      • SystemVerilog Fundamentals
      • SystemVerilog UVM
      • View all Learning Paths
  • About Verification Academy
    The Verification Academy will provide you with a unique opportunity to develop an understanding of how to mature your organization's processes so that you can then reap the benefits that advanced functional verification offers.
    • Blog & News

      • Verification Horizons Blog
      • Academy News
      • Academy Newsletter
      • Technical Resources
    • Verification Horizons Publication

      • Verification Horizons - November 2020
      • Verification Horizons - July 2020
      • Verification Horizons - March 2020
      • Issue Archive
    • About Us

      • Verification Academy Overview
      • Subject Matter Experts
      • Contact Us
    • Training

      • Questa® & ModelSim®
      • Questa® inFact
      • Functional Verification Library
  • Home
  • Verification Horizons
  • November 2016
  • USB Type-C Verification: Challenges and Solution

USB Type-C Verification: Challenges and Solution

Verification Horizons - Tom Fitzpatrick, Editor

USB Type-C Verification - Challenges and Solution by Suraj Parkash Gupta and Zeeshan Yousuf, Mentor Graphics

The standard USB connector that we are most familiar with is USB Type-A. Even as the USB data interface moved from USB1 to USB2 and then to USB3, the connector has remained the same. It is a massive connector and plugs in only one way.

These limitations are resolved by the USB Type-C connector. In addition to its flexibility and small size, the USB Type-C connector handles the larger power requirements of today’s USB ports. It also supports a variety of different protocols using “alternate modes,” which allows using adapters that can output HDMI, VGA, Display Port, or other types of connections from a single USB port.

The main advantages of a USB Type-C connector are:

  • Transports up to 100 W of power
  • Removes user confusion about plug orientation
  • Supports legacy USB standards, such as USB2.0, USB3.1, and USB Power Delivery (PD)
  • Provides alternate-mode support for standards like HDMI, VGA, Display Port, etc.

For these reasons, the USB Type-C connector is expected to replace existing USB, power, and display related connectors on tablets, laptops, and desktops.

This article describes the challenges faced in the verification of USB Type-C connectors and of USB Type-C connectors integrated with USB PD. It also provides insights into how Questa® Verification IP (QVIP) with mixed-signal SystemVerilog constructs helps overcome these challenges.

INTRODUCING USB TYPE-C

USB Type-C is a 24-pin reversible-plug connector for USB devices and USB cabling. The USB Type-C connectors connect to both hosts and devices, replacing various Type-A and Type-B connectors.

Figure 1: The USB Type-C connector


This double-sided connector provides pins for super-speed data, high-speed data, cable orientation detection, and dedicated BMC configuration data channels for USB PD communications. Connecting an older device to a host with a USB Type-C receptacle requires a cable or an adapter with a USB Type-A or Type-B plug or receptacle on one end and a USB Type-C plug on the other end.

While the USB Type-C interconnect no longer physically differentiates plugs on a cable as being either an USB A-type or B-type, the USB interface still maintains a host-to-device logical relationship.

The standard concept for setting up a valid connection between a source and sink is based on being able to detect terminations residing in the product being attached. USB Type-C involves cable orientation detection and establishment of the power roles (source-sink) and data roles (host-device). Both of these require monitoring of the voltage (V), resistance (R), and current (I) values on the configuration channel (CC) pins of the connector.

Figure 2: USB Type-C connector pin usage


With the USB Type-C connector, a source may implement higher source current to enable faster charging of mobile devices. The USB host and hubs advertise the level of current presently available via the CC pins. Three current levels are defined by the USB Type-C standard at the default Vbus :

  • Default values, as defined by a USB standard (500 mA for USB2.0 ports, 900 mA for USB3.1 ports)
  • 1.5 A
  • 3.0 A.

Figure 3: USB Type-C source/sink roles are established with pull-up (Rp) and pull-down (Rd) resistors


Initially, a source exposes independent pull-up (Rp) terminations on its CC1 and CC2 pins, and a sink exposes independent pull-down (Rd) terminations on its CC1 and CC2 pins. The source-to-sink combination of this circuit configuration represents a valid connection. Once the sink is powered, the sink monitors CC1 and CC2 for a voltage greater than its local ground. The CC pin that is at a higher voltage (i.e., pulled up by Rp in the source) indicates the orientation of the plug, and a valid connection is established.

Figure 4: USB Type-C functional model


VERIFICATION CHALLENGES

The key challenges faced in the verification of USB Type-C designs and their integration with USB PD have to do with these features:

  • Establishment of the initial power (source-to-sink) relationship using the two (CC1 and CC2) pins on the USB Type-C receptacle
  • Establishment of the initial data (host-to-device) relationship using the two (CC1 and CC2) pins on the USB Type-C receptacle
  • Plug orientation and cable twist detection
    - Un-flipped straight-through connection (CC1 with CC1)
    - Flipped straight-though connection (CC2 with CC2)
    - Un-flipped twisted-through connection (CC1 with CC2)
    - Flipped twisted-through connection (CC2 with CC1)
  • Collision resolution
    - This is required when both the ports try to act as source (or sink). In this case, the collision needs to be resolved by making sure that one of the two ports backs out and decides to take up the other role, so that a source-sink connection can be established.
  • USB Type-C VBUS current range detection
    - Default value (500 mA for USB2 and 900mA for USB3.1)
    - 1.5 A
    - 3.0 A
  • USB PD communication
    - The USB PD Bi-phase Mark Coded (BMC) communications are carried on the CC wire of the USB Type-C cable.
  • Set up and manage power and accessory modes
  • Dynamic detach detection and re-attach
    - In this scenario, the source monitors the attached CC pin and the sink monitors the VBUS to detect detach.
  • VCONN detection
    - Since only a single CC pin position (either CC1 or CC2) within each plug of the cable is connected through the cable, the other CC pin that is not connected through the standard cable is repurposed to the source Vconn to supply power to the local plug. Initially, the source supplies Vconn and the source of Vconn can be swapped using USB PD VconnSwap.

All these features need to be verified thoroughly to make sure that a USB Type-C design works properly. This requires constant monitoring and resolution of the current (I), resistance (Rp, Rd, and Ra), and voltage (V) values on the CC1 and CC2 pins of the receptacle. Thus the verification IP must be capable of performing mixed-signal simulations. Since the USB PD communication also happens on the connected CC pin, the verification IP must also provide a seamless method of integrating USB Type-C interfaces with USB PD interfaces.

QUESTA VERIFICATION IP SOLUTION

Using the latest constructs of SystemVerilog mixed signal modeling, QVIP provides a user-friendly solution to the USB Type-C verification challenges and the integration of USB Type-C with USB PD. QVIP also provides a ready-to-use exhaustive test suite (along with functional coverage) for both USB Type-C and USB PD, enabling complete verification of USB Type-C and USB PD features.

Figure 5: USB Type-C and PD QVIP integration with DUT


Following are the main features provided by QVIP.

  • Source-sink detection and dynamic power role switching
    - QVIP provides flexibility to configure the initial power role of the QVIP and starts advertising/monitoring current and voltage accordingly. Once the roles are decided based on the resultant voltage on the CC pins, QVIP also provides flexibility to switch the power roles (source-to-sink and vice-versa) dynamically.
  • Host-device detection and dynamic data role switching
    - QVIP provides flexibility to configure the initial data role of the QVIP, and once the power connection is established, the QVIP starts operating in the configured role. QVIP also provides flexibility to switch the data roles (host-to-device and vice-versa) dynamically.
  • Plug orientation and twisted cable detection
    - Using mixed signaling constructs of SystemVerilog, the QVIP is able to detect the USB Type-C plug orientation and establish the connection accordingly. QVIP also provides flexibility of straight and twisted cable connections.
  • Collision resolution
    - Based on the current and resistance values advertised by the two ports on the CC1 and CC2 pins, it is possible that the resolution might not happen if both ports want to operate as source (and similarly if both ports want to operate as sink). In this case, QVIP provides collision resolution by switching its role and drives the CC1/CC2 pins according to the switched role.
  • USB PD communication
    - QVIP provides a seamless integration of USB Type-C with USB PD. Once the USB Type-C connection has been established, the USB PD communications are enabled.
  • Accessory modes support
    - QVIP supports all types of accessories (audio, debug, and powered). QVIP can also be configured to operate as one of the accessories.
  • Dynamic detach
    - While the USB PD communications are in progress, it is possible that the USB Type-C connection might get lost, due to the absence of VBUS or a change in current. QVIP is able to handle these situations, and it also provides flexibility to switch roles during re-attach.
  • Error injection
    - QVIP provides support for different types of error injection in the USB Type-C signaling and USB PD communications.
  • Data recovery
    - The USB PD standard defines the unit interval in the range of 3.03 µs to 3.70 µs, which means that the bit width of the data transmitted can lie in this range. QVIP is capable of receiving the data sent at any frequency within this range. QVIP also provides configuration to generate the data at varying frequencies.
  • QVIP as policy engine
    - QVIP can be configured to operate as the policy engine where the CC line will not be driven by QVIP. Instead the QVIP will provide instructions to the PHY DUT about the packets to be transmitted and will take appropriate actions after receiving any packet.
  • Sequence library
    - QVIP provides an exhaustive test plan to verify the DUT. More than 150 sequences are provided in the test plan. Each sequence provides the option for randomization of various fields and an error injection capability.
  • Functional coverage
    - QVIP provides functional coverage for both USB PD and USB Type-C to ensure that all corner cases get covered. Certain modes of USB Type-C coverage can also be switched-off based on the DUT supported configuration.
  • Scoreboarding
    - Data integrity checks are performed on the USB PD data transfers.
  • Ease of debugging
    - QVIP provides various debug options to make the debugging easier, which includes a transaction logger, USB Type-C signals in waveform, and protocol assertions.

Figure 6: USB PD functional coverage


Figure 7: USB Type-C functional coverage


Figure 8: Transaction logger


Figure 9: USB Type-C signaling


CONCLUSION

“The Type-C plug is a big step forward,” says Jeff Ravencraft, chairman of the USB Implementers Forum (USB-IF), the organization that oversees the USB standard. “It might be confusing at first during the transition, but the Type-C plug could greatly simplify things over time by consolidating and replacing the larger USB connectors.” This clearly shows that USB Type-C is the way forward. Questa Verification IP provides an easy and user friendly solution for the verification of USB Type-C and USB PD features.

QVIP provides a solution to the mixed signal verification challenges involved with USB Type-C signaling. The comprehensive sequence library reduces the stimulus generation time, and easy debug components reduce debugging and verification time.

To learn more about QVIP, you can visit several whitepapers on mentor.com, including Verifying Display Standards – A comprehensive UVM based Verification IP Solution and Verification IP Stimulus APIs – Are They Really Easy to Use?

REFERENCES

  1. USB Type-C Specification Release 1.2, March 25, 2016
  2. USB Power Delivery Specification Revision 2.0, V1.2, August 2, 2016
  3. USB Type-C Port Controller Interface Specification, Revision 1.0, V1.1, July 2016

Back to Top

Table of Contents

Verification Horizons Articles:

  • Sometimes the Life of a College Student and a Verification Engineer Aren't All That Different

  • How to Get the Maximum Out of Your Assertion and Coverage Based Verification Methodology

  • USB Type-C Verification: Challenges and Solution

  • INs and OUTs of CAN Verification—A Comprehensive UVM-based Solution

  • 24 x 7 Productivity: Veloce® Enterprise Server App Does the Job

  • Power Aware Libraries - Standardization and Requirements for Questa® Power Aware

  • Improving Performance and Verification of a System Through an Intelligent Testbench

Siemens Digital Industries Software

Siemens Digital Industries Software

##TodayMeetsTomorrow

Solutions

  • Cloud
  • Mendix
  • Siemens EDA
  • MindSphere
  • Siemens PLM
  • View all portfolio

Explore

  • Digital Journeys
  • Community
  • Blog
  • Online Store

Siemens

  • About Us
  • Careers
  • Events
  • News and Press
  • Newsletter
  • Customer Stories

Contact Us

USA:

phone-office +1 800 547 3000

See our Worldwide Directory

  • Contact Us
  • Support Center
  • Give us Feedback
©2021 Siemens Digital Industries Software. All Rights Reserved.
Terms of Use Privacy Cookie Policy