SystemVerilog

Learn SystemVerilog

Move from Verilog syntax to reusable classes, constraints, interfaces, assertions, and verification-oriented code.

What you will learn

Study each lesson by reading the concept, running the example, changing one detail, and checking the resulting behavior. These skills form the language foundation for UVM.

Start with the learning path

SystemVerilog adds the data types, object-oriented programming, constrained randomization, interfaces, assertions, and coverage features used by modern verification environments.

Lesson 6 of 8: Interfaces and Modports

Bundle protocol signals into one reusable connection between a DUT and testbench.

interface simple_bus_if(input logic clk);
  logic valid, ready;
  logic [7:0] data;

  modport master(output valid, data, input ready);
  modport slave(input valid, data, output ready);
endinterface

What to notice

  • The interface replaces several separate port connections.
  • The master drives valid and data.
  • The slave observes those signals and drives ready.
Practice: Add a reset signal and include it in both modports with the correct direction.

Verification habits to build

SkillHabitWhy it matters in UVM
ClassesKeep data and behavior togetherCreates reusable sequence items and configuration objects
ConstraintsGenerate legal, meaningful valuesExplores scenarios without producing invalid noise
InterfacesBundle signals and directionsGives drivers and monitors a stable DUT boundary
AssertionsState timing rules preciselyCatches protocol violations near their cause
CoverageMeasure planned behaviorShows which verification scenarios still need stimulus