Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

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
 

avimit

Banned
Joined
Nov 16, 2005
Messages
413
Helped
91
Reputation
182
Reaction score
23
Trophy points
1,298
Location
Fleet, UK
Activity points
0
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
 

phutanesv

Full Member level 3
Joined
Apr 26, 2007
Messages
151
Helped
19
Reputation
38
Reaction score
7
Trophy points
1,298
Activity points
2,233
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.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top