Practice

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

14 more in the Memory and Storage track

Datapath and Storage29

17 more in the Datapath and Storage track

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

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.