-- tristate.vhd -- Eurobot 2004 : APB Team -- Auteur : Pierre-André Galmes -- Composant three-state (trois états : 0, 1 ou Z). -- Principe : -- Bloc trois états (three-state) qui met les sorties en hautes impédance si -- elle ne sont pas "enabled". library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; use work.isa_const.all; use work.nono_const.all; entity tristate is port ( enable : in std_logic; data_in : in T_DATA; data_out : out T_DATA ); end entity; architecture RTL of tristate is begin -- partie combinatoire. data_out <= data_in when (enable = '1') else (others => 'Z'); end RTL;