UVM-ML Quick Start Guide: 31 July, 2014
UVM-ML Quick Start Guide: 31 July, 2014
UVM-ML Quick Start Guide: 31 July, 2014
31 July, 2014
31-Jul-14
Copyright 2013 Cadence Design Systems, Inc. (Cadence). All rights reserved.
Cadence Design Systems, Inc., 2655 Seely Ave., San Jose, CA 95134, USA.
Copyright 2013 Advanced Micro Devices, Inc. (AMD). All rights reserved.
Advanced Micro Devices, Inc. , One AMD Place, P.O. Box 3453, Sunnyvale, CA 94088, USA.
This product is licensed under the Apache Software Foundations Apache License, Version 2.0 (the
"License") January 2004. The full license is available at: http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing permissions and limitations under the
License.
Notices
31-Jul-14
Contents
Introduction to UVM-ML .............................................................................................................................. 4
The UVM-ML Package ............................................................................................................................... 4
Package Installation .................................................................................................................................. 5
Demos ........................................................................................................................................................... 5
Demo 1: Producer Consumer SC-SV-e ...................................................................................................... 6
SC-SV-e Demo Location ......................................................................................................................... 6
Running the SC-SV-e Demo ................................................................................................................... 7
SC-SV-e Demo Results ........................................................................................................................... 7
Demo 2: Unified hierarchy SC-SV .............................................................................................................. 9
Unified Hierarchy Demo Location ....................................................................................................... 10
Running the Unified Hierarchy SC-SV Demo ....................................................................................... 11
Unified Hierarchy Demo Results ......................................................................................................... 11
Demo 3: Unified hierarchy SV-e .............................................................................................................. 13
Unified Hierarchy Demo Location ....................................................................................................... 13
Running the Unified Hierarchy SV-e Demo ......................................................................................... 14
Unified Hierarchy Demo Results ......................................................................................................... 14
Demo 4: Unified hierarchy e-SV .............................................................................................................. 15
Unified Hierarchy Demo Location ....................................................................................................... 16
Running the Unified Hierarchy e-SV Demo ......................................................................................... 17
Unified Hierarchy Demo Results ......................................................................................................... 17
Sequence Layering Demos ...................................................................................................................... 18
Additional Examples................................................................................................................................ 18
Conclusion ............................................................................................................................................... 18
Trouble Shooting......................................................................................................................................... 18
Demos do not run ................................................................................................................................... 18
Test or demo fail with error: ncvlog: *E,NOPBIND ................................................................................. 19
setup.sh fails with error message: sc_utils_ids.cpp:110: error: ... ......................................................... 19
Errors during compilation of a demo ...................................................................................................... 19
Elaboration error when running a demo or test ..................................................................................... 20
Multiple uvm_pkg ................................................................................................................................... 20
No components instantiated .................................................................................................................. 20
UVM-ML Quick Start
31-Jul-14
Introduction to UVM-ML
UVM-ML enables interoperability in multi-language verification environments. It provides methodology
and tools to integrate verification components into a larger verification environment and enables them
to communicate in a coordinated environment. It is a natural extension of the UVM-SV standard in the
multi-language domain.
The central component is a backplane that enables the control and data communication between the
various components using a well defined API. The various components of the verification environment
are implemented in different frameworks which communicate with the backplane through adapters.
This architecture can support many use cases involving integration of verification components that were
developed in different languages and different methodologies. Just to mention a few:
Incorporating a VIP developed in one language into an environment written in a different
language.
Integrating an SoC verification environment built out of legacy verification components.
Connecting a high level stimulus generator to multiple drivers in different languages.
UVM-ML provides an open architecture that can be extended by new features. This release already
supports TLM communication between the frameworks, unified hierarchy where verification
components from different frameworks can be structured in a logical hierarchy, thus providing central
control of the multi-language environment using hierarchical configuration and hierarchical phase
control.
The UVM-ML release package contains the code and documentation needed to apply the methodology.
Start with installing the package as described in the README_INSTALLATION.txt file at the top
directory of the package.
Once installed, use this QuickStart.pdf for first experience with the methodology using the
various demos.
Further reading is available in the white paper that provides in depth discussion of the
requirements, use cases, leading concepts and terminology in ml/docs/misc_docs/uvm-mlwhitepaper.pdf.
For the testbench integrator there is a User Guide explaining in detail how to integrate a UVMML verification environment in ml/docs/basic_docs/IntegratorUserGuide.pdf.
For developers of adapters there is an Adapter Developer Guide that describes how to develop
an adapter for a new framework in ml/docs/misc_docs/AdapterGuide.pdf.
31-Jul-14
Examples
Documentation
If you are using the OSCI SystemC simulator you must download and install it from the Accellera
downloads site.
Package Installation
To install the UVM-ML package, untar it in a clean directory and follow the instructions in the
README_INSTALLATION.txt file in the top directory.
In case of issues with the installation consult the trouble shooting section at the end of this document.
Demos
This Quick Start document provides you with the minimal amount of information you need to run, and
explore the results of the demos. Different demos are provided for different use cases. There is
considerable repetition of explanation to enable you to explore just the most appropriate demo for your
needs.
The demos provide sample code demonstrating the use of the main capabilities provided with the
library, which are the UVM-ML Backplane that connects several sample Frameworks written in different
languages.
There are four demos in the examples directory.
31-Jul-14
31-Jul-14
% cd $UVM_ML_HOME/ml/examples/prod_cons/sc_sv_e
To run the demo with Synopsys tools and OSCI SystemC, use the following command line:
% demo.sh VCS
To run the demo with Mentor tools and OSCI SystemC, use the following command line:
% demo.sh QUESTA
31-Jul-14
The following listing is a small example from the log file that is generated by the demo.
31-Jul-14
64:
64:
SV consumer::put
SV consumer::put returns
17
SV consumer::put
SV consumer::put returns
18
SV consumer::put
SV consumer::put returns
19
17
18
19
In each section you can see messages from two language frameworks, including the time stamps
indicating coordinated simulation.
The first section in the listing above, shows non-blocking TLM2 transactions generated in the
SystemVerilog framework, targeted to the e consumer. The transactions containing random address and
data are written to the e framework and then read back, comparing the result to the original
transaction.
31-Jul-14
10
31-Jul-14
To run the demo with Synopsys tools and OSCI SystemC, use the following command line:
% demo.sh VCS
To run the demo with Mentor tools and OSCI SystemC, use the following command line:
% demo.sh QUESTA
11
31-Jul-14
12
31-Jul-14
The first section in the listing above, shows the pre-run phases as they alternate between the SV and SC
frameworks as the environment is constructed and then the ports bound across the frameworks.
13
31-Jul-14
To run the demo with Synopsys tools and OSCI SystemC, use the following command line:
% demo.sh VCS
To run the demo with Mentor tools and OSCI SystemC, use the following command line:
% demo.sh QUESTA
14
31-Jul-14
The following listing is a small example from the log file that is generated by the demo.
UVM_INFO @ 0: uvm_test_top [svtop] SV svtop::new uvm_test_top
Generating the test with IntelliGen using seed 1...
UVM_INFO @ 0: uvm_test_top [svtop] SV svtop::build
UVM_INFO @ 0: uvm_test_top.sv_env [sv_env] SV sv_env::new sv_env
UVM_INFO @ 0: uvm_test_top.sv_env [sv_env] SV sv_env::build
UVM_INFO @ 0: uvm_test_top.sv_env.producer [prod_type] SV producer::new
UVM_INFO @ 0: uvm_test_top.sv_env.consumer [cons_type] SV consumer::new
UVM_INFO @ 0: uvm_test_top.sv_env.consumer [cons_type] SV consumer::build
UVM_INFO @ 0: uvm_test_top.sv_env.producer [prod_type] SV producer::build
UVM_INFO @ 0: uvm_test_top.sv_env.consumer [cons_type] SV consumer::connect
uvm_test_top.sv_env.consumer
UVM_INFO @ 0: uvm_test_top [svtop] SV svtop::connect uvm_test_top
UVM_INFO @ 0: uvm_test_top.sv_env.consumer [cons_type] SV consumer::resolve_bindings
uvm_test_top.sv_env.consumer
UVM_INFO @ 0: uvm_test_top [svtop] SV env::resolve_bindings uvm_test_top
UVM_INFO @ 0: uvm_test_top.sv_env.consumer [cons_type] SV consumer::end_of_elaboration
uvm_test_top.sv_env.consumer
UVM_INFO @ 0: uvm_test_top [svtop] SV env::end_of_elaboration uvm_test_top
Starting the test ...
Running the test ...
UVM_INFO @ 0: uvm_test_top.sv_env.consumer [cons_type] SV consumer::start_of_simulation
uvm_test_top.sv_env.consumer
UVM_INFO @ 0: uvm_test_top [svtop] SV env::start_of_simulation uvm_test_top
*** Starting non-blocking TLM2 transactions from e
[10] producer-@6: Calling nb_transport_fw WRITE 0xd0 0xe4 0x59 0x60
UVM_INFO @ 10: uvm_test_top.sv_env.consumer [cons_type] SV consumer::nb_transport_fw
UVM_TLM_WRITE_COMMAND [0x0000000000004123] = d0 e4 59 60 (status=INCOMPLETE)
UVM_INFO @ 15: uvm_test_top.sv_env.consumer [cons_type] SV consumer responds
UVM_TLM_WRITE_COMMAND [0x0000000000004123] = d0 e4 59 60 (status=OK)
[15] producer-@6: Received nb_transport_bw TLM_OK_RESPONSE phase= BEGIN_RESP
[20] producer-@6: Calling nb_transport_fw READ 0x00 0x00 0x00 0x00
UVM_INFO @ 20: uvm_test_top.sv_env.consumer [cons_type] SV consumer::nb_transport_fw
UVM_TLM_READ_COMMAND [0x0000000000004123] = 00 00 00 00 (status=INCOMPLETE)
[20] producer-@6: nb_transport READ returned 0xd0 0xe4 0x59 0x60
UVM_INFO @ 25: uvm_test_top.sv_env.consumer [cons_type] SV consumer responds
UVM_TLM_READ_COMMAND [0x0000000000004123] = d0 e4 59 60 (status=OK)
[25] producer-@6: Received nb_transport_bw TLM_OK_RESPONSE phase= BEGIN_RESP
*** Starting blocking TLM2 transactions from e
...
The output shows the construction of the testbench starting with the UVM-SV test component. Both the
UVM-e IP and the UVM-SV IP are generated from the testbench during the build phase. The test
component controls the construction of both IP using the configuration mechanism.
During the run phase the IP are communicating by passing blocking and non-blocking transactions in
both directions.
15
31-Jul-14
16
31-Jul-14
To run the demo with Synopsys tools and OSCI SystemC, use the following command line:
% demo.sh VCS
To run the demo with Mentor tools and OSCI SystemC, use the following command line:
% demo.sh QUESTA
The following listing is a small example from the log file that is generated by the demo.
*** Starting non-blocking TLM2 transactions from e
[10] producer-@7: Calling nb_transport_fw WRITE 0xd0 0xe4 0x59 0x60
UVM_INFO @ 10: sys.testbench.sv_child.consumer [cons_type] SV consumer::nb_transport_fw
UVM_TLM_WRITE_COMMAND [0x0000000000001000] = d0 e4 59 60 (status=INCOMPLETE)
[10] producer-@7: return status TLM_ACCEPTED END_REQ
UVM_INFO @ 10: sys.testbench.sv_child.consumer [cons_type] SV consumer::respond
UVM_TLM_WRITE_COMMAND [0x0000000000001000] = d0 e4 59 60 (status=OK)
[10] producer-@7: Received nb_transport_bw TLM_OK_RESPONSE phase= BEGIN_RESP
[20] producer-@7: Calling nb_transport_fw READ 0x00 0x00 0x00 0x00
UVM_INFO @ 20: sys.testbench.sv_child.consumer [cons_type] SV consumer::nb_transport_fw
UVM_TLM_READ_COMMAND [0x0000000000001000] = 00 00 00 00 (status=INCOMPLETE)
[20] producer-@7: return status TLM_ACCEPTED END_REQ
[20] producer-@7: nb_transport READ returned 0xd0 0xe4 0x59 0x60
UVM_INFO @ 20: sys.testbench.sv_child.consumer [cons_type] SV consumer::respond
UVM_TLM_READ_COMMAND [0x0000000000001000] = d0 e4 59 60 (status=OK)
[20] producer-@7: Received nb_transport_bw TLM_OK_RESPONSE phase= BEGIN_RESP
...
The output shows the IP communicating by passing blocking and non-blocking transactions in both
directions.
17
31-Jul-14
Additional Examples
Additional small examples are available under the $UVM_ML_HOME/ml/examples/features
directory with makefiles to run each test. These examples check for proper behavior of specific features,
such as ML TLM communication, and synchronized ML testbench construction.
Conclusion
This Quick Start provided you with the basic information you need to install, run, and view the results of
the SC-SV demo and the SV-e demo that are supplied with the UVM Multi-Language package. For more
information about UVM go to UVM World at: http://www.uvmworld.org
Trouble Shooting
It is recommended to clean the work environment and retry the simulation when the error indication
does not make sense. The tools (like irun) are trying to minimize the work by skipping steps that need
not be repeated. This may cause problem especially if you switch simulators or machines.
One way to do this is make clean. If you dont use the makefiles included in the package, make sure to
clean the work directory, remove the INCA_libs for IES or the equivalent in other simulators.
Following are some identified issues users might hit, and the recommended solutions for them:
If this does not solve the problem run the test_install.sh script and attach the output with the content of
the setup.captured.sh script to your support request.
source $UVM_ML_HOME/ml/test_install.sh
18
31-Jul-14
Explanation: For UVM-ML one must use the ML ready UVM-SV library included in the release. This error
message is received when the UVM_HOME environment variable is set to a different path which does
not contain the ML ready version of UVM-SV.
Solution: Unset the UVM_HOME environment variable
% unsetenv UVM_HOME
Explanation: This is a known issue with the Accellera SystemC (open source) version systemc-2.2.0 when
compiled with GNU C++ version above 4.3. See http://openesl.org/systemc-wiki/Installation for more
information.
Solution: The suggested solution is to use the patch in the link above or manually modify
sysc/utils/sc_utils_ids.cpp so that it will explicitly include the following files:
#include "string.h"
#include "cstdlib"
Solution: Verify that the environment variables are set properly and the packages are in the place
pointed by the environment variable e.g.
setenv OSCI_INSTALL ... /2.2/g++-4.4.5-pic
setenv OSCI_SRC ... /systemc-2.2.0
setenv TLM2_INSTALL ... /TLM-2009-07-15/include/tlm
19
31-Jul-14
Solution: irun must pass the appropriate arguments to the linker as shown in irun_uvm_ml.64.f
irun f $UVM_ML_HOME/ml/tests/irun_uvm_ml.64.f ...
Multiple uvm_pkg
Problem: Verilog compilation reports multiple uvm_pkg
ncvlog: *E,MULTPK (...): Multiple (2) packages named "uvm_pkg" were found in
the searched libraries
Explanation: If different parts of the code are compiled with different versions of UVM-SV, a conflict is
detected by the Verilog compiler. This could be a result of creating a snapshot with the default version in
the IES release and then adding on top the UVM-ML OA version.
Solution: Make sure all the code is compiled with the same version included in the UVM-ML OA
installation.
No components instantiated
Problem: The simulator reports that no components were instantiated.
UVM_FATAL @ 0: reporter [NOCOMP] No components instantiated. You must either
instantiate at least one component before calling run_test or use run_test to
do so. To run a test using run_test, use +UVM_TESTNAME or supply the test name
in the argument to run_test(). Exiting simulation.
Explanation: The cause for this may be that the users UVM-SV code includes a call to run_test() despite
the fact that this is a UVM-ML OA environment in which only uvm_ml_run_test() should be called. In
this case there is a conflict between UVM-SV and UVM-ML, both attempting to drive the simulation.
Solution: In UVM-ML OA verification environments use only uvm_ml_run_test() and remove the call to
run_test().
20
31-Jul-14
Explanation: The cause of this failure is the difference between the currently used Specman version and
the one used in installing UVM-ML OA.
Solution: UVM-ML OA must be rebuilt with the current Specman version. Use the clean flag with the
install.csh script.
21
31-Jul-14