I want to communicate three modules, one is a control unit, second is an arithmetic unit, and the third is Ram-like memory.
I'm a beginner, I know that I can connect two modules by instantiate one inside the other. For example the ALU ports inside the Control Unit.
What I want to do now is to extract a data from the RAM and send it to the ALU, only if Control Unit ask it to do it.
So it seems I would have to instantiate the same module, some ports at the Control unit and some of the (the data) to the ALU.
// In the Control Unit part of the port of the same instantiation
RAM_U RAM_U_inst1 (
.read (read)
);
// In the ALU module the other part
RAM_U RAM_U_inst1 (
.data (data)
);
In this case when RAM_U receive the order to read, it will send the data to the ALU.
Is this the correct way to do this? FPGA Synthesizable
