|
|||
USB 2.0 PHY Verification
Hugo Cavalcanti, Freescale Semiconductor Inc
Gary Miller, Freescale Semiconductor Inc Austin, TX, USA Abstract: Although there are numerous USB Verification IPs (VIP) offered for the functional verification of the controller side of a high-speed-communication interface, there are few available for the Physical-layer (PHY) compliance testbench. Yet functional verification of the USB 2.0 PHY Physical Layer Macrocell can be an equally complex challenge due to the analog and digital content. One of the challenges in a PHY verification is the fact that a PHY may have complex analog and digital circuits and a sophisticated logic interface to the PHY controller module. Another challenge is the fact that a PHY may have a myriad of implementation options that impact the operation and system topology. (Note that system topology refers to the role that the PHY plays in the network, such as master, slave, dual-role, and the related PHY functions that must be exercised as determined by the associated software stack.) These challenges may imply the need for a PHY level functional verification testbench. In this paper we present a Vera-based reusable environment to verify a USB 2.0 PHY that addresses some of the problems of a typical PHY Verification. Thus, we present the developed VIPs such as monitors, response checkers and functional coverage object needed to be re-used for multiple PHY implementations, as well as potentially in an integrated Controller/PHY testbench. Although the paper is based on a USB 2.0 System, the concepts developed could be used in other PHYs of interest such as Ethernet and PCI-Express. 1.0 Introduction: The Universal Serial Bus (USB) is a serial bus standard to interface devices. First designed to allow connections to the PC without expansion cards, the USB became a de-facto communication standard for almost all electronic devices. The USB communication is always initiated by a Host and responded by a Device. USB Hubs act as switches to expand the number of devices per Host. Special Onthe- Go (OTG) devices can act as either Host or Device and can change roles while connected to other OTG devices [6]. On its 2.0 Standard release, USB permits three speed of communicaiton Low Speed 1.5M bits/s, Full Speed 12 Mbits/s and High Speed 480 Mbits/s. At the high speed frequency it is difficult to synthesize HDL code without modification. That is why the USB Transceiver Macrocell Interface (UTMI) Standard is defined. Comprising complex digital and analog design, the Macrocell or PHY may require as much verification as the controller unit of the USB interface. That’s why the Microcontroller Division (MCD) from Freescale decided to use advanced verification techiniques to verify the UTMI+ PHY as described in this paper. The paper is divided as follows: Section 2.0 of this paper describes the Module Under Verification (MUV). Section 3.0 describe the Verification Plan for the PHY, it also describes methodology, testbench, verification flow and drivers used. Section 4.0 describes the planned stimulus and the randomization constraints used. Finally on section 5.0 we present the conclusions of this work and recommendation for future works. 2.0 Module Under Verification An implementation of USB 2.0 [1] comprises a Serial Interface Engine (SIE), sometimes referred to as a USB controller, and a Transceiver Macrocell. Figure 1 illustrates a peripheral USB controller and Transceiver Macrocell. A host or OTG controller will contain a list processing engine to handle the EHCI/OHCI/UHCI data structures [4] and [5].
The USB 2.0 Transceiver Macrocell comprises the following:
Throughout the document the term PHY will be used to refer to both the logic and analog portions of the USB 2.0 Transceiver Macrocell. 2.1 USB PHY Implementation Options The USB PHY under verification has multiple implementation options based on if it is host, device or OTG controller, and if it is single or multi-ported1. PHY implementations can support several data signaling rates such as high speed (HS), full speed (FS) and low speed (LS). In general, a host or OTG PHY supports all data signalling rates. In our case a device PHY will likely support one of these two options: HS/FS or LS only. 2.2 PHY Signal Interface The interface between PHY and SIE for host, device and OTGimplementations is the UTMI+ interface with small internal changes to increase observability and controllability. Please refer to [3] for further information about the UTMI+ interface. 3.0 USB PHY Verification Plan The USB PHY block is logically verified in a standalone testbench environment. In our case, the supported topology is shown in Figure 2. The environment enables the verification of
3.1 Re-Use Strategy The testbench is designed for re-use on the aforementioned objectives in every technology for which a PHY will be targeted. In the following sections a strategy to facilitate such broad re-use is described. 3.2 Upstream and Downstream PHY Testbench The testbench comprises 2 PHYs connected via the USB bus as illustrated in Figure 2. The main purpose for this configuration is to be able to use behavioral or device models for the analog frontend of both PHYs. Having similar type analog frontend models communicate in Verilog (behavioral models) or analog models(device models) effectively masks USB signal representation differences between model types. 3.3 Custom USB Translator PHY behavior models can use Verilog strenghs or other methods to represent the analog levels required by the USB bus, therefore a Custom USB Translator (CUT) is used to map USB signal representation to our designated internal standard. This translation allows the usage of a common, re-usable USB protocol monitor based on this standard, thus enabling response checkers to utilize transaction information published by the USB bus protocol monitor. 3.4 Strategy for Multi-Port PHY Implementations The Multi-Port PHY is treated as two separate PHYs in the same environment. The testbench allows concurrent stimulus running on the two ports of the PHY. Therefore any stimulus can run on any port of the multi-port PHY. 3.5 Horizontal and Vertical Re-Use of PHY Verification IP Testbench components designed for PHY verification, such as monitors, response checkers and functional coverage, needs to be re-used for multiple PHY implementations, as well as potentially in an integrated SIE/PHY testbench. Additionally, testbench components may need to be promoted to an SoC level testbench. The testbench and all Verification Components are created using a set of Vera Base Classes that together compounds the Freescale’s Verification library. System Verilog Assertions (SVAs) is used as well for freemonitoring and coverage. 3.6 Verification Methodology PHY verification is accomplished with a robust module level testbench. Figure 3 depicts the testbench.
The following testbench components are used:
3.7 Verification Flow In general, the PHY verification flow can be described as follows:
PHY verification is completed when these steps are successfully completed. 3.8 USB 2.0 Driver The USB 2.0 PHY driver is implemented for reuse in different levels of verification. Figure 4 shows the driver class diagram. This driver provides an abstract interface, USB2DrvIf, and this interface allows the stimulus to get a command and run it without knowing specifics of the PHY being tested. Actually, as this is an abstract interface, it could be specialized for PHY, SIE or even SoC test.
4.0 Stimuli Development The main objective of the stimulus is to create traffic through the PHY system to allow checking for the functional features. There can be Stimulus of two types:
Stimulus with access to both ports need to synchronize the transmission and reception of packets, but have freedom to perform as many transactions as necessary. On the other hand, stimulus with access to just one of the ports will take advantage of the responder connected to the other PHY. The stimulus and responder obey some rules, e.g. the PHY acting as a host will always start a transaction and the PHY acting as a device will answer to such transaction. Thus, if connected to just one of the ports the stimulus needs to check for which port it is connected to, and act accordingly. Thus, one of the following stimulus configuration are possible:
The transmission across the PHYs starts with the Stimulus/Responder acting as a Host, and the Stimulus/ Responder acting as a device responds to such transmission. The Stimulus/Responder acting as a Host, in a normal transmission, should take the following steps:
The Stimulus/Responder acting as a device, in a normal transmission, should take the following steps:
Note that since the USB2 Driver interface is abstract, it independent of the PHY, and therefore can be used in any testbench configuration, such as SoC or SIE + PHY. 4.1 Randomization PHY verification simulations comprises random simulations as well as directed test simulations. The random stimulus achieves coverage of the targeted functional coverage attributes. The directed stimulus covers basic cases for debug, connectivity checking and corner cases not easily targeted by random stimulus. Directed stimulus also contains some amount of randomization, such as test order and packet data. The stimulus is not intended to represent realistic USB packet IDs (PIDs) and fields, as this is not necessary for PHY verification. One exception is that the SOF PID is critical to PHY verification and thus will be required. The following parameters are randomized:
5.0 Conclusions and Recommendations The state of the art PHYs requires that we build a dedicated testbench to check for the PHY behavior. There are not a good offerings of VIPs for this purpose. We could find several USB drivers and even UTMI drivers but always focusing on the SIE verification. The modular nature of the testbench and the usage of HLVL helped on the easy and fast setup of the environment as well as on the reuse of the environment for further projects. Therefore one of our conclusions is that the usage of a well structured Object Oriented Base Classes is very important for reuse. The usage of abstract interface is very powerful while it allows the stimulus to be used in other environments in the case on the SIE+PHY environment or at the SoC level. The connection of two PHYs is very interesting while it abstracts the details of the USB bus and allows the usage of the testbench for analog level simulation. This technique should be used with care since it can mask symbiotics problems hidden in the two modules. Although we still didn’t start the mixed signal work, this task is extremely important in these kind of modules, and should be a complement to the task that we have just presented. 6.0 References [1] Universal Serial Bus Specification Revision 2.0 (USB specification) [3] UTMI+ Specification Revision 1.0 (UTMI+) [6] OTG Supplement |
Home | Feedback | Register | Site Map |
All material on this site Copyright © 2017 Design And Reuse S.A. All rights reserved. |