Verilog wire or reg for input and output
This article explains whether we should use wire or reg for input and output.
Difference
If you plan to assign your output in sequential code, such as within an
alwaysblock, declare it as areg(which really is a misnomer for “variable” in Verilog). Otherwise, it should be awire, which is also the default.
Explain
-
An output reg
foois just shorthand foroutput foo_wire; reg foo; assign foo_wire = foo. -
input wireandoutput wireare the same asinputandoutput: it’s just more explicit.