UVM Runtime Elaboration
By performing the runtime elaboration of a UVM test, you can view testbench structures accurately reflecting the configuration at start of simulation.
Go to the UVM menu and Select Verification Top.
Pick a test and check Perform UVM runtime elaboration.
Alternatively, press the T button in the Verification Hierarchy view toolbar. Any runtime elaboration of a test is automatically saved and you can later select it as a Verification Top.
The output of the UVM elaboration is printed in the Console View.
Double click on the left vertical bar to add / remove a breakpoint. If you set any breakpoint in the source code, you are prompted to switch to the Debug Perspective. Elaboration suspends whenever a breakpoint is reached.
The Debug View presents all the threads and the current call stack.
The Variables View presents variable values in the current scope.
The Breakpoints View presents all the breakpoints and their enablement state.
You can also add printouts without altering the source code by using tracepoints. Right click on the left vertical bar to add a tracepoint. You can use only a $display() statement in the editable textbox below the breakpoints list, however its arguments may call other functions.
DPI-C Handling
The UVM runtime elaboration involves DPI-C method calls. DVT has a built-in library of UVM DPI-C implementations. To use it simply check the corresponding box in the verification top selection dialog.
- If user-defined DPI-C functions are involved in the elaboration, specify the required shared objects in the Additional arguments textarea using the standard - sv_lib, - sv_liblist and - sv_root flags, for example:
-sv_lib /path/to/dpic.so
From the Project menu you can Generate the DPI-C header stubs required for the C compilation. Headers, C++ sources and object files are created in the dvt.data/native.bridge/headers directory located in the project root.
DPI-C Troubleshooting
This section covers several debugging directives you can use if you encounter issues when working with DPI-C methods:
+dvtx_native_verbosity |
The UVM Runtime Elaboration displays the name of the executed import/export DPI-C methods in the Console. |
---|---|
+dvtx_native_trace |
The UVM Runtime Elaboration logs debug information as part of the C/C++ native evaluation. |
+dvtx_native_no_gen |
Provides the ability to edit the automatically generated DPI-C stubs. |
+dvtx_native_jimpl_uvm |
Use the built-in library of UVM DPI-C implementations. |
Note
If you need any of these directives, you need to add them in the Additional arguments text area.
- At any time, you can set a system variable in the build configuration file to change the location of dvt.data as follows:
+dvt_setenv+DVT_DATA=/path/to/dvt/data