Kathan Shah
Newbie level 6
- Joined
- Jun 15, 2012
- Messages
- 12
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,359
I have written an if else statement in VHDL, wherein one signal is used in if statement and not in else statement, which has resulted into latch. This should not happen. One way to remove this is assign signal values in both cases, which is not possible for my logic. What I am doing is similar to...
if(c>0) then
a='1';
else
b='1';
end if;
Now latches are generated for a and b signals. What are the different ways to avoid latch formation?
I cannot do like
if(c>0) then
a='1';
b='0';----I dont want b to be 0 here
else
b='1';
a='0';----same here
end if;
if(c>0) then
a='1';
else
b='1';
end if;
Now latches are generated for a and b signals. What are the different ways to avoid latch formation?
I cannot do like
if(c>0) then
a='1';
b='0';----I dont want b to be 0 here
else
b='1';
a='0';----same here
end if;