RTL Studio Open IDE

0.1 · UVM CLASS

Hello UVM: macros and uvm_info

Introduce UVM logging with uvm_info in a console-first testbench without UVM components.

Watch on YouTube

What you practice

Hello UVM: macros and uvm_info (0.1). Introduce UVM logging with uvm_info in a console-first testbench without UVM components. It is in Hello UVM — Part 0 · UVM Warming Up of the UVM Masterclass. How SystemVerilog classes evolve into the UVM verification framework.

The UVM bench compiles in that same browser SystemVerilog simulator. You edit the test in the IDE, run Verilator, and read the log beside the waveform.

What you will learn

You will learn how to enable UVM macros and use uvm_info to print messages in a SystemVerilog testbench.

Learning objectives

  • Include uvm_macros.svh in your testbench.
  • Import uvm_pkg and call uvm_info with correct arguments.
  • Observe UVM info messages in the simulation log.
  • Distinguish UVM logging from $display.

Theory

UVM (Universal Verification Methodology) provides standardized logging, reporting, and component hierarchy.

Macro / FunctionPurpose
` include "uvm_macros.svh" ``Enables UVM macros like uvm_info, uvm_error, etc.
import uvm_pkg::*;Imports UVM package definitions (required for macros to expand).
` uvm_info(id, msg, verbosity) ``Logs a message with ID, string content, and verbosity level.

uvm_info requires three arguments: a string ID (e.g., "HELLO"), a message string, and a verbosity level (e.g., UVM_LOW). Messages appear in the simulation log only if the configured verbosity threshold allows them.

Practice

  1. Open RtlStudio and select this chapter — all files appear in Explore.
  2. Open student/tb/tb_top.sv from the Explore tree.
  3. In the initial block, replace the __TODO__ with a correct uvm_info call.
  4. Run Simulation from the left sidebar and check the Log panel.
  5. Confirm the INFO: banner and uvm_info output appear before INFO: PASS.

Summary

You practiced enabling UVM macros by including uvm_macros.svh and importing uvm_pkg to prepare a minimal testbench environment. You successfully invoked uvm_info with the correct arguments to log a message and confirmed its appearance in the simulation output alongside a $display statement. This exercise verified that UVM logging is properly integrated and established a reliable baseline for future testbench components. The key takeaway is that uvm_info serves as a standardized, verbosity-controlled console logging primitive essential for debugging and monitoring UVM simulations.

Run it in the Verilog IDE

  1. Open the UVM workspace in the IDE. The DUT and the testbench compile together in the browser.
  2. Run the SystemVerilog simulation with Verilator and read the phase and scoreboard lines in the log.
  3. When the check is on pins rather than a print, open the VCD next to that log.
  4. Edit the sequence, driver, or scoreboard in the IDE and rerun. You stay in the same simulator.

The lesson is done when the simulation matches Hello UVM: macros and uvm_info. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.