Input port and input output port declaration in top module

Status
Not open for further replies.

sandy2811

Junior Member level 3
Joined
Jul 20, 2012
Messages
25
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,450
Inout port and input output port declaration in top module

Hi all,
If i have three modules, one is top and other two is instaintiated in that top module. In top i have declare an inout port a and in other two modules i declared the same port as input a and output a. So is it correct way of declaration?
 

So is it correct way of declaration?
Depends on what you want to achieved. The output connected to inout must be tri-stateable (driven to z) to read the inout port.
 

Create symbol for other two modules(non top-level)
Import and wire these symbols in top-level module.
But observe the correct data directions between symbols.
 

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