Random Pieces of Information Based On Real Life Experiences:
- By default, go for
output reg
andinput wire
. In the testbench, the inputs will be justreg
and outputs will be justwire
. Beware of usingoutput reg
for structural modelling. - When there's a
reg
that needs to be used to store and change the value of aninput wire
, with behavioral modelling, use thealways @ (*)
block to contain the assignment of thatreg
. Example - All
$
system tasks and functions must end with a;
. - Use non-blocking assignment,
<=
, in cases where counters or shift registers are to be designed.