Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Verify a RAM-based duplicate-ID detector

Hardware interview practice

Verify a RAM-based duplicate-ID detector

MediumMemory SystemsSystemVerilog

Implement the shadow-memory oracle, completion audit, and core bus properties for a duplicate finder operating on software-programmed random-access memory (RAM) containing N+1 values.

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
N=4; programmed RAM image = [1, 2, 3, 2, 4]; then repeat with [1, 0, 3, 2, 4]
Expected output
first run: duplicate_id=2, data_error=0; second run: duplicate_id=0, data_error=1

The first snapshot contains one legal repeated ID, while zero is outside the allowed 1..N data range and takes the error path.

What to cover

Requirements

  1. Model addresses 0 through N and update the Register Abstraction Layer (RAL) shadow only for accepted configuration writes; reads respond one cycle later and hold until consumed.
  2. Use legal shuffled images containing values 1 through N plus one repeated value, including controlled higher multiplicity.
  3. Use a frequency oracle and classify zero or any representable value above N as data_error with duplicate_id zero.
  4. Snapshot memory at accepted start, compare the functional result, and compare an observed post-search image with that snapshot.
  5. Assert read timing, response hold, done pulse shape, and blocked configuration while busy; discuss reset-retained memory as a follow-up environment rule.
Continue practicing

Related questions

Memory SystemsVerify a channel-capacity optimizer→UVM ComponentsVerify a RAL-programmed grid checker→
asic.fyi · Learn silicon end to end.info@asic.fyi