Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Prove clock-gating entry and wake safety

Hardware interview practice

Prove clock-gating entry and wake safety

HardAssertions and FormalSystemVerilog

A CPU block gates its local clock after all accepted work completes and must wake within three parent-clock cycles of wake_req. Write the formal assumptions, assertions, and covers for the gate controller.

Try it in the question bankReason first. Then compare.

Keep this exact question selected while you check your answer and review the full solution.

Practice this question →
Starting point

Question code

parent_clk, reset_n
accepted_work_count
idle, gate_closed
wake_req
local_clk_running
Reviewed example

Work through one case

Input
Case 1: Raise gate_closed while accepted_work_count=1
Case 2: Assert wake_req while gated
Case 3: Assert reset while gated
Expected output
Case 1: the entry-safety assertion fails
Case 2: local_clk_running becomes true within cycles 1–3
Case 3: gate_closed=0 and local_clk_running=1 by the specified reset edge

The shown result follows by applying this rule: Entry safety, state stability, bounded wake, and reset are separate properties. The cases also demonstrate this requirement: Assert reset forces the defined open-gate state; cover normal gate, wake, reset while gated, and wake with the final completion.

What to cover

Requirements

  1. Assert gate_closed may rise only when accepted_work_count == 0 and idle is true.
  2. Assert functional state remains stable while gated except the specified wake/reset logic.
  3. Assume parent_clk continues; assert wake_req opens the gate and local_clk_running becomes true within three parent-clock cycles.
  4. Assert reset forces the defined open-gate state; cover normal gate, wake, reset while gated, and wake with the final completion.
Continue practicing

Related questions

Assertions and FormalProve bounded bridge forward progress→Assertions and FormalAssert set-dominant fault retention→
asic.fyi · Learn silicon end to end.info@asic.fyi