Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Flag unknown outputs after reset

Hardware interview practice

Flag unknown outputs after reset

MediumCDC and ResetSystemVerilog

A gate-level simulation may briefly contain unknown values after reset release, but a 16-bit output must be fully known after a two-cycle settling allowance. Write a SystemVerilog checker for the reset and unknown-value contract.

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

input logic clk, rst_n;
input logic [15:0] data_out;
output logic check_enable;
Reviewed example

Work through one case

Input
Release reset before C1 and keep data_out fully known through C1, C2, and C3.
Expected output
C1 and C2 are untested settling edges; checking is enabled at C3 and no assertion fails.

The two-edge counter enables the unknown-value check only after both allowed settling samples have elapsed.

What to cover

Requirements

  1. When rst_n=0 at a rising edge, clear a two-cycle release counter and check_enable.
  2. After rst_n is sampled high on two consecutive rising edges, set check_enable and keep it high until reset.
  3. On every later rising edge with check_enable=1, assert that !$isunknown(data_out).
  4. Do not check data_out on either of the two settling edges; a reset assertion immediately disables future checks at that sampled edge.
Continue practicing

Related questions

CDC and ResetCheck reset-bounded delivery of asynchronous events→CDC and ResetQuarantine traffic after peer reset→CDC and ResetOne-outstanding-event CDC handshake→
asic.fyi · Learn silicon end to end.info@asic.fyi