DescriptionQ157
Q157DVASIC interview problem
Verify a RAM-based duplicate-ID detector
TechniquesDVFWUVM RALMemoryFault injection
DifficultyMedium
TopicMemory Systems
LanguageSystemVerilog
Requirements5 checkpoints
01
Problem
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.
Example input and output
Use this case to check your interpretationInput
N=4; programmed RAM image = [1, 2, 3, 2, 4]; then repeat with [1, 0, 3, 2, 4]Output
first run: duplicate_id=2, data_error=0; second run: duplicate_id=0, data_error=1Explanation
The first snapshot contains one legal repeated ID, while zero is outside the allowed 1..N data range and takes the error path.
02
Requirements (5)
- 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.
- Use legal shuffled images containing values 1 through N plus one repeated value, including controlled higher multiplicity.
- Use a frequency oracle and classify zero or any representable value above N as data_error with duplicate_id zero.
- Snapshot memory at accepted start, compare the functional result, and compare an observed post-search image with that snapshot.
- Assert read timing, response hold, done pulse shape, and blocked configuration while busy; discuss reset-retained memory as a follow-up environment rule.
