Tri-State Buffer Example
GENERIC(trise : delay := 6 ns;
ARCHITECTURE behav OF tri_state IS
IF (e = '1' AND a = '1') THEN
-- enabled and valid data
ELSIF (e = '1' AND a = '0') THEN
ELSIF (e = '0') THEN -- disabled
ELSE -- invalid data or enable
b <= 'X' AFTER (trise+tfall)/2;
Notes:
This is a tri-state buffer example. It is similar to the AND gate, but in this case, it uses the ‘Z’ value as well as the ‘X’ value. Also, a thiz delay (to indicate a driver “turn off” time ) is used in addition to the rise and fall delay times.