DescriptionQ1054
Q1054DesignDVNVIDIAASIC interview problem
Detect the wildcard pattern 110?01
TechniquesDesignDVSystemVerilogFSMPattern detector
DifficultyHard
TopicRTL Design
LanguageSystemVerilog
Requirements4 checkpoints
01
Problem
Implement both an overlapping FSM and a six-bit shift-register detector for 110?01, where ? is either binary value. Make their outputs agree.
Starting declarationSystemVerilog
input logic clk, rst_n, in_bit;
output logic detect_fsm, detect_shift;Example input and output
Use this case to check your interpretationInput
Streams 110001, 110101, and 110111Output
First two match on bit 6; the third does notExplanation
The fourth bit may be 0 or 1, but the required fifth bit must be 0.
02
Requirements (4)
- Sample one binary input per rising edge and pulse on the final bit.
- Treat ? as a don't-care pattern position, not four-state X.
- Suppress detection until six bits have been sampled after reset.
- Preserve compatible prefix state for overlapping matches and assert both implementations agree.
