Apb SVT Uvm User Guide
Apb SVT Uvm User Guide
Apb SVT Uvm User Guide
VC Verification IP
AMBA APB
UVM User Guide
Version R-2020.12, December 2020
Copyright Notice and Proprietary Information
© 2020 Synopsys, Inc. All rights reserved. This Synopsys software and all associated documentation are proprietary to Synopsys,
Inc. and may only be used pursuant to the terms and conditions of a written license agreement with Synopsys, Inc. All other use,
reproduction, modification, or distribution of the Synopsys software or the associated documentation is strictly prohibited.
www.synopsys.com
VC VIP AMBA APB
UVM User Guide Contents
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
About This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Guide Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Web Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Chapter 1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4 Product Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.5 Language and Methodology Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.6 Features Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.6.1 Protocol Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.6.2 Verification Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.6.3 Methodology Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.7 Features Not Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Chapter 2
Installation and Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.1 Verifying the Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2 Verifying the Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.1 Platform/OS and Simulator Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.2 Synopsys Common Licensing (SCL) Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.3 Other Third Party Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3 Preparing for Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4 Downloading and Installing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4.1 Downloading From the Electronic Software Transfer (EST) System (Download Center) . . . . 15
2.4.2 Downloading Using FTP with a Web Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.5 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.5.1 Licensing Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.5.2 Environment Variable and Path Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.5.3 Determining Your Model Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.5.4 Integrating the VIP into Your Testbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.5.5 Include and Import Model Files into Your Testbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.5.6 Compile and Run Time Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Chapter 3
General Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Feedback
Synopsys, Inc. 3
Contents VC VIP AMBA APB
UVM User Guide
Chapter 4
APB VIP Programming Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.1 Configuration Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.2 Transaction Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.2.1 Analysis Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.3 Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.3.1 Callbacks in the Master Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.3.2 Callbacks in Slave Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.4 Interfaces and modports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.4.1 Modports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.5 Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.6 Overriding System Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.7 Protocol Analyzer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.7.1 Support for VC Auto Testbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.7.2 Support for Native Dumping of FSDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.8 Verification Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Chapter 5
Verification Topologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.1 Master DUT and Slave VIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.2 Slave DUT and Master VIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Chapter 6
Using APB Verification IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.1 SystemVerilog UVM Example Testbenches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.2 Installing and Running the Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.2.1 Defines for Increasing Number of Masters and Slaves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.2.2 Support for UVM version 1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.3 Steps to Integrate the UVM_REG With APB VIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.4 Master to Slave Path Access Coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Appendix A
Reporting Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
A.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
A.2 Debug Automation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
A.3 Enabling and Specifying Debug Automation Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
A.4 Debug Automation Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
A.5 FSDB File Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Feedback
4 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide Contents
A.5.1 VCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
A.5.2 Questa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
A.5.3 Incisive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
A.6 Initial Customer Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
A.7 Sending Debug Information to Synopsys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
A.8 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Feedback
Synopsys, Inc. 5
Contents VC VIP AMBA APB
UVM User Guide
Feedback
6 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide
Preface
Guide Organization
The chapters of this databook are organized as follows:
❖ Chapter 1, “Introduction”, introduces the APB VIP and its features.
❖ Chapter 2, “Installation and Setup”, describes system requirements and provides instructions on
how to install, configure, and begin using the APB VIP.
❖ Chapter 3, “General Concepts”, introduces the APB VIP within an UVM environment and describes
the data objects and components that comprise the VIP.
❖ Chapter 4, “APB VIP Programming Interface”, presents the programming or user interface into the
functionality of the APB Verification IP.
❖ Chapter 5, “Verification Topologies”, describes the topologies to verify master, slave and
interconnect DUT.
❖ Chapter 6, “Using APB Verification IP”, shows how to install and run a getting started example.
❖ Appendix A, “Reporting Problems”, outlines the process for working through and reporting APB
VIP issues.
Web Resources
❖ Documentation through SolvNet: https://solvnetplus.synopsys.com (Synopsys password required)
❖ Synopsys Common Licensing (SCL): http://www.synopsys.com/keys
Feedback
Synopsys, Inc. 7
Preface VC VIP AMBA APB
UVM User Guide
Customer Support
To obtain support for your product, choose one of the following:
1. Go to https://solvnetplus.synopsys.com and open a case.
Enter the information according to your environment and your issue.
2. Send an e-mail message to support_center@synopsys.com.
Include the Product name, Sub Product name, and Tool Version in your e-mail so it can be routed
correctly.
3. Telephone your local support center.
✦ North America:
Call 1-800-245-8005 from 7 AM to 5:30 PM Pacific time, Monday through Friday.
✦ All other countries:
https://www.synopsys.com/support/global-support-centers.html
Feedback
8 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide
1
Introduction
This chapter gives a basic introduction, overview and features of the APB UVM Verification IP.
This chapter discusses the following topics:
❖ Introduction
❖ Prerequisites
❖ References
❖ Product Overview
❖ Language and Methodology Support
❖ Features Supported
❖ Features Not Supported
1.1 Introduction
The APB VIP supports verification of SoC designs that include interfaces implementing the APB
Specification. This document describes the use of this VIP in testbenches that comply with the
SystemVerilog Universal Verification Methodology (UVM).
This approach leverages advanced verification technologies and tools that provide:
❖ Protocol functionality and abstraction
❖ Constrained random verification
❖ Functional coverage
❖ Rapid creation of complex tests
❖ Modular testbench architecture that provides maximum reuse, scalability and modularity
❖ Proven verification approach and methodology
❖ Transaction-level models
❖ Self-checking tests
❖ Object oriented interface that allows OOP techniques
1.2 Prerequisites
❖ Familiarize with APB, object oriented programming, SystemVerilog, and the current version of
UVM.
Feedback
Synopsys, Inc.9
Introduction VC VIP AMBA APB
UVM User Guide
1.3 References
For more information on APB Verification IP, refer to the following documents:
❖ Class Reference for VC Verification IP for AMBA® APB is available at:
$DESIGNWARE_HOME/vip/svt/amba_svt/latest/doc/apb_svt_uvm_class_reference/html/index.html
Feedback
10 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide Introduction
❖ APB4 features
✦ APB Master supports write strobe using PSTRB signal
✦ APB Master supports PPROT signal
Feedback
Synopsys, Inc.11
Introduction VC VIP AMBA APB
UVM User Guide
Feedback
12 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide
2
Installation and Setup
This chapter leads you through installing and setting up the AMBA APB UVM VIP. When you complete
this checklist, the provided example testbench will be operational and the APB UVM VIP will be ready to
use.
The checklist consists of the following major steps:
1. “Verifying the Hardware Requirements”
2. “Verifying the Software Requirements”
3. “Preparing for Installation”
4. “Downloading and Installing”
5. “What’s Next?”
If you encounter any problems with installing the APB VIP, contact Synopsys customer support.
Note
Feedback
Synopsys, Inc.13
Installation and Setup VC VIP AMBA APB
UVM User Guide
Follow the instructions below for downloading the software from Synopsys. You can download from the
Download Center using either HTTPS or FTP, or with a command-line FTP session. If your Synopsys
SolvNet password is unknown or forgotten, go to http://solvnet.synopsys.com.
Passive mode FTP is required. The passive command toggles between passive and active mode. If your FTP
utility does not support passive mode, use http. For additional information, refer to the following web page:
https://www.synopsys.com/apps/protected/support/EST-FTP_Accelerator_Help_Page.html
Feedback
14 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide Installation and Setup
2.4.1 Downloading From the Electronic Software Transfer (EST) System (Download Center)
a. Point your web browser to http://solvnet.synopsys.com.
b. Enter your Synopsys SolvNet Username and Password.
c. Click Sign In button.
d. Make the following selections on SolvNet to download the .run file of the VIP (See Figure 2-1).
i. Downloads tab
ii. VC VIP Library product releases
iii. <release_version>
iv. Download Here button
v. Yes, I Agree to the Above Terms button
vi. Download .run file for the VIP
e. Set the DESIGNWARE_HOME environment variable to a path where you want to install the VIP.
% setenv DESIGNWARE_HOME VIP_installation_path
f. Execute the .run file by invoking its filename. The VIP is unpacked and all files and directories
are installed under the path specified by the DESIGNWARE_HOME environment variable. The .run
file can be executed from any directory. The important step is to set the DESIGNWARE_HOME
environment variable before executing the .run file.
Feedback
Synopsys, Inc.15
Installation and Setup VC VIP AMBA APB
UVM User Guide
The Synopsys AMBA VIP suite includes VIP models for all AMBA interfaces (AHB, APB, AXI, and
Note ATB). You must download the VC VIP for AMBA suite to access the VIP models for AHB, APB, AXI,
and ATB.
If you are unable to download the Verification IP using above instructions, refer to “Customer Support”
Note section to obtain support for download and installation.
Feedback
16 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide Installation and Setup
Note This capability is simulator-specific; not all simulators support license check-in during suspension.
For faster license checkout of Synopsys VIP software please ensure to place the desired license files
Note at the front of the list of arguments to SNPSLMD_LICENSE_FILE.
❖ LM_LICENSE_FILE: The absolute path to a file that contains the license keys for both Synopsys
software and/or your third-party tools.
The Synopsys VIP License can be set in either of the 3 license variables mentioned above with the
Note order of precedence for checking the variables being:
Feedback
Synopsys, Inc.17
Installation and Setup VC VIP AMBA APB
UVM User Guide
Verification IP products are released and versioned by the suite and not by individual model. The
Note version number of a model indicates the suite version.
❖ To determine the versions of VIP models installed in your $DESIGNWARE_HOME tree, use the
setup utility as follows:
% $DESIGNWARE_HOME/bin/dw_vip_setup -i home
❖ To determine the versions of VIP models in your design directory, use the setup utility as follows:
% $DESIGNWARE_HOME/bin/dw_vip_setup -p design_dir_path -i design
If you move a design directory, the references in your testbenches to the include files will need to be
Note revised to point to the new location. Also, any simulation scripts in the examples directory will need to
be recreated.
A design directory gives you control over the version of the Synopsys VIP in your testbench because it is
isolated from the DESIGNWARE_HOME installation. When you want, you can use dw_vip_setup to
update the VIP in your design directory. Figure 2-2 shows this process and the contents of a design
directory.
Feedback
18 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide Installation and Setup
$DESIGNWARE_HOME
dw_vip_setup
<example_1>
<sim_script>
<example_n>
Do not modify this file because dw_vip_setup depends on the original contents.
Note
When using a design_dir, you have to make sure that the DESIGNWARE_HOME that was used to
Note setup the design_dir is the same one used in the shell when running the simulation.
In other words when using a design_dir, you have to make sure that the SVT version identified in the
design_dir is available in the DESIGNWARE_HOME used in the shell when running the simulation.
Feedback
Synopsys, Inc.19
Installation and Setup VC VIP AMBA APB
UVM User Guide
The setup process gathers together all the required component files you need to incorporate into your
testbench required for simulation runs.
You have the choice to set up all of them, or only specific ones. For example, the APB VIP contains the
following components.
❖ apb_master_agent_svt
❖ apb_slave_agent_svt
❖ apb_system_env_svt
You can set up either an individual component, or the entire set of components within one protocol suite.
Use the Synopsys provided tool called dw_vip_setup for these tasks. It resides in
$DESIGNWARE_HOME/bin.
To get help on dw_vip_setup, invoke the following:
% $DESIGNWARE_HOME/bin/dw_vip_setup --help
The following command adds a model to the directory design_dir.
% $DESIGNWARE_HOME/bin/dw_vip_setup -path /tmp/design_dir -add apb_system_env_svt
-svlog
This command sets up all the required files in /tmp/design_dir.
The utility dw_vip_setup creates three directories under design_dir which contain all the necessary model
files. Files for every VIP are included in these three directories.
❖ examples: Each VIP includes example testbenches. The dw_vip_setup utility adds them in this
directory, along with a script for simulation. If an example testbench is specified on the command
line, this directory contains all files required for model, suite, and system testbenches.
❖ include: Language-specific include files that contain critical information for Synopsys models. This
directory "include/sverilog" is specified in simulator commands to locate model files.
❖ src: Synopsys-specific include files This directory "src/sverilog/vcs" must be included in the
simulator command to locate model files.
Note that some components are “top level” and will setup the entire suite. You have the choice to set up the
entire suite, or just one component such as a monitor.
There must be only one design_dir installation per simulation, regardless of the
Attention number of Verification and Implementation IPs you have in your project. Do create this
directory in $DESIGNWARE_HOME.
2.5.4.3 Installing and Setting Up More than One VIP Protocol Suite
All VIPs for a particular project must be set up in a single common directory once you execute the *.run file.
You may have different projects. In this case, the projects can use their own VIP setup directory. However,
all the VIPs used by that specific project must reside in a common directory.
The examples in this chapter call that directory as design_dir, but you can use any name.
In this example, assume you have the AXI suite set up in the design_dir directory. In addition to the AXI
VIP, you require the Ethernet and USB VIP suites.
First, follow the previous instructions on downloading and installing the Ethernet VIP and USB suites.
Once installed, the Ethernet and USB suites must be set up in and located in the same design_dir location
as AMBA. Use the following commands:
Feedback
20 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide Installation and Setup
Feedback
Synopsys, Inc.21
Installation and Setup VC VIP AMBA APB
UVM User Guide
For VIPs with dependency, include the +incdir+ for each dependent VIP.
Note
Feedback
22 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide Installation and Setup
<simulator> is one of: vcsmxvlog mtivlog vcsvlog vcszsimvlog vcsscvlog ncvlog vcszebuvlog
vcsmxpcvlog vcsvhdl vcsmxpipvlog ncmvlog vcspcvlog
-32 forces 32-bit mode on 64-bit machines
-incdir use DESIGNWARE_HOME include files instead of design directory
-verbose enable verbose mode during compilation
-debug_opts enable debug mode for VIP technologies that support this option
-waves [fsdb|verdi|dve|dump] enables waves dump and optionally opens viewer (VCS only)
-seed run simulation with specified seed value
-clean clean simulator generated files
-nobuild skip simulator compilation
-buildonly exit after simulator build
-norun only echo commands (do not execute)
-pa invoke Verdi after execution
2. Invoke the make file with help switch as in:
Usage: gmake
USE_SIMULATOR=<simulator> [VERBOSE=1] [DEBUG_OPTS=1] [SEED=<value>]
[FORCE_32BIT=1] [WAVES=fsdb|verdi|dve|dump] [NOBUILD=1] [BUILDONLY=1] [PA=1]
[<scenario> ...]
Valid simulators are: vcsmxvlog mtivlog vcsvlog vcszsimvlog vcsscvlog ncvlog vcszebuvlog
vcsmxpcvlog vcsvhdl vcsmxpipvlog ncmvlog vcspcvlog
Valid scenarios are: all base_test directed_test random_wr_rd_test
You must have PA installed if you use the -pa or PA=1 switches.
Note
Feedback
Synopsys, Inc.23
Installation and Setup VC VIP AMBA APB
UVM User Guide
Switch Description
-a[dd] ( model Adds the specified model or models to the specified design directory or
[-v[ersion] version] ) … current working directory. If you do not specify a version, the latest version is
assumed. The model names are:
• apb_master_agent_svt
• apb_slave_agent_svt
• apb_system_env_svt
The -add switch causes dw_vip_setup to build suite libraries from the same
suite as the specified models, and to copy the other necessary files from
$DESIGNWARE_HOME.
-r[emove] model Removes all versions of the specified model or models from the design. The
dw_vip_setup program does not attempt to remove any include files used
solely by the specified model or models. The model names are:
• apb_master_agent_svt
• apb_slave_agent_svt
• apb_system_env_svt
-u[pdate] ( model Updates to the specified model version for the specified model or models. The
[-v[ersion] version] ) … dw_vip_setup script updates to the latest models when you do not specify a
version. The model names are:
• apb_master_agent_svt
• apb_slave_agent_svt
• apb_system_env_svt
The -update switch causes dw_vip_setup to build suite libraries from the
same suite as the specified models, and to copy the other necessary files
from $DESIGNWARE_HOME.
Feedback
24 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide Installation and Setup
Switch Description
-e[xample] {scenario | The dw_vip_setup script configures a testbench example for a single model or
model/scenario} a system testbench for a group of models. The program creates a simulator
[-v[ersion] version] run program for all supported simulators.
If you specify a scenario (or system) example testbench, the models needed
for the testbench are included automatically and do not need to be specified in
the command.
Note: Use the -info switch to list all available system examples.
-svtb Use this switch to set up models and example testbenches for SystemVerilog
UVM. The resulting design directory is streamlined and can only be used in
SystemVerilog simulations.
-c[lean] {scenario | model/scenario} Cleans the specified scenario/testbench in either the design directory (as
specified by the -path switch) or the current working directory. This switch
deletes all files in the specified directory, then restores all Synopsys created
files to their original contents.
-h[elp] Returns a list of valid dw_vip_setup switches and the correct syntax for each.
Feedback
Synopsys, Inc.25
Installation and Setup VC VIP AMBA APB
UVM User Guide
Switch Description
-pa Enables the run scripts and Makefiles generated by dw_vip_setup to support
PA. If this switch is enabled, and the testbench example produces XML files,
PA will be launched and the XML files will be read at the end of the example
execution.
For run scripts, specify -pa.
For Makefiles, specify -pa = 1.
-waves Enables the run scripts and Makefiles generated by dw_vip_setup to support
the fsdb waves option . To support this capability, the testbench example
must generate an FSDB file when compiled with the WAVES Verilog macro
set to fsdb, that is, +define+WAVES=\"fsdb\". If a .fsdb file is generated
by the example, the Verdi nWave viewer will be launched.
For run scripts, specify -waves fsdb.
For Makefiles, specify WAVES=fsdb.
-doc Creates a doc directory in the specified design directory which is populated
with symbolic links to the DESIGNWARE_HOME installation for documents
related to the given model or example being added or updated.
-methodology <name> When specified with -doc, only documents associated with the specified
methodology name are added to the design directory. Valid methodology
names include: OVM, RVM, UVM, VMM, and VLOG.
-copy When specified with -doc, documents are copied into the design directory, not
linked.
-s/uite_list <filename> Specifies a file name which contains a list of suite names to be added,
updated or removed in the design directory. This switch is valid only when
following an operation switch, such as, -add, -update, or -remove. Only one
suite name per line and each suite may include a version selector. The default
version is 'latest'. This switch is optional, but if given the filename argument is
required. The lines in the file starting with the pound symbol (#) will be
ignored.
-m/odel_list <filename> Specifies a file name which contains a list of model names to be added,
updated or removed in the design directory. This switch is valid only when
following an operation switch, such as, -add, -update, or -remove. Only one
model name per line and each model may include a version selector. The
default version is 'latest'. This switch is optional, but if given the filename
argument is required. The lines in the file starting with the pound symbol (#)
will be ignored.
-simulator <vendor> When used with the -example switch, only simulator flows associated with
the specified vendor are supported with the generated run script and Makefile.
Note: Currently the vendors VCS, MTI, and NCV are supported.
The dw_vip_setup program treats all lines beginning with “#” as comments.
Note
Feedback
26 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide Installation and Setup
Feedback
Synopsys, Inc.27
Installation and Setup VC VIP AMBA APB
UVM User Guide
These files contain both optional and required switches. For APB VIP, following are the contents of each file,
listing optional and required switches:
vcs_build_options
Required: +define+UVM_PACKER_MAX_BYTES=1500000
Required: +define+UVM_DISABLE_AUTO_ITEM_RECORDING
Optional: -timescale=1ns/1ps
Required: +define+SVT_<model>_INCLUDE_USER_DEFINES
UVM_PACKER_MAX_BYTES define needs to be set to maximum value as required by each VIP title
Note in your testbench. For example, if VIP title 1 needs UVM_PACKER_MAX_BYTES to be set to 8192, and
VIP title 2 needs UVM_PACKER_MAX_BYTES to be set to 500000, you need to set
UVM_PACKER_MAX_BYTES to 500000.
vcs_run_options
Required: +UVM_TESTNAME=$scenario
Feedback
28 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide
3
General Concepts
This chapter describes the usage of APB VIP in an UVM environment, and it’s user interface. This chapter
discusses the following topics:
❖ Introduction to UVM
❖ APB VIP in an UVM Environment
❖ Functional Coverage
❖ Reset Functionality
Feedback
Synopsys, Inc. 29
General Concepts VC VIP AMBA APB
UVM User Guide
Within the master agent, the master driver gets sequences from the master sequencer. The master driver
then drives the APB transactions on the APB port. The master driver and system monitor components
within master agent call callback methods at various phases of execution of the APB transaction. Details of
callbacks are covered in later sections. After the APB transaction on the bus is complete, the completed
sequence item is provided to the analysis port of system monitor, which can be used by the testbench.
Feedback
30 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide General Concepts
Feedback
Synopsys, Inc. 31
General Concepts VC VIP AMBA APB
UVM User Guide
In active mode, Master and Slave components generate In passive mode, master and slave components do not
transactions on the signal interface. generate transactions on the signal interface. These
components only sample the signal interface.
Master and Slave components continue to perform In passive mode, master and slave components monitor
passive functionality of coverage and protocol checking. the input and output signals, and perform passive
You can enable/disable this functionality through functionality of coverage and protocol checking. You can
configuration. enable/disable this functionality through configuration
options.
Feedback
32 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide General Concepts
In active mode, the Port Monitor within the component In passive mode, the port monitor within the component
performs protocol checks only on sampled (input) performs protocol checks on all signals. In passive
signals, that is, it does not perform checks on the mode, signals are considered as input signals.
signals that are driven (output signals) by the
component. This is because when the component is
driving an exception (exceptions are not supported in
this release) the monitor should not flag an error, since
it knows that it is driving an exception. Exception means
error injection.
In active mode, the delay values reported in the APB In passive mode, the delay values reported in the APB
transaction provided by the master and slave transaction provided by the master and slave
component, are the values provided by the user, and components, are the sampled delay values on the bus.
not the sampled delay values.
Feedback
Synopsys, Inc. 33
General Concepts VC VIP AMBA APB
UVM User Guide
Feedback
34 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide General Concepts
Feedback
Synopsys, Inc. 35
General Concepts VC VIP AMBA APB
UVM User Guide
Feedback
36 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide
4
APB VIP Programming Interface
This chapter presents the programming or user interface for the functionality of the APB Verification IP.
This chapter discusses the following topics:
❖ Configuration Objects
❖ Transaction Objects
❖ Callbacks
❖ Interfaces and modports
❖ Events
❖ Overriding System Constants
❖ Verification Features
Feedback
Synopsys, Inc. 37
APB VIP Programming Interface VC VIP AMBA APB
UVM User Guide
User can specify the system level configuration parameters through this class. User needs to provide
the system configuration to the system Env from the environment or the testcase. The system
configuration mainly specifies:
✦ Number of slave agents in the system Env
✦ Sub-configurations for master and slave agents
✦ Virtual top level APB interface
✦ Address map
✦ Timeout values
Feedback
38 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide APB VIP Programming Interface
4.3 Callbacks
Callbacks are an access mechanism that enable the insertion of user-defined code and allow access to objects
for scoreboarding and functional coverage. Each master and slave driver and monitor is associated with a
callback class that contains a set of callback methods. These methods are called as part of the normal flow of
procedural code. There are a few differences between callback methods and other methods that set them
apart.
❖ Callbacks are virtual methods with no code initially, so they do not provide any functionality unless
they are extended. The exception to this rule is that some of the callback methods for functional
coverage already contain a default implementation of a coverage model.
Feedback
Synopsys, Inc. 39
APB VIP Programming Interface VC VIP AMBA APB
UVM User Guide
❖ The callback class is accessible to users so the class can be extended and user code inserted,
potentially including testbench specific extensions of the default callback methods, and testbench
specific variables and/or methods used to control whatever behavior the testbench is using the
callbacks to support.
❖ Callbacks are called within the sequential flow at places where external access would be useful. In
addition, the arguments to the methods include references to relevant data objects. For example, just
before a monitor puts a transaction object into an analysis port is a good place to sample for
functional coverage since the object reflects the activity that just happened on the pins. A callback at
this point with an argument referencing the transaction object allows this exact scenario.
❖ There is no need to invoke callback methods for callbacks that are not extended. To avoid a loss of
performance, callbacks are not executed by default. To execute callback methods, callback class must
be registered with the component using `uvm_register_cb macro.
Feedback
40 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide APB VIP Programming Interface
The top level interface is contained in the system configuration class. The top level interface is specified to
the system configuration class using method svt_apb_system_configuration::set_if. This is also the interface
that is used by the master agent.
The slave interface is contained in the slave configuration class. The slave interface is specified to the slave
configuration class using methods svt_apb_slave_configuration::set_slave_if. The slave interfaces are
provided to the slave configuration objects in the constructor of the system configuration.
4.4.1 Modports
The port interface svt_apb_if contains following modports which users should use to connect VIP to the
DUT:
❖ svt_apb_master_modport
❖ svt_apb_slave_modport
❖ svt_apb_debug_modport
4.5 Events
Master and slave components issue svt_apb_transaction::STARTED and svt_apb_transaction::ENDED
events. These events denote start of transaction and end of transaction events. These notifications are issued
by the master and slave component as described below, in both active and passive mode.
❖ For WRITE transactions, STARTED notification is issued on the rising clock edge when psel and
pwrite are both high.
❖ For READ transactions, STARTED notification is issued on the rising clock edge when psel is high
and pwrite is low.
❖ For WRITE transactions, the ENDED notification is issued on the rising clock edge after a falling
edge of penable.
❖ For READ transactions, the ENDED notification is issued on the rising clock edge after a falling edge
of penable.
Feedback
Synopsys, Inc. 41
APB VIP Programming Interface VC VIP AMBA APB
UVM User Guide
❖ svt_apb_user_defines.svi: Contains override values that you define. This file can reside anywhere--
specify its location on the simulator command line.
To override the SVT_APB_MAX_ID_WIDTH constant from the svt_apb_port_defines.svi file:
❖ Redefine the corresponding symbol in the svt_apb_user_defines.svi file. For example:
`define SVT_APB_MAX_ID_WIDTH 12
❖ In the simulator compile command:
✦ Ensure that the directory containing svt_apb_user_defines.svi is provided to the simulator
✦ Provide SVT_APB_INCLUDE_USER_DEFINES on the simulator command line as follows:
+define+SVT_APB_INCLUDE_USER_DEFINES
Note the following restrictions when overriding the default maximum footprint:
❖ Never use a value of 0 for a MAX_*_WDTH value. The value must be >= 1.
❖ The maximum footprint set at compile time must work for the full design. If you are using multiple
instances of APB VIP, only one maximum footprint can be set and must therefore satisfy the largest
requirement.
Please note that value of less than 32 is not supported for SVT_APB_MAX_ADDR_WIDTH.
Note
SVT_APB_MAX_ADDR_WIDTH only defines the footprint of address port. The actual
used address with is defined by svt_apb_port_configuration::addr_width, which can still
be configured to less than 32.
Protocol Analyzer has been enhanced to read FSDB transactions and Verdi can load the FSDB
Note transactions into Browser.
Feedback
42 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide APB VIP Programming Interface
❖ Invoking Protocol Analyzer: Perform the following steps to invoke Protocol Analyzer in interactive
or post-processing mode:
✦ Post-processing Mode
✧ Load the transaction dump data and issue the following command to invoke the GUI:
verdi -ssf <dump.fsdb> -lib work.lib++
✧ In Verdi, navigate to Tools > Transaction Debug >Transaction and Protocol Analyzer.
✦ Interactive Mode
✧ Issue the following command to invoke Protocol Analyzer in an interactive mode:
<simv> -gui=verdi
Runtime Switch:
+svt_enable_pa=fsdb
Enables FSDB output of transaction and memory information for display in Verdi.
You can invoke the Protocol Analyzer as described above using Verdi. The Protocol Analyzer transaction
view gets updated during the simulation.
Feedback
Synopsys, Inc. 43
APB VIP Programming Interface VC VIP AMBA APB
UVM User Guide
Feedback
44 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide
5
Verification Topologies
This chapter shows you how to connect various types of DUTs to the APB Verification IP. This chapter
discusses the following topics:
❖ Master DUT and Slave VIP
❖ Slave DUT and Master VIP
Feedback
Synopsys, Inc. 45
Verification Topologies VC VIP AMBA APB
UVM User Guide
Figure 5-1 Master DUT and Slave VIP - Usage With Standalone Slave Agent
Figure 5-2 Master DUT and Slave VIP - Usage With System Environment
Feedback
46 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide Verification Topologies
Figure 5-3 Slave DUT and Master VIP - Usage With Standalone Master Agent
Feedback
Synopsys, Inc. 47
Verification Topologies VC VIP AMBA APB
UVM User Guide
Figure 5-4 Slave DUT and Master VIP - Usage With System Environment
Feedback
48 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide
6
Using APB Verification IP
This chapter shows how to install and run a getting started example. This chapter discusses the following
topics:
❖ SystemVerilog UVM Example Testbenches
❖ Installing and Running the Examples
Feedback
Synopsys, Inc.49
Using APB Verification IP VC VIP AMBA APB
UVM User Guide
Feedback
50 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide Using APB Verification IP
Feedback
Synopsys, Inc.51
Using APB Verification IP VC VIP AMBA APB
UVM User Guide
4. To enable the uvm_reg adapter of the APB Master agent, do the following:
Set the uvm_reg_enable, svt_apb_system_configuration attribute to one for the desired APB
Master agent.
apb_sys_cfg.uvm_reg_enable= 1;
5. Modify the uvm_reg tests if required, and execute them.
The complete example in available in the VIP installation (tb_apb_svt_uvm_basic_ral_sys).
Download the example using the dw_vip_setup_utility (see “6.2 Installing and Running the
Note Examples” on page 50).
Feedback
52 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide Using APB Verification IP
Feedback
Synopsys, Inc.53
Using APB Verification IP VC VIP AMBA APB
UVM User Guide
Feedback
54 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide
A
Reporting Problems
A.1 Introduction
This chapter outlines the process for working through and reporting VIP transactor issues encountered in
the field. It describes the data you must submit when a problem is initially reported to Synopsys. After a
review of the initial information, Synopsys may decide to request adjustments to the information being
requested, which is the focus of the next section. This section outlines the process for working through and
reporting problems. It shows how to use Debug Automation to enable all the debug capabilities of any VIP.
In addition, the VIP provides a case submittal tool to help you pack and send all pertinent debug
information to Synopsys Support.
Feedback
Synopsys, Inc. 55
Reporting Problems VC VIP AMBA APB
UVM User Guide
command control specification is not supplied, then the feature will default to being enabled on all VIP
instances with the default options listed as follows:
Note the following about the plusarg:
❖ The command control string is a comma separated string that is split into the multiple fields.
❖ All fields are optional and can be supplied in any order.
The command control string uses the following format (white space is disallowed):
inst:<inst>,type:<string>,feature:<string>,start_time:<longint>,end_time:<longint>,verb
osity:<string>
The following table explains each control string:
Field Description
inst Identifies the VIP instance to apply the debug automation features. Regular expressions can be
used to identify multiple VIP instances. If this value is not supplied, and if a type value is not
supplied, then the debug automation feature will be enabled on all VIP instances.
type Identifies a class type to apply the debug automation features. When this value is supplied then
debug automation will be enabled for all instances of this class type.
feature Identifies a sub-feature that can be defined by VIP designers to identify smaller grouping of
functionality that is specific to that title. The definition and implementation of this field is left to VIP
designers, and by default it has no effect on the debug automation feature. (Specific to VIP titles)
start_time Identifies when the debug verbosity settings will be applied. The time must be supplied in terms
of the timescale that the VIP is compiled. If this value is not supplied, then the verbosity settings
will be applied at time zero.
end_time Identifies when the debug verbosity settings will be removed. The time must be supplied in terms
of the timescale that the VIP is compiled. If this value is not supplied, then the debug verbosity
remains in effect until the end of the simulation.
verbosity Message verbosity setting that is applied at the start_time. Two values are accepted in all
methodologies: DEBUG and VERBOSE. UVM and OVM users can also supply the verbosity that
is native to their respective methodologies (UVM_HIGH/UVM_FULL and
OVM_HIGH/OVM_FULL). If this value is not supplied then the verbosity defaults to
DEBUG/UVM_HIGH/OVM_HIGH. When this feature is enabled, then all VIP instances that are
enabled for debug will have their messages routed to a file named svt_debug.transcript.
Examples:
Enable on all VIP instances with default options:
+svt_debug_opts
Enable on all instances:
❖ containing the string "endpoint" with a verbosity of UVM_HIGH
❖ starting at time zero (default) until the end of the simulation (default):
+svt_debug_opts=inst:/.*endpoint.*/,verbosity:UVM_HIGH
Enable on all instances:
Feedback
56 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide Reporting Problems
The SVT_DEBUG_OPTS option is available through the installed VIP examples, but if required, in
Note customer environments, then a similar feature should be added to their environment.
The PA=FSDB option is available in public examples and is required to enable Verdi libraries, and that
when this option is used, then the Debug Opts file will record VIP activity to a file named
svt_model_log.fsdb.
In addition, the SVT Automated Debug feature will enable waveform generation to an FSDB file, if the
Verdi libraries are available. When enabled this feature, it should cause the simulator to dump
waveform information only for the VIP interfaces.
When this feature is enabled then all VIP instances that have been enabled for debug will have their
messages routed to a file named svt_debug.transcript.
Feedback
Synopsys, Inc. 57
Reporting Problems VC VIP AMBA APB
UVM User Guide
A.5.1 VCS
The following must be added to the compile-time command:
-debug_access
For more information on how to set the FSDB dumping libraries, see Appendix B section in Linking Novas
Files with Simulators and Enabling FSDB Dumping guide available at:
$VERDI_HOME/doc/linking_dumping.pdf.
A.5.2 Questa
The following must be added to the compile-time command:
+define+SVT_FSDB_ENABLE -pli novas_fli.so
A.5.3 Incisive
The following must be added to the compile-time command:
+define+SVT_FSDB_ENABLE -access +r
Feedback
58 Synopsys, Inc.
VC VIP AMBA APB
UVM User Guide Reporting Problems
3. Use the VIP case submittal tool to pack a file with the appropriate debug information. It has the
following usage syntax:
$DESIGNWARE_HOME/bin/snps_vip_debug [-directory <path>]
The tool will generate a “<username>.<uniqid>.svd” file in the current directory. The following files
are packed into a single file:
✧ FSDB
✧ HISTL
✧ MISC
✧ SLID
✧ SVTO
✧ SVTX
✧ TRACE
✧ VCD
✧ VPD
✧ XML
If any one of the above files are present, then the files will be saved in the
"<username>.<uniqid>.svd" in the current directory. The simulation transcript file will not be part of
this and it will be saved separately.
The -directory switch can be specified to select an alternate source directory.
4. You will be prompted by the case submittal tool with the option to include additional files within the
SVD file. The simulation transcript files cannot be automatically identified and it must be provided
during this step.
5. The case submittal tool will display options on how to send the file to Synopsys.
A.8 Limitations
Enabling DEBUG or VERBOSE verbosity is an expensive operation, both in terms of runtime and disk space
utilization. The following steps can be used to minimize this cost:
❖ Only enable the VIP instance necessary for debug. By default, the +svt_debug_opts command
enables Debug Opts on all instances, but the 'inst' argument can be used to select a specific instance.
❖ Use the start_time and end_time arguments to limit the verbosity changes to the specific time
window that needs to be debugged.
Feedback
Synopsys, Inc. 59
Reporting Problems VC VIP AMBA APB
UVM User Guide
Feedback
60 Synopsys, Inc.