shethpurak
Junior Member level 1
Hi,
Can someone tell me how to connect two inout port of different modules using an interface ?
I know if it's like this then it would work fine.
a a_inst(inout port a, b);
b b_inst(inout port c, d);
But I have different scenario
Example:
let's say I have
a a_inst(inout port p);
b b_inst(inout port q);
c c_inst(inout port r);
where
`ifdef def_1
then I want to connect inout port p to inout port q
`else
I want to connect inout port p to inout port r
`endif
Assign statements will not work as the are all inout ports. I know I will probably have to use interface . But I am not sure how should make the connection.
Can somebody help me with this connection ?
Thanks a lot!
Can someone tell me how to connect two inout port of different modules using an interface ?
I know if it's like this then it would work fine.
a a_inst(inout port a, b);
b b_inst(inout port c, d);
But I have different scenario
Example:
let's say I have
a a_inst(inout port p);
b b_inst(inout port q);
c c_inst(inout port r);
where
`ifdef def_1
then I want to connect inout port p to inout port q
`else
I want to connect inout port p to inout port r
`endif
Assign statements will not work as the are all inout ports. I know I will probably have to use interface . But I am not sure how should make the connection.
Can somebody help me with this connection ?
Thanks a lot!