Part 4 · Assertions (SVA) · Intermediate

Sequences: Temporal Building Blocks

Hub — cycle delays, repetition operators, sequence composition, throughout/within, and first_match.

Overview

A sequence is a pattern of boolean expressions spread across clock cycles. Everything in SVA is built from this one idea: a boolean expression is a one-cycle sequence, cycle delays glue expressions across time, repetition operators compress repeated patterns, and composition operators combine sequences into richer patterns. Properties — the things you actually assert — are built on top of sequences.

The single most important mental model: a sequence evaluation is a set of match threads . A ranged delay or repetition does not pick one interpretation — the simulator follows every legal interpretation in parallel, and the sequence matches if any thread reaches its end. Interviewers probe this relentlessly: ranged delays, goto vs non-consecutive repetition, and first_match questions are all really questions about match threads.

Sub-topics

  1. Cycle Delays — ##N fixed, ##[M:N] ranged, ##[0:$] unbounded, ##0 fusion.

  2. Consecutive Repetition — [*N], [*M:N], the empty-match [*0], unbounded [*1:$].

  3. goto & Non-Consecutive — [->N] vs [=N], the #1 interview discriminator.

  4. Sequence Composition — and, or, intersect, and length-matching rules.

  5. throughout & within — invariants over sequences and containment.

  6. first_match & Endpoints — pruning thread explosion, .triggered/.matched.

diagram
SEQUENCE TOOLBOX — what builds on what

  boolean expression          req && !busy        (1-cycle sequence)
        │
        ▼
  cycle delay                 a ##2 b             glue across cycles
                              a ##[1:3] b         ranged  match threads
        │
        ▼
  repetition                  a [*3]              consecutive repeat
                              a [->3]             goto (endpoint-aligned)
                              a [=3]              non-consecutive (gap after)
        │
        ▼
  composition                 s1 and s2           both, lengths may differ
                              s1 or s2            either (more threads)
                              s1 intersect s2     both, SAME length
        │
        ▼
  qualifiers                  en throughout s     invariant over s
                              s1 within s2        containment
                              first_match(s)      prune to earliest match
        │
        ▼
  property layer              antecedent |-> consequent   (next topic)

Key takeaways

  • A sequence is a pattern over clock cycles; a boolean expression is the 1-cycle base case.

  • Ranged operators spawn parallel match threads — the sequence matches if any thread completes.

  • Master the operator-by-operator waveforms here; every protocol assertion is composed from them.