Memory and FIFO design problems
Storage is where a design keeps its state, and the FIFO is the storage interviewers ask about most. These problems build single and dual port RAMs, ROMs, register files and stacks, then the FIFO with its read and write pointers.
95 problems12 free to solve11 easy, 44 medium, 40 hard
The hard parts are the flags and the sizing: telling full from empty with one extra pointer bit, raising almost full early enough, and working out how deep a FIFO must be for a given burst.
What these problems cover
- Single port and dual port RAM, read first and write first
- ROM inference and register files with several read ports
- Stacks and circular buffers
- Synchronous FIFOs and their full, empty and almost full flags
- FIFO depth for different read and write rates
- Asynchronous FIFOs with Gray coded pointers
Free to start
Solve these with a free account. Every other statement on this page is free to read.
Problems by track
Memory and Storage26
- Combinational ROM Initialization
- ROM Inference via Case
- Synchronous Single Port RAM
- Write First Single Port RAM
- Read First Single Port RAM
- Read After Write Hazard Detection
- Simple Dual Port RAM 1R1W
- True Dual Port RAM 2RW
- True Dual Port RAM Collision Resolution
- Register File with Hardwired Zero
- CPU Register File 2R1W
- Shift Register Based FIFO
Datapath and Storage29
- Data Register with Synchronous Enable
- Register Priority Control Logic
- Basic Register File Address Decoding
- Dual Read Port Multiplexing
- Read After Write Hazard and Bypass Forwarding
- Register File Write Enable Glitches
- Circular Buffer Write Pointer Logic
- FIFO Full and Empty Flag Generation
- FIFO Almost Full Warning Logic
- Shift Register Based LIFO Stack
- Stack Pointer Up Down Control
- Stack Overflow Protection
Digital Foundations1
Combinational Building Blocks2
Latches and Flip-Flops3
Counters2
Shift Registers1
Clocking and Synchronization5
Interview Circuit2
Sequential RTL1
Interfaces and Protocols1
SystemVerilog RTL3
Clock Domain Crossing and Synchronization10
- Asynchronous FIFO Memory Array
- Read Pointer Generation and Gray Conversion
- Synchronizing Read Pointer to Write Domain
- Synchronizing Write Pointer to Read Domain
- FIFO Full Condition Logic
- FIFO Empty Condition Logic
- Asynchronous FIFO with Asymmetric Widths
- Parameterizable Depth Asynchronous FIFO
- Write Pointer Generation and Gray Conversion
- Clock Domain Crossing with Valid and Ready
Interview Circuit1
More problems8
How your answer is checked
Circuit problems run on the circuit simulator against the problem's test vectors, clocked cycle by cycle when they are sequential. Verilog problems are compiled with Icarus Verilog and run against a testbench, with the waveform and the Yosys schematic beside the result. Analysis questions are checked against their answer key.
Questions
- Is FIFO design asked in interviews?
- Constantly. Writing a synchronous FIFO, generating its flags and sizing it for a burst are among the most common RTL design interview questions.
- Does the simulator model real memory?
- The RTL problems simulate your Verilog as written, and Yosys shows whether it infers a memory or a pile of flip flops. Circuit problems use RAM and register parts on the canvas.