wanida
Newbie level 4
Hi.
I know that outputs that are in an always block must be declared as "reg" not "wire".
Let's say module A has output outA and outB in an always block therefore they must be declared as "reg".
e.g. module (inA, inB, outA, outB).
My question:
What if the module A is instantiated in another module B and not placed in an always block? Should it be declared as "wire" in module B?
And what if any of the output of the module A is just used internally in the module B that instantiates it, should there be a declaration of reg for that name in module B?
thank you.
I know that outputs that are in an always block must be declared as "reg" not "wire".
Let's say module A has output outA and outB in an always block therefore they must be declared as "reg".
e.g. module (inA, inB, outA, outB).
My question:
What if the module A is instantiated in another module B and not placed in an always block? Should it be declared as "wire" in module B?
And what if any of the output of the module A is just used internally in the module B that instantiates it, should there be a declaration of reg for that name in module B?
thank you.