Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bidirectional port

Status
Not open for further replies.

superosjecaj

Programmer
Feb 17, 2003
4
SI
Hi!

I'd laike to make a bidirectional port with vhdl, bu i don't know how to...
i tried sth like this
io : inout std_logic;
i : in std logic;
o : std_logic;
rw,vma : in std_logic
...

p0:process(vma,rw...)
begin
if vma = '1' then
if rw = '1' then
i <= io;
else
io <= o;
end if;
else
io <= 'Z';
end if;
end process;
...

but the synthesis reports a latch...
how can i avoid that

thanx,
blaz
 
Latch will be generated when there are incomplete IF-ELSE, CASE, WHEN-ELSE statements in the code. If you want to avoid latches being generated, then, see that the code has the default (ELSE) clause assigned.

Also, can you provide the complete code?
I tried to build a code from the snippet you have given, but was not sure if it was same as whatever you are using.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top