LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
--USE ieee.std_logic_unsigned.ALL;
ENTITY tristate IS
PORT( sram_io : INOUT STD_LOGIC_VECTOR (7 DOWNTO 0);
sram_te, sram_fe : IN STD_LOGIC;
sram_f : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
sram_t : IN STD_LOGIC_VECTOR (7 DOWNTO 0));
END tristate;
architecture tristate of tristate is
BEGIN
sram_f <= sram_io WHEN (sram_fe = '1' AND sram_te = '0') ELSE (OTHERS => 'Z');
sram_io <= sram_t WHEN (sram_te = '1' AND sram_fe = '0') ELSE (OTHERS => 'Z');
END tristate;
Name:
Anonymous2011-12-11 18:35
Actually I'm going to ask about this: As mentioned above, I use Z in my code. I have never, nor have I ever heard of anybody doing this, used any of the other values of STD_LOGIC.