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

AboutRoadmapCareersInternshipsFAQContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Puzzle Bank
  • SystemVerilog Language Puzzles25
  • Difficulty Guide
  • Full Topic Map
  • Interview-Day Tips
  • Study Route: One Week Before the Interview
  • Study Route: Two Weeks
  • Study Route: Four Weeks (Full Course)4
  • OOP & Testbench Puzzles25
  • Concurrency & Timing Puzzles25
  • Randomization & Constraint Puzzles25
  • SVA Assertion Puzzles25
    • Sequence Puzzles
      • Exact Delay Then Bounded Hold
      • Goto Repetition With Sparse Events
      • Nonconsecutive Repetition [=2]
      • Sequence and Operator
      • first_match in an Antecedent
      • within Window Length Off-By-One
    • Implication Puzzles
    • Temporal Corner Puzzles
    • Assertion Debug Puzzles
    • SVA Assertion Puzzles: Tricky Q&A
  • Functional Coverage Puzzles25
  • Logic & Aptitude Puzzles25
  • Scenario & Debug Puzzles25
  • UVM Testbench Puzzles25
  • Clock, Reset & CDC Puzzles25
  • Bus and Interface Protocol Puzzles25
  • Interview Prep: Puzzle Rounds7
  • DV Puzzle Cheatsheet
Loading lesson

←Sequence Puzzles
  1. Topics
  2. DV Interview Puzzles
  3. SVA Assertion Puzzles
  4. Sequence Puzzles
  5. Goto Repetition With Sparse Events
On this page

    VLSI DV Interview PuzzlesAll levels

    Goto Repetition With Sparse Events

    Property intent: after start, observe two occurrences of a (not necessarily consecutive), then one cycle later done. Timeline (all other samples are 0): C20 start=1, C22 a=1, C24 a=1, C25 d1. Determine the verdict.

    Puzzle

    Difficulty: Medium · Puzzle 2 of 6 · Topic: Sequence Puzzles

    Property intent: after start, observe two occurrences of a (not necessarily consecutive), then one cycle later done. Timeline (all other samples are 0): C20 start=1, C22 a=1, C24 a=1, C25 done=1. Determine the verdict.

    Code

    design.sv
    property p_seq_goto;
      @(posedge clk) start |-> ##1 a[->2] ##1 done;
    endproperty

    Hint

    Compare [->2] behavior to [*2].

    Step-by-step solution

    Diagram
    1) start triggers at C20; ##1 shifts matching window to C21 onward.
    2) a[->2] consumes two a hits at C22 and C24, allowing gaps, and ends exactly on the second hit (C24).
    3) ##1 done then requires done at C25.
    4) done is high at C25, satisfying consequent.

    Answer

    Answer: PASS - [->2] allows non-consecutive matches, so hits at C22/C24 are legal and done arrives exactly one cycle after the second hit.

    How this was checked

    Checked by running the code in Verilator 5; the printed output supports the answer above. Goto [->2] accepts the gap between the two a hits and passes; consecutive a[*2] on the same trace fails.

    Why candidates get it wrong

    Interviewees frequently misread [->2] as consecutive repetition and incorrectly fail this waveform. The other trap is the end point: goto ends on the last a, so ##1 done is counted from C24, not from the cycle after the last low cycle.

    Interviewer follow-up

    How would the verdict change if the sequence used a[*2] instead of a[->2]? Model answer: it would FAIL. After ##1 the repetition a[*2] needs a high at C21 and C22, but a is 0 at C21, and the hits at C22 and C24 are not adjacent. Only [->n] (and [=n]) tolerate the gaps.

    Say it out loud

    I would mark the a hits at C22 and C24, and done at C25. Goto repetition allows gaps between the hits and ends exactly on the second one, C24. So done one cycle later at C25 is exactly what the property wants, and it passes. The trap is misreading the goto as consecutive and failing it; I would next ask what happens if done comes later, because goto ends on the last a.

    Related topics

    • Repetition: [*], [->], [=]

    • Cycle Delays: ##N and ##[M:N]

    • Back to Sequence Puzzles

    • SVA Assertion Puzzles section

    Previous

    112 / 293

    Next: Nonconsecutive Repetition [=2]

    Up next

    Up nextNonconsecutive Repetition [=2]

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • Sequence and Operator
    • first_match in an Antecedent
    • within Window Length Off-By-One