Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutRoadmapCareersInternshipsFAQContactPrivacyTerms
Skip to lesson

Course contents

  • Start Here5
  • SystemVerilog Language Foundations28
    • SystemVerilog Data Types
    • Arrays: Packed, Dynamic, Queues & Associative
    • Procedural Code & Scheduling
    • Operators, Expressions & Width Rules
    • Packages, Typedefs & Compilation
    • Interfaces, Modports & Clocking Blocks
      • Interface Basics
      • Modports
      • Clocking Blocks
      • Interface BFM
  • Object-Oriented SystemVerilog for Verification30
  • Constraint Randomization — Interview-Critical Deep Dive39
  • SystemVerilog Assertions — Interview-Critical Deep Dive41
  • Functional Coverage in SystemVerilog25
  • Testbench Architecture in SystemVerilog24
  • Advanced Language & Integration26
  • Senior & Interview Preparation23
  • Principal-Level Verification34
Loading lesson

←SystemVerilog Language Foundations
  1. Topics
  2. SystemVerilog
  3. SystemVerilog Language Foundations
  4. Interfaces, Modports & Clocking Blocks

Part 1 of 9Part 1 of 9/Language FoundationsIntermediate

Interfaces, Modports & Clocking Blocks

Bundle bus signals into one port, add direction views, and sample and drive race-free.

  • 4topics
  • 4lessons

An interface bundles the signals of a bus into one named, instantiable object. That single idea fixes three chronic problems at once: port-list sprawl (a wide bus becomes one port), connection errors (signals travelling together cannot be cross-wired), and testbench races (clocking blocks give every component the same race-free view).

An interface turns a port list into one port.

The lessons build in order: bundle the signals, restrict direction with modports, add clocking blocks for timing discipline, then parameterize the bundle and embed bus-functional tasks. Classes reach all of it through a virtual interface: a class-side handle whose value is set at runtime to point at one real, elaborated interface instance. That handle now lives in the virtual interfaces topic.

Construct

What it contributes

A signal bundle

One port instead of N; cross-wiring disappears at the language level.

A modport

A named direction view per role; wrong-direction drives fail at compile time.

A clocking block

Pre-edge sampling plus skewed driving, shared by every testbench component.

Parameters plus tasks

One reusable bundle that also knows its own pin choreography.

Lesson

Path

It covers

Interface Basics

Required

Declaring the bundle, sharing one instance, and named versus generic ports.

Modports

Recommended

Mirror-image DUT and testbench views and the limits of what they check.

Clocking Blocks

Required

Skewed sampling and driving, cycle counting, and the one-path rule.

Interface BFM

Recommended

A parameterized bundle with automatic read and write tasks.

Path: Required is the core first pass for this part's goal, a self-checking testbench; Recommended is what most learners should read; Optional is reference, specialist or revision material to return to later.

Check yourself Two modules each instantiate their own bus_if and connect one side each. What happens?

Both compile and nothing communicates. Each instance is a separate copy of the nets. Only modules holding the same instance share signals.

Two questions recur. “Do modports add signals?” No: they are named direction views over the same nets. “Does a clocking block change the DUT?” No: it only changes when testbench code samples and drives.

PreviousNext: Interface Basics

Up next

Up nextInterface Basics

Sign in to save progress

Practice this lessonPrevious lessonReport an error

See also

  • SystemVerilog Data Types
  • Arrays: Packed, Dynamic, Queues & Associative
  • Procedural Code & Scheduling