Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Build a FIFO reference model

Hardware interview practice

Build a FIFO reference model

MediumReference ModelsSystemVerilog

Implement a bounded FIFO reference class with push, pop, is_full, is_empty, and size. Pop must report success.

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 →
Reviewed example

Work through one case

Input
DEPTH=2; push A, push B, push C; pop three times
Expected output
C push rejected; pops return A(ok=1), B(ok=1), then zero(ok=0)

Capacity never exceeds two, and successful pops preserve first-in-first-out order before the defined empty result.

What to cover

Requirements

  1. Do not grow beyond DEPTH.
  2. Return zero data and ok = 0 when empty.
  3. Preserve first-in, first-out ordering.
Continue practicing

Related questions

Reference ModelsVerify a decimal palindrome checker→Reference ModelsVerify duplicate token supply→Reference ModelsModel sparse banked memory with packed keys→
asic.fyi · Learn silicon end to end.info@asic.fyi