Choose your
next lesson.

Start with the language. Follow the question you want to answer.

Watch two requests in flightPlay the UVM animation, pause, or follow one step at a time.

Explore the lessons

Open a module to see its lessons.

How do I describe it?

SystemVerilog

Types, collections, processes, classes, randomization and connecting to the design: the language of the testbench.

49 lessons ready
  1. 01

    Storing data

    7 lessons
  2. 02

    Collections

    7 lessons
  3. 03

    Routines and processes

    7 lessons

    Write tasks and functions that behave when called concurrently, start and stop processes on purpose, and pass work between them without lost wakeups or deadlocks.

    1. 3.1Tasks, functions and arguments
    2. 3.2Automatic and static lifetime
    3. 3.3Fork, join and cancellation
    4. 3.4Events and persistent state
    5. 3.5Mailboxes and backpressure
    6. 3.6Semaphores, ownership and deadlock
    7. 3.7Problem: a bounded response wait
  4. 04

    Classes

    7 lessons
  5. 05

    Randomization

    7 lessons
  6. 06

    Connecting to the DUT

    7 lessons
  7. 07

    FIFO capstone

    7 lessons

How does the whole bench fit?

UVM

Build reusable, layered testbenches with the Universal Verification Methodology.

61 lessons ready
  1. U1

    UVM architecture and phases

    4 lessons

    Map a layered testbench onto UVM components, follow the order in which phases visit the component tree, and keep the run phase open exactly as long as work is in flight.

    1. U1.1From a layered bench to UVM
    2. U1.2Build, connect and observe the phase order
    3. U1.3Objections and premature completion
    4. U1.4One environment, a family of tests
  2. U2

    Objects, factory and configuration

    4 lessons

    Copy and compare transactions safely, let a test swap classes through the factory, and deliver configuration and virtual interfaces to the components that need them.

    1. U2.1Copy, clone and transaction ownership
    2. U2.2Factory creation and type substitution
    3. U2.3Configuration paths and virtual interfaces
    4. U2.4Print, pack and record a transaction
  3. U3

    Communication between components

    6 lessons

    How UVM code reaches other code: virtual and pure virtual methods and interface classes, TLM-1 ports, exports and imps with the direction of every call and every data move, blocking and non-blocking calls through FIFOs and channels, analysis broadcast, and the sequencer-driver link and callbacks as the same pattern.

    1. U3.1Contracts in classes
    2. U3.2Ports, exports and imps: who calls whom
    3. U3.3The TLM-1 family: interfaces, flavours and masks
    4. U3.4Blocking, non-blocking, FIFOs and channels
    5. U3.5Analysis ports: one call, many listeners
    6. U3.6The connections you already use, and callbacks
  4. U4

    Sequences, drivers and responses

    3 lessons

    Send items from a sequence through the sequencer to a driver, read the handshake in a log, route responses back to the right sequence, and drive a clocked bus that pushes back.

    1. U4.1Sequences and the item handshake
    2. U4.2Responses and routing
    3. U4.3A driver on a clocked bus
  5. U5

    Sequencer and sequence control

    5 lessons

    Measure the six arbitration modes and the priority rules on one bench, give a sequence the driver with lock and grab, keep one out with is_relevant, learn the sequence lifecycle, read the macros, libraries and default sequences that start stimulus, and synchronise with events, barriers and a heartbeat.

    1. U5.1Arbitration and priority
    2. U5.2Lock, grab and relevance
    3. U5.3The sequence lifecycle
    4. U5.4Sequence libraries, macros and default sequences
    5. U5.5Events, barriers and heartbeats
  6. U6

    Drivers for real buses

    3 lessons

    Fill a pipelined bus with a multi-threaded get/put driver, answer a bus master from a reactive agent whose responder sequence decides every reply, and stack a packet layer over a byte link with a translator sequence and a reconstruction monitor.

    1. U6.1Pipelined drivers
    2. U6.2Reactive agents
    3. U6.3Layered protocols
  7. U7

    Monitors, analysis and in-order scoreboards

    4 lessons

    Turn pin activity into transactions at the edge where the design takes them, decide who copies a transaction and when, and check results in order with a scoreboard that accounts for every input and ends only after a quiet window, and route the assertions of a bound interface checker into the same UVM verdict.

    1. U7.1Monitor the event the DUT accepts
    2. U7.2Who owns an analysis transaction
    3. U7.3Scoreboard accounting and drain checks
    4. U7.4Checks in interfaces: SVA inside a UVM bench
  8. U8

    Scoreboard architectures

    4 lessons

    Split checking into prediction and evaluation, key predictions by tag when a design answers out of order, decide what makes a transaction correct, and measure latency and bookkeeping so that zero errors cannot hide zero checks.

    1. U8.1Predictor, comparator, scoreboard
    2. U8.2Out-of-order checking
    3. U8.3Comparing is not equality
    4. U8.4Metric analyzers and the ledger
  9. U9

    Reference models

    5 lessons

    Where the prediction comes from: choosing a checking strategy, an untimed model and its sync point, a C model behind DPI, TLM-2.0 sockets, and an instruction-set model compared at each retire as in a virtual-platform flow.

    1. U9.1Choosing the checking strategy
    2. U9.2An untimed model and the sync point
    3. U9.3A C reference model behind DPI
    4. U9.4TLM-2.0 sockets for a reference model
    5. U9.5Virtual platforms and refine-and-reuse
  10. U10

    Coordinated stimulus and reset

    3 lessons

    Drive several interfaces from one virtual sequence, reset the design in the middle of traffic without leaving the sequencer, driver or scoreboard behind, and put deadlines on every wait so a stuck test fails fast with a useful message.

    1. U10.1Coordinate two sequencers
    2. U10.2Reset in the middle of traffic
    3. U10.3Bound work and prove completion
  11. U11

    Reusable agents and selective overrides

    3 lessons

    Reuse one agent at block and chip level: make it passive where another block drives the pins, give each copy its own configuration object, and replace the driver inside one agent only.

    1. U11.1Build an active or passive agent
    2. U11.2Give each instance its own configuration
    3. U11.3Override one instance
  12. U12

    Extension and reuse

    3 lessons

    Extend a component without editing it, with callbacks and the choice between callback, override and knob; reuse a block environment inside a subsystem with its checks intact; and connect a bench to a legacy BFM that has no interface.

    1. U12.1Callbacks: extend a driver from the test
    2. U12.2Vertical reuse: a block environment inside a subsystem
    3. U12.3When there is no interface
  13. U13

    Register models and prediction

    3 lessons

    Describe the incrementer's registers in a UVM register model, tell its desired value from its mirror, drive real APB transfers through an adapter, and keep the mirror right when other code writes the bus.

    1. U13.1Desired values, mirrors and reset
    2. U13.2An APB adapter and frontdoor access
    3. U13.3Predict from observed bus traffic
  14. U14

    Register layer II

    4 lessons

    Reach the register slice through its frontdoor and a hand-written backdoor, run the built-in register tests, model quirky registers, program a configuration from the model, and assemble generated models into a chip with two ports.

    1. U14.1Memories and a backdoor without VPI
    2. U14.2Built-in register tests and quirky registers
    3. U14.3Register-driven configuration and coverage
    4. U14.4Several maps, sub-blocks and generated models
  15. U15

    Coverage, debugging and scale

    3 lessons

    Place coverage where it proves what the design did and trace it to the plan; find a bench bug from its symptom with the library's debug tools; and measure and remove the costs that make a large bench slow or make its memory grow.

    1. U15.1Coverage architecture and planning
    2. U15.2Debugging by symptom
    3. U15.3Performance and scale
  16. U16

    Diagnostics, regression and capstone

    4 lessons

    Make reports support a verdict, record how random stimulus was seeded, close coverage holes on purpose, and assemble a complete UVM bench for a four-entry FIFO, then verify an APB peripheral with the whole track's machinery and localise a planted bug from the report.

    1. U16.1Reports that support a verdict
    2. U16.2Seeds, coverage and directed closure
    3. U16.3The integrated UVM FIFO capstone
    4. U16.4The APB peripheral capstone

Did it happen at the right time?

Assertions

Describe correct behaviour once with SystemVerilog Assertions and let the simulator check it every cycle.

14 lessons ready
  1. A1

    Foundations

    3 lessons

    What an assertion checks and when: immediate, deferred and concurrent assertions, the values a clock edge samples, and the attempt every edge starts, which can pass, fail or pass vacuously.

    1. A1.1Why assertions
    2. A1.2Clocks and sampling
    3. A1.3Implication and vacuous success
  2. A2

    Sequences

    2 lessons

    Describe timing with fixed delays, ranges and repetition, see the threads one attempt forks, put two obligations on one trigger, and count protocol events with auxiliary code.

    1. A2.1Delays and ranges: one attempt, many threads
    2. A2.2Repetition and counting events
  3. A3

    Properties

    3 lessons

    What the end of a test means for weak and strong properties, how to say that a condition holds until an event, and how reset and abort conditions end attempts.

    1. A3.1Weak and strong: what the end of a test means
    2. A3.2Holding until an event: until and throughout
    3. A3.5Reset and abort: disable iff, accept and reject
  4. A4

    Transactions

    2 lessons

    Carry a value from a request to its response with local variables, and pair responses with the requests they answer.

    1. A4.1Remembering data with local variables
    2. A4.2Tags: one response must not satisfy every request
  5. A5

    Assertions and procedural code

    1 lesson

    Concurrent assertions placed inside always blocks, with the clock and enable they take from the procedure, and sequences used as events that wake procedural code.

    1. A5.1Assertions in procedures, sequences as events
  6. A7

    Packaging and reuse

    1 lesson

    Write rules once as named sequences and properties, keep them in a module of rules, and bind them into designs you cannot edit.

    1. A7.1Packaging and binding
  7. A8

    Capstones

    2 lessons

    Plan and write complete assertion suites, for a FIFO and for a tagged request/response channel, that fire on every faulty design and stay silent on the correct one.

    1. A8.1Capstone: an assertion suite
    2. A8.2Capstone: a tagged request/response channel

What have I missed?

Functional coverage

Measure what your tests have actually exercised, and find the cases they missed.

8 lessons ready
  1. 0C

    Functional coverage

    8 lessons

    Prove what your tests exercised: build coverage models with covergroups, find the holes, and close them with constraints.

    1. C1What coverage measures
    2. C2Covergroups and coverpoints
    3. C3Choosing bins
    4. C4Transitions
    5. C5Cross coverage
    6. C6Coverage in a class
    7. C7Closing holes
    8. C8Capstone: a coverage model that finds holes