Skip to the selected question
ASIC.FYI

ASIC Question Bank

1,000+ hardware interview questions
DescriptionQ462
Page ↗
Q462DVASIC interview problem

Build a FIFO reference model

TechniquesQueueReference modelAPI design
DifficultyMedium
TopicReference Models
LanguageSystemVerilog
Requirements3 checkpoints
01

Problem

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

Example input and output

Use this case to check your interpretation
Input
DEPTH=2; push A, push B, push C; pop three times
Output
C push rejected; pops return A(ok=1), B(ok=1), then zero(ok=0)
Explanation

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

02

Requirements (3)

  • Do not grow beyond DEPTH.
  • Return zero data and ok = 0 when empty.
  • Preserve first-in, first-out ordering.