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
    • Implication Puzzles
    • Temporal Corner Puzzles
      • $past Startup History Hole
      • $rose Sampled on Clock Edge
      • $fell Is an Event, Not a Level
      • $stable Repeated Hold Check
      • $past After Reset Release
      • Vector $rose Sampling Trap
    • 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

←Temporal Corner Puzzles
  1. Topics
  2. DV Interview Puzzles
  3. SVA Assertion Puzzles
  4. Temporal Corner Puzzles
  5. $rose Sampled on Clock Edge
On this page

    VLSI DV Interview PuzzlesAll levels

    $rose Sampled on Clock Edge

    Property intent: after start rises, done must be high one cycle later. Timeline: start is 0 at every clock edge except C60, where it is sampled 1 and then 0 again at C61. Between the C40 and C41 edges start also glitches high for about 2 ns and is back to 0 before C41. done is low at every edge except C61. Evaluate the glitch near C40 and the rise at C60.

    Puzzle

    Difficulty: Medium · Puzzle 2 of 6 · Topic: Temporal Corner Puzzles

    Property intent: after start rises, done must be high one cycle later. Timeline: start is 0 at every clock edge except C60, where it is sampled 1 and then 0 again at C61. Between the C40 and C41 edges start also glitches high for about 2 ns and is back to 0 before C41. done is low at every edge except C61. Evaluate the glitch near C40 and the rise at C60.

    Code

    design.sv
    property p_rose_delay;
      @(posedge clk) $rose(start) |-> ##1 done;
    endproperty

    Hint

    $rose compares the sampled value at this edge with the sampled value at the previous edge. What did each edge actually see?

    Step-by-step solution

    Diagram
    1) The glitch between C40 and C41 is not present at any sampled edge: start is 0 at C40 and 0 at C41, so $rose is false at both and no attempt is started.
    2) At C60 start is sampled 1 and was sampled 0 at C59, so $rose is true and an attempt starts.
    3) ##1 done requires done at C61, and done is high at C61.
    4) So there is exactly one attempt and it passes; the glitch is invisible to the assertion.

    Answer

    Answer: PASS - the C40-C41 glitch is never sampled, so it starts no attempt (a waveform viewer would show a rise that the assertion does not see); the real rise at C60 is followed by done at C61.

    How this was checked

    Checked by running the code in Verilator 5; the printed output supports the answer above. A 2 ns glitch between edges is never sampled, so the only attempt is the real rise at C60.

    Why candidates get it wrong

    Reading the waveform viewer, the glitch looks like a rise at about C40.5 and you would expect done at C41 and report a failure. Assertions only see values sampled at the clock edge; the glitch is a real design hazard, but this assertion cannot catch it.

    Interviewer follow-up

    If done never went high at C61 (stayed low), would this still pass? Model answer: No, the C60 attempt FAILS at C61 because done is low; the glitch near C40 still creates no attempt, so it is neither the cause nor flagged.

    Say it out loud

    I would only look at values sampled at the clock edge. The glitch between C40 and C41 is gone at both edges, so there is no rise and no attempt. The real rise at C60 starts one attempt, and done is high at C61, so the property passes. The trap is trusting the waveform viewer, which shows a rise that the assertion never sees. I would note the glitch is a real hazard that needs a different check.

    Related topics

    • $rose, $fell, $stable, $changed

    • Clocks & the Sampling Model

    • Back to Temporal Corner Puzzles

    • SVA Assertion Puzzles section

    Previous

    124 / 293

    Next: $fell Is an Event, Not a Level

    Up next

    Up next$fell Is an Event, Not a Level

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • $stable Repeated Hold Check
    • $past After Reset Release
    • Vector $rose Sampling Trap