1
\$\begingroup\$

Say I have a module foo(in1,in2,out); and module mad1(in,out); module mad2(in,out); module mad3(in,out); While instantiating these modules I want to use the output (out) of foo as an input to each of the mad modules. Something like this:

input in1,in2;
output out1,out2,out3;
wire w_out;
foo i_foo(.in1(in1),.in2(in2),.out(w_out));
mad1 i_mad1(,in(w_out),.out(out1));
mad2 i_mad2(,in(w_out),.out(out2));
mad3 i_mad3(,in(w_out),.out(out3));

Is that approach correct or should I save the output of the foo module to a register?

\$\endgroup\$
1
\$\begingroup\$

This approach is perfectly correct.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.