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 Here4
  • UVM Foundations14
  • UVM Phases & Simulation Lifecycle26
  • Factory & Configuration15
  • Transaction-Level Modeling (TLM)13
  • UVM Sequences & Stimulus21
  • UVM Agents & Protocol VIP21
  • Environment & Test Classes11
    • Environment Architecture
    • Tests: Base Classes, Selection and Startup
      • Base Test Pattern: One Contract for Every Scenario
      • Scenario Inheritance: Specialize Intent, Not Infrastructure
      • Factory Overrides in Tests: Explicit, Local, Reviewable
      • Shared run_phase: One End-of-Test Policy for Every Test
      • +UVM_TESTNAME and Plusargs: Runtime Test Selection
      • Top Module and run_test Startup
      • Designing a Test Library
  • Checking & Coverage in UVM21
  • UVM Register Abstraction Layer (RAL)22
  • Advanced UVM in Practice13
  • Debug & Regression10
  • Coding Practice47
  • Verification in Industry Practice10
  • Senior Prep: Architecture, Leadership and Interviews32
Loading lesson

‹Environment & Test Classes
  1. Topics
  2. UVM Verification
  3. Environment & Test Classes
  4. Tests: Base Classes, Selection and Startup

Part 7 · Environment & Tests · Intermediate

Tests: Base Classes, Selection and Startup

A learning map for the test layer of the DMA bench: dma_base_test and its helpers, nine scenario tests, overrides, end of test, +UVM_TESTNAME, the top module and designing a test library.

  • 7topics
  • 7lessons
On this page

    The DMA bench compiles once and runs nine different scenarios: a smoke job, random jobs, a truncated packet, a scoreboard-owned drain, a deliberate hang, a virtual sequence, output backpressure, a reset in the middle of a packet, and an interrupt agent. Every one of them is a small class that extends dma_base_test, and every one is picked at run time by a single plusarg. This topic is about that layer: what the base test owns, what a derived test is allowed to change, and how the whole set grows into a regression without turning into copy-paste.

    What you will be able to do

    • Say what belongs in a base test and what does not, and defend the helpers reg_write, reg_read and run_job that the bench's base test provides.

    • Read any derived test as a scenario: one sentence of intent, and exactly what it changes (stimulus, a factory override, or policy).

    • Register type and instance overrides from a test, explain which one wins, and know when "before super.build_phase" really matters.

    • Put end-of-test policy in one place instead of nine, select tests and knobs from the command line, and write a top module that the next level of integration can replace.

    • Design a test library: hierarchy, naming, regression lists, and the choice between a new test, a new sequence and a new plusarg.

    How one test gets from the command line to the DUT

    Flowchart: the +UVM_TESTNAME plusarg feeds run_test in the top module, the factory creates uvm_test_top, the base test builds dma_env, and the derived test's run_phase uses helpers that drive the env.
    The test layer of the bench. The top module calls run_test, the plusarg chooses the class, the base test builds the environment, and the derived test's run_phase drives the scenario through the base test's helpers.

    If you have not read Environment Architecture yet, read it first: the tests here assume you know what dma_env builds and why the environment, not the test, owns topology.

    The lessons, in order

    Lesson

    What it answers

    Base Test Pattern

    What dma_base_test guarantees to every derived test, and what a production base test adds.

    Scenario Inheritance

    The nine derived tests as scenarios: stimulus-only, override-plus-stimulus, and policy changes.

    Factory Overrides in Tests

    Type and instance overrides from the test, which wins, and when registration order matters.

    Shared run_phase

    Where raise and drop belong, a template-method base, and replacing settle delays with a checker.

    +UVM_TESTNAME and Plusargs

    One binary, every test: selection, typed knobs, the INVTST fatal, and the replay bundle.

    Top Module and run_test Startup

    The bench's top line by line, config_db paths, and why reset is an interface.

    Designing a Test Library

    Hierarchy, naming, regression tiers, and new test vs new sequence vs new plusarg.

    Start with: Base Test Pattern.

    PreviousNext: Base Test Pattern: One Contract for Every Scenario

    Up next

    Up nextBase Test Pattern: One Contract for Every Scenario

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Environment Architecture