Assigning value to a inout bit

Status
Not open for further replies.

pradeep2323

Junior Member level 3
Joined
Nov 2, 2006
Messages
27
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,487
Hi,

How to assign value to a inout bit in a test bench.

I want to assign a value to a inout bit of design in testbench at perticular time.

Could you please tell me the ways......


Regards,
P
 

a<='1', '0' after 10 ns, '1' after 20 ns, '0' after 100 ns;
 

Hi
you have to be carefull when you assign value to an inout port.
you can only assign the value to inout port, when the corresponding control signal suggests, that the inout port is now acting as an 'input' port. and when it is acting as output then you will have to put this inout pin to 'Z'.
For example if the control signal which controls the direction of inout pin is say 'EN' then you will do
if(EN = '1') then
inout_pin <= whatever you want to put
else
inout_pin <= 'Z'
end if.
I am assuming when 'EN' is '1', the inpout_pin is in input mode
Kr,
Avi
http://www.vlsiip.com
 

Dear friend

What avmit said is excat,

While assigning in/out bit we must be careful of Enable bit

Depending on that only we can decide how to make it in or out

phutanesv
 

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