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

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • Start Here6
  • 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 Dive36
  • SystemVerilog Assertions — Interview-Critical Deep Dive40
  • Functional Coverage in SystemVerilog22
  • Testbench Architecture in SystemVerilog23
  • Advanced Language & Integration25
  • Senior & Interview Preparation21
  • Principal-Level Verification28
Loading lesson

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

Part 1 · Language Foundations · Intermediate

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

It covers

Interface Basics

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

Modports

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

Clocking Blocks

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

Interface BFM

A parameterized bundle with automatic read and write tasks.

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.

Interview

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 lessonReport an error

See also

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