- Joined
- Oct 2, 2009
- Messages
- 19
- Reaction score
- 0
Code:
if a > b then
bitout <= '1';
elsif a < b then
bitout <= '0';
else
-- disregard bitout
end if;
I have a few sets of values for comparison. Because the likelihood of a pair of values being equal is there, I want to discard this result and move onto the next.
So for example, i have t(7 downto 0), and I compare t(0) with t(1), t(2) with t(3), and so forth till t(6) with t(7). This theoretically should give me a maximum of 4 bits. This process is continuous, so there will be a constant flow of 4 bits. Maybe stored as data(3 downto 0) in a register?
Now, the problem is, because there is a chance that I will get an "=" case, I would like to disregard that bit. Say, the last bit is discarded such that we have data(2 downto 0) since data(3) is buh-bye. But this data will be incomplete and will create latch (I'm actually making stuff up here. Correct me if I'm wrong).
So perhaps any guru out there would like to enlighten this lost soul? Danke schoen!