Home / Learn Verilog / Instantiation: Named vs Positional Connections

Instantiation: Named vs Positional Connections

Connect by name to avoid wiring mistakes.

In shortConnect by name to avoid wiring mistakes.

What's actually going on

Instance u1 of subsubu1(.a(x),.b(z),.y(w))ainputbyoutput
Instance u1 of sub

Definition

Positional: m u(a, b, y) follows port order. Named: m u(.a(x), .b(z), .y(w)) follows names.

Why you need this

Positional connections silently break when ports are reordered.

How it works

Use named connections for anything with more than 2-3 ports.

Where you'll see this

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

Try it

Named connections in any orderVerilog: edit and run

Both give 5, but the named one survives port re-ordering.

Test what you just read

1. Named connections look like...