---------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 10:40:51 01/19/2010 -- Design Name: -- Module Name: tristate_buff - Behavioral -- Project Name: -- Target Devices: -- Tool versions: -- Description: -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; ---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity tristate_buff is Port ( DIN : in STD_LOGIC_VECTOR(7 downto 0); DOUT : out STD_LOGIC_VECTOR(7 downto 0); EN_n : in STD_LOGIC); end tristate_buff; architecture Behavioral of tristate_buff is begin process(DIN, EN_n) begin if (EN_n = '0') then DOUT <= DIN; else DOUT <= (others => 'Z'); end if; end process; end Behavioral;