Home / Learn Verilog / Parameterized Modules in Depth
Parameterized Modules in Depth
Width, depth and behaviour as parameters.
The gistWidth, depth and behaviour as parameters.
The idea, explained simply
The basic idea
Parameters make a module generic; defaults apply when not overridden.
Why this comes up
One tested module serves many sizes.
The mechanics
Use parameters in ranges and loops; derive other sizes with localparam.
Where it is used
- Everyday RTL design
- FPGA and ASIC projects
- Testbenches and debugging
Try it
Generic counterVerilog: edit and run
Two counters from one module.
Quick check
1. Parameter defaults apply when...
Fallback.