Module's Hierarchy where uart_receiver.v=ModuleA, RSD.v=ModuleB, uart_transmitter.V=ModuleC
Suppose I want to Instantiate ModuleA with inputs from different modules, B, and the name of inputs are: WR_EN from moduleB and RD_EN, DT from moduleC
module A(
input wr_EN,
input rd_EN,
input DT,
output out
);
I tried to do the below with no success, in ISE Xilinx with Verilog
B MODULE
module B(...)
assign wr_EN = 1;
...
// Now call module A from B:
module A A_instance(.wr_EN(wr_EN) );
C MODULE
module C(...)
...
assign rd_EN = 0;
assign DT = 1;
....
// And then call module A from C
module A A_instance(.rd_EN(rd_EN), .DT(DT) );
If I call module instances with same names the program doesn't make a second instance, despite the fact that I want one. I searched but I haven't found similar example