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
  • Checking & Coverage in UVM21
  • UVM Register Abstraction Layer (RAL)22
  • Advanced UVM in Practice13
  • Debug & Regression10
  • Coding Practice47
    • How to Use This Course
    • Whiteboard Delivery Framework
    • Scoreboard Coding
    • Monitor & Driver Coding
    • Sequences Coding
      • Basic Sequence Body
      • Layered Virtual Sequence
      • Grab, Lock & Ungrab
      • Sequence Library Arbitration
      • Sequences Tricky Q&A
    • TLM & Analysis
    • RAL & Adapters
    • Factory & config_db
    • Phases & Objections
    • Env & Test Architecture
    • Debug Broken Testbench
    • Mock Interview Sets
    • Senior UVM Coding Cheat Sheet
  • Verification in Industry Practice10
  • Senior Prep: Architecture, Leadership and Interviews32
Loading lesson

‹Sequences Coding
  1. Topics
  2. UVM Verification
  3. Coding Practice
  4. Sequences Coding
  5. Sequence Library Arbitration

UVM Coding PracticeSenior

Sequence Library Arbitration

Weighted random sequence pick from library.

On this page

    Interview prompt

    Configure uvm_sequence_library with three stress sequences and weights.

    Diagram
    WHITEBOARD CHAIN
    
    1. DECLARE    interfaces / types / ports you need
    2. SKELETON   class extends + utils macro + key methods
    3. MECHANISM  fill one critical method while narrating
    4. PITFALL    name one bug juniors make on this pattern
    5. TEST       how you would smoke-test the component

    Reference sketch (≤40 lines)

    design.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    class my_seq_lib extends uvm_sequence_library #(pkt);
      `uvm_object_utils(my_seq_lib)
      `uvm_sequence_library_utils(my_seq_lib)
      function void new(string name="lib");
        super.new(name);
        init_sequence_library();
        add_sequence(pkt_stress_seq::get_type(), 3);
        add_sequence(pkt_idle_seq::get_type(), 1);
        add_sequence(pkt_err_seq::get_type(), 2);
      endfunction
    endclass

    add_sequence with weight, init_sequence_library, execute on sequencer in test main_phase or via default_sequence config.

    Mechanism to narrate

    • Library rand-picks child sequence type by weight

    • Use for stress mix without one giant random seq

    • Weights control error vs idle vs stress ratio

    Smoke test (5 minutes)

    • Run 100 iterations — log distribution roughly matches weights.

    • Zero weight seq never selected.

    Common pitfalls

    • Forget init_sequence_library.

    • No weights — uniform unwanted mix.

    • Library on wrong sequencer.

    Previous

    207 / 280

    Next: Sequences Tricky Q&A

    Up next

    Up nextSequences Tricky Q&A

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Basic Sequence Body
    • Layered Virtual Sequence