← Design Verification Interviews

Interview Question · Waveform

One Property, Two Clocks

L2 Mid-LevelL3 Seniorsvamulticlockcdc

The Question

The interviewer asks

Read the waveform for @(posedge clk_a) req |=> @(posedge clk_b) ack. On which clk_b edge must ack be high? Would ##2 work across the clock change?

Reveal the Model Answer

The consequent is checked at the first clk_b edge strictly after the clk_a edge where req was seen. That may be much sooner than one clk_a period. Between subsequences on different clocks, only ##1 and ##0 are legal. ##1 moves to the nearest later tick of the new clock, and ##0 to the nearest tick at or after. So ##2 across the boundary is illegal.

Crossing from clk_a to clk_b
01234567891011clk_aclk_breqackreq sampled on a clk_a edgeack checked on the very next clk_b edge

Each column is one time unit. The check does not wait a full clk_a period; it moves to the nearest later clk_b edge.

Self-Check

Tick each key point you covered in your answer.

What Interviewers Listen For (Senior)

A good senior answer places the check on the next clk_b edge. It explains the ##1 and ##0 rules when a property changes clocks.

Cross-Questions

Where the interviewer goes next. Open a node to practise that follow-up.

WhyWhat IfCompareScale It

  1. One Property, Two Clocks
  2. WhyWhy the Next Edge of the New ClockL3 Senior

    Why does the language define the crossing as "the next edge of the new clock" instead of a fixed number of cycles?

    Reveal the Model Answer

    The two clocks have no fixed relation, so "two cycles" has no single meaning across them. The next edge of the destination clock is the earliest moment that domain can observe anything. Every longer wait can then be written inside the destination clock's own subsequence.

    Self-Check

    Tick each key point you covered in your answer.

    Misconception

    "It is defined in terms of the faster clock."

    It always uses the clock of the subsequence that comes next, whichever is faster.

    Source IEEE 1800-2017 §16.13.1

  3. What IfWhen Both Clocks Are the SameL2 Mid-LevelL3 Senior

    What if clk_a and clk_b are actually the same clock, in phase?

    Reveal the Model Answer

    Then the next strictly later clk_b edge is simply the next clock edge. So @(posedge clk_a) req ##1 @(posedge clk_b) ack behaves like @(posedge clk_a) req ##1 ack. The multiclock form costs nothing when the clocks match, and stays correct if they later split.

    Self-Check

    Tick each key point you covered in your answer.

    Misconception

    "With identical clocks, the crossing adds an extra cycle."

    The rule picks the nearest strictly later edge, which is exactly one cycle when the clocks match.

    Source Mehta, SystemVerilog Assertions and Functional Coverage (3rd ed.), §10.2

  4. CompareA Multiclock Property vs Checking a Synchronised CopyL3 Senior

    Compare writing one multiclock property with first synchronising req into the clk_b domain and writing a single-clock property there.

    Reveal the Model Answer

    The multiclock property states the rule exactly as the spec says, across both domains. The synchronised copy is easier to read and runs on more tools. But it checks the copy, which arrives two or three cycles late. Then the property must allow for that delay. Many teams use the single-clock form for tool support, and keep multiclock properties for formal runs.

    Multiclock propertySingle-clock property on a synchronised copy
    States the ruleExactly as the spec doesShifted by the synchronizer delay
    ChecksThe real signalA copy that arrives 2 or 3 cycles late
    Tool supportNarrowerEvery tool

    Self-Check

    Tick each key point you covered in your answer.

    What Interviewers Listen For (Senior)

    A good senior answer says what the delayed copy hides. It picks the form that the team's actual tools support.

    Missed Corner

    "The synchronised copy changes nothing; it is the same signal."

    It arrives one or more destination cycles later. A tight timing rule written on it can pass when the real rule fails.

    Source Lesson R6.2 (two-flop synchronizer latency)

  5. Scale ItCDC Sign-Off on a Many-Clock SoCL3 SeniorL4 Staff

    How do you sign off clock domain crossings on an SoC with dozens of clocks?

    Reveal the Model Answer

    Start with structural analysis: define the clocks and their relationships. Then let the tool find every crossing and check that each has the right synchronizer for its type. Next comes protocol checking: each scheme's rules, such as hold times and Gray steps, become assertions in formal and simulation. Add reconvergence checks and reviewed waivers. Use metastability injection in simulation to expose designs that assume exact timing.

    Self-Check

    Tick each key point you covered in your answer.

    Tool as Truth

    "Our regressions pass with all clocks running, so CDC is covered."

    RTL simulation never goes metastable and rarely hits the bad clock phase. CDC needs structural and protocol checks, not only passing tests.

    Source Mehta, ASIC/SoC Functional Design Verification ch. 8.5 (PDF p186-188); Sutherland, RTL Modeling with SystemVerilog ch. 8.1.6

    Wrong Altitude

    A staff-level answer that stops at "run the CDC tool".

    The interviewer wants the flow: constraints, structure, protocol, reconvergence, waiver review and who owns each step.

What People Get Wrong

Common wrong answers and why they fail.

Misconception

"|=> waits one full clk_a cycle, then checks on clk_b."

Across clocks the delay is "the nearest later tick of the new clock". With the clocks out of phase, that tick can come within half a period.

Source IEEE 1800-2017 §16.13.2

Spec Misquote

"Write ##2 to give the slower clock more time."

Only ##1 or ##0 may join subsequences with different clocks. Add the wait inside the clk_b part instead, for example @(posedge clk_b) ##1 ack.

Source IEEE 1800-2017 §16.13.1

Buzzword Without Mechanism

"A multiclock assertion proves the crossing is safe."

RTL simulation never goes metastable. The property checks the order of events, while CDC safety needs synchronizers and structural checks.

Source Sutherland, RTL Modeling with SystemVerilog for Simulation and Synthesis, ch. 8.1.6

Tool as Truth

"Our simulator rejects multiclock properties, so they cannot be used."

They are standard. Verilator 5.052 rejects them with a syntax error, which is a tool limit.

Source ASIC Point engine notes (Verilator 5.052 SVA probes), rows "multi-clock"

Learn It, Then Prove It