Home / Learn Verilog / Hierarchy: Building Big Designs from Small Modules

Hierarchy: Building Big Designs from Small Modules

Compose a 4-bit adder from full adders.

The gistCompose a 4-bit adder from full adders.

The idea, explained simply

Hierarchyfa0fa1fa2fa3adder4tbtop
Hierarchy

What it is

Hierarchy means modules containing instances of other modules, forming a tree.

Why it matters

Small modules are easier to test, reuse and understand.

Mechanically speaking

Write and test the leaf modules first, then connect them in a parent.

Shows up in

  • Everyday RTL design
  • FPGA and ASIC projects
  • Testbenches and debugging

Try it

4-bit adder from four full addersVerilog: edit and run

Sub-module signals can be shown with the "sub-module signals" box in the waveform.

Check yourself

1. Hierarchy helps with...