connecting two inout ports of different module

Status
Not open for further replies.

shethpurak

Junior Member level 1
Joined
Nov 15, 2005
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,399
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!
 

bidirectional ports to attach to the passive phase of the output give Z


if ....... input phase .....
then

output <= "ZZZZZ";
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…