All internal tri-states must be mapped to multiplexors. The antifuse technology only
supports tri-states as in/out ports, but not internal tri-states. The following examples
show an internal tri-state followed by a multiplexor that the internal tri-state should
change to as in figure below.
Note: Some synthesis tools
automatically map internal tri-states to multiplexors.
Figure 11-34. Internal Tri-State and the Related Multiplexor
VHDL
Tri-State
library IEEE;
use IEEE.std_logic_1164.all;
entity tribus is
port (A, B, C, D : in std_logic_vector(7 downto 0);
E0, E1, E2, E3 : in std_logic;
Q : out std_logic_vector(7 downto 0));
end tribus;
architecture rtl of tribus is
begin
Q <= A when(E0 = '1') else "ZZZZZZZZ";
Q <= B when(E1 = '1') else "ZZZZZZZZ";
Q <= C when(E2 = '1') else "ZZZZZZZZ";
Q <= D when(E3 = '1') else "ZZZZZZZZ";
end rtl;
VHDL
Multiplexor
library IEEE;
use IEEE.std_logic_1164.all;
entity muxbus is
port (A, B, C, D : in std_logic_vector(7 downto 0);
E0, E1, E2, E3 : in std_logic;
Q : out std_logic_vector(7 downto 0));
end muxbus;
architecture rtl of muxbus is
signal E_int : std_logic_vector(1 downto 0);
begin
process (E0, E1, E2, E3)
variable E : std_logic_vector(3 downto 0);
begin
E := E0 & E1 & E2 & E3;
case E is
when "0001" => E_int <= "00";
when "0010" => E_int <= "01";
when "0100" => E_int <= "10";
when "1000" => E_int <= "11";
when others => E_int <= "--";
end case;
end process;
process (E_int, A, B, C, D)
begin
case E_int is
when "00" => Q <= D;
when "01" => Q <= C;
when "10" => Q <= B;
when "11" => Q <= A;
when others => Q <= (others => '-');
end case;
end process;
end rtl;