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.

Open the Command Palette and invoke the DVT: Select Verification Hierarchy Top command.

Pick a test and check Perform UVM runtime elaboration.

../../_images/vscode_sv_select_top_webview.png

Alternatively, press the top-icon button in the Verification Hierarchy view header. 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 Debug Console.

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 Run & Debug View. Elaboration suspends whenever a breakpoint is reached.

The Call Stack View presents all the threads and the current call stack.

../../_images/vscode_call_stacks_view.png

The Variables View presents variable values in the current scope.

../../_images/vscode_variables_view.png

The Breakpoints View presents all the breakpoints and their enablement state.

../../_images/vscode_breakpoints_view.png

You can also add printouts without altering the source code by using logpoints. Right click on the left vertical bar and select Add Logpoint…. You can use only a $display() statement in the editable textbox below the breakpoints list, however its arguments may call other functions.

../../_images/vscode_logpoint.png

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 Command Palette invoke the DVT: Generate DPI-C Stubs command to generate the DPI-C header stubs command required for the C compilation. Headers, C++ sources and object files are created in the dvt_dpic directory located in the currently opened folder (project root). Particularly if your project uses DPI-C exports you need to specify as additional argument the generated dvt_dpic/dvt_lib_export.so.