1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
library ieee; use ieee.std_logic_1164.all; entity ent is port ( a : inout std_logic; enable : in std_logic; d_in : in std_logic; d_out : out std_logic ); end; architecture a of ent is begin process(all) begin if enable then a <= d_in; else a <= 'Z'; end if; end process; d_out <= a; end;