SoC being designed today are getting complex day by day and verification complexity increases exponentially not only due to the complexity of design but also due to the complexity of protocols. Emerging new protocols make it further difficult due to steep learning curve. Writing test cases to cover the entire protocol becomes 3-4 man year job for complex protocols like USB, PCIe, and Ethernet etc. Synopsys provides System Verilog/UVM source code test suites to verify complex protocols. Source code is provided and tests can be extended, and customized easily. You can save the efforts and time by using Synopsys test suites to jump start verification and achieve accelerated coverage closure. In this blog, we will give an overview of the USB test suite focusing on ease of integration and use.
The USB VIP Test Suite provides a common testbench for a type of USB DUT. For example, there is a common testbench tb_dut_usb_device for device DUT and a common testbench tb_dut_usb_host for host DUT. Different testbenches for other possible type of USB DUT are also provided. The testbench for a host DUT connected to a device VIP provides a host driver to translate data objects to DUT specific API sequences. There is also an xHCI driver for generic xHCI register model and memory operations, for example to create a command TRB and write it to a command ring, ring the command doorbell and watch the command completion event TRB. The testbench for a device DUT connected to a host VIP provides a device driver to translate data objects to DUT specific API sequences.
The intended connection with the DUT is achieved using the specific “connection parameter” in the top module. Tests for the intended “connection type” can be run in the testbench. The particular test configures the testbench environment through a configuration object. Testbench level environment (TB_Env) basically consists of two sub-environments: Host_Env and Device_Env, also TB_Env level virtual sequencer and TB_Env level collection of sequences. Host/Device Env consists of Host/Device_Env level virtual sequencer and Host/Device_Env level collection of sequences. So sequence written at the TB_Env level can be targeted to the Host/Device_Env level virtual sequencer. Virtual sequencer at this Host/Device_Env level consists of usb_transfer_sequencer and usb_service_sequencer and virtual_usb_sequencer. In the Host/Device driver, transfer/service received is either processed using the xHCI model (host DUT as USB controller) or can be redirected to virtual_usb_sequencer in Host/Device_Env which connects to sequencers of VIP agent and the processing of transfer/service is done by the VIP.
To integrate Synopsys USB VIP Test Suite to DUT, following SystemVerilog interfaces are used:
Figure shown below is an example of testbench for USB controller DUT with following settings:
Authored by Karim Aoua