Nets represent physical connections between hardware elements. They don't store values – they simply carry signals driven by other components.
// Single-bit wires
wire a;
wire b;
wire y;
// Multi-bit wire (bus)
wire [7:0] data_bus; // 8-bit bus, MSB:LSB
wire [31:0] address; // 32-bit bus
// Wire with initial value (for simulation only)
wire [3:0] default_val = 4'b0000;
// Array of wires
wire [7:0] mem_data [0:255]; // 256 x 8-bit wires
Key Point
Wires must be continuously driven. Use them with assign
statements or as outputs from module instantiations. They cannot be assigned
inside always blocks.