FPGA Practice Problems
This path emphasizes the difference between RTL that merely simulates and RTL that behaves predictably on an FPGA. It mixes logic design with CDC, reset and interface considerations.
How to use this practice path
Stage 1
Solve the RTL function first.
Solve the RTL function first.
Stage 2
Identify asynchronous inputs and clock-domain boundaries.
Identify asynchronous inputs and clock-domain boundaries.
Stage 3
Consider reset release and inferred FPGA resources.
Consider reset release and inferred FPGA resources.
Stage 4
Check protocol timing and implementation assumptions.
Check protocol timing and implementation assumptions.
Problems to solve
Button Debouncer
Create a synchronous button debouncer suitable for an FPGA.
Traffic Light FSM
Design a finite-state machine controlling a simple traffic light sequence.
Parameterized PWM Generator
Generate a PWM waveform from an unsigned duty-cycle input.
Clock-Enable Data Register
Model the FPGA-friendly alternative to fabric clock gating: a register controlled by clock enable.
Async FIFO Dual-Port Memory
Create storage that can be written and read from different clock domains.
Four-Sample Delay Line
Store the current and previous input samples for a four-tap FIR.
DSP Valid Pipeline
Keep control timing aligned with a multi-stage arithmetic datapath.
Streaming Byte Position Counter
Track byte position within a packet without buffering the complete frame.
Packet Statistics Counters
Maintain simple line-rate counters for total IPv4 packets and UDP packets.
Feed Word Counter
Track 32-bit word position inside each market-data message.
Message Classifier
Classify three feed message types into add, update and delete operations.
SPI Clock Divider
Generate a programmable SPI clock-enable tick from the system clock.
SPI Chip-Select Controller
Control an active-low SPI chip-select around a transfer.
Small Register File
Implement a 4-entry register file with one synchronous write port and two asynchronous read ports.
Programmable Clock Divider
Create a programmable divide-by-N toggle output.
UART Transmitter
Design an 8-N-1 UART transmitter.
Simple Dual-Port RAM
Infer a small synchronous-write, asynchronous-read dual-port memory.
Backpressure-Safe Ready/Valid Source
Implement a source register that obeys ready/valid protocol semantics.
Interview routine
For each problem, first restate the requirement and assumptions. Then write the RTL, assertion, verification component or architecture derivation without looking at a solution. Before running anything, list at least three edge cases. Finish by explaining how you would verify the result and what trade-offs you made.
Keep going
Use the interactive HDLForge problem workspace, browse company-style tracks, or choose a hardware project that uses the same skills.
Related implementation guides
- Asynchronous FIFO and CDC Guide — Understand asynchronous FIFO RTL, Gray-code pointers, synchronizers, reset release and CDC verification with HDLForge practice and project links.