Home / Learn Verilog / Parameterized FIFO
Parameterized FIFO
Width and depth as parameters.
The gistWidth and depth as parameters.
The idea, explained simply
Definition
WIDTH and DEPTH parameters; pointer width from clog2.
Why you need this
One FIFO for the whole project.
How it works
localparam AW = $clog2(DEPTH).
Where you'll see this
- Everyday RTL design
- FPGA and ASIC projects
- Testbenches and debugging
Try it
FIFO #(8,4)Verilog: edit and run
12-bit wide, depth 4.
Test what you just read
1. Depth 16 needs pointer bits...
clog2(16).