Hi I'm neophyte in Verilog and I have some question about designing module.
Is it okay to use top module's output as an input of submodule (Taking both module as sequentional logic)?
To my intuition about flip-flop, it seems to be okay but I'm not sure if this kind of approach is acceptable in verilog coding (anyway in logical or conventional). Should this kind of coding be avoided ?
module sample_top(
input a,
input b,
input c,
output d,
output e
);
//sequential
sample_submodule_1 SAMPLE_SUBMODULE_1(
//input of submodule
.A(a),
.B(b),
//output of submodule
.D(d)
);
//sequential
sample_submodule_2 SAMPLE_SUBMODULE_2(
//input of submodule
.C(c),
.D(d),
//output of submodule
.E(e)
);
Thanks for your answer.