------------------------------------------------------------------------------- -- Title : z-Channel lookup-table -- Project : Prototype implementation of the GTU of the Alice TRD Experiment ------------------------------------------------------------------------------- -- File : zch_table.vhd -- Author : Jan de Cuveland -- Company : -- Last update: 2003/05/26 -- Platform : ------------------------------------------------------------------------------- -- This is a prototype implementation of the Global Tracking Unit (GTU) -- of the Alice TRD detector. ------------------------------------------------------------------------------- -- Description: Conversion from z (Padrow number) to channel ------------------------------------------------------------------------------- -- Revisions : -- Date Version Author Description -- 2003/01/20 1.0 cuveland Created ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use work.gtu_types.all; ------------------------------------------------------------------------------- entity zch_table is generic ( plane : integer; -- 0..5 zunit : integer); -- 0..2 port ( chamber : in unsigned(2 downto 0); -- 0..4 z : in unsigned(3 downto 0); -- padrow number index : out unsigned(2 downto 0)); -- index number (or "000") end zch_table; ------------------------------------------------------------------------------- architecture default of zch_table is signal chamber_slv : std_logic_vector(2 downto 0); signal z_slv : std_logic_vector(3 downto 0); begin -- default chamber_slv <= std_logic_vector(chamber); z_slv <= std_logic_vector(z); -- This file has been generated by zChannelGen.cxx -- lut0_0 : if (plane = 0) and (zunit = 0) generate lut0_0s : process (chamber_slv, z_slv) begin -- process lut0_0s if (chamber_slv = "000") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "110"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "110"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "110"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "110"; else index <= "---"; end if; end process lut0_0s; end generate lut0_0; lut0_1 : if (plane = 0) and (zunit = 1) generate lut0_1s : process (chamber_slv, z_slv) begin -- process lut0_1s if (chamber_slv = "000") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "000"; else index <= "---"; end if; end process lut0_1s; end generate lut0_1; lut0_2 : if (plane = 0) and (zunit = 2) generate lut0_2s : process (chamber_slv, z_slv) begin -- process lut0_2s if (chamber_slv = "000") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "101"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "101"; else index <= "---"; end if; end process lut0_2s; end generate lut0_2; lut1_0 : if (plane = 1) and (zunit = 0) generate lut1_0s : process (chamber_slv, z_slv) begin -- process lut1_0s if (chamber_slv = "000") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "110"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "110"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "110"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "110"; else index <= "---"; end if; end process lut1_0s; end generate lut1_0; lut1_1 : if (plane = 1) and (zunit = 1) generate lut1_1s : process (chamber_slv, z_slv) begin -- process lut1_1s if (chamber_slv = "000") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "000"; else index <= "---"; end if; end process lut1_1s; end generate lut1_1; lut1_2 : if (plane = 1) and (zunit = 2) generate lut1_2s : process (chamber_slv, z_slv) begin -- process lut1_2s if (chamber_slv = "000") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "101"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "000"; else index <= "---"; end if; end process lut1_2s; end generate lut1_2; lut2_0 : if (plane = 2) and (zunit = 0) generate lut2_0s : process (chamber_slv, z_slv) begin -- process lut2_0s if (chamber_slv = "000") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "110"; else index <= "---"; end if; end process lut2_0s; end generate lut2_0; lut2_1 : if (plane = 2) and (zunit = 1) generate lut2_1s : process (chamber_slv, z_slv) begin -- process lut2_1s if (chamber_slv = "000") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "000"; else index <= "---"; end if; end process lut2_1s; end generate lut2_1; lut2_2 : if (plane = 2) and (zunit = 2) generate lut2_2s : process (chamber_slv, z_slv) begin -- process lut2_2s if (chamber_slv = "000") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "000"; else index <= "---"; end if; end process lut2_2s; end generate lut2_2; lut3_0 : if (plane = 3) and (zunit = 0) generate lut3_0s : process (chamber_slv, z_slv) begin -- process lut3_0s if (chamber_slv = "000") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "110"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "110"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "110"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "110"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "110"; else index <= "---"; end if; end process lut3_0s; end generate lut3_0; lut3_1 : if (plane = 3) and (zunit = 1) generate lut3_1s : process (chamber_slv, z_slv) begin -- process lut3_1s if (chamber_slv = "000") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "000"; else index <= "---"; end if; end process lut3_1s; end generate lut3_1; lut3_2 : if (plane = 3) and (zunit = 2) generate lut3_2s : process (chamber_slv, z_slv) begin -- process lut3_2s if (chamber_slv = "000") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "000"; else index <= "---"; end if; end process lut3_2s; end generate lut3_2; lut4_0 : if (plane = 4) and (zunit = 0) generate lut4_0s : process (chamber_slv, z_slv) begin -- process lut4_0s if (chamber_slv = "000") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "110"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "110"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "110"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "110"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "110"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "000"; else index <= "---"; end if; end process lut4_0s; end generate lut4_0; lut4_1 : if (plane = 4) and (zunit = 1) generate lut4_1s : process (chamber_slv, z_slv) begin -- process lut4_1s if (chamber_slv = "000") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "000"; else index <= "---"; end if; end process lut4_1s; end generate lut4_1; lut4_2 : if (plane = 4) and (zunit = 2) generate lut4_2s : process (chamber_slv, z_slv) begin -- process lut4_2s if (chamber_slv = "000") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "000"; else index <= "---"; end if; end process lut4_2s; end generate lut4_2; lut5_0 : if (plane = 5) and (zunit = 0) generate lut5_0s : process (chamber_slv, z_slv) begin -- process lut5_0s if (chamber_slv = "000") and (z_slv = "0000") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "110"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "110"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "110"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "110"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "110"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "000"; else index <= "---"; end if; end process lut5_0s; end generate lut5_0; lut5_1 : if (plane = 5) and (zunit = 1) generate lut5_1s : process (chamber_slv, z_slv) begin -- process lut5_1s if (chamber_slv = "000") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "000"; else index <= "---"; end if; end process lut5_1s; end generate lut5_1; lut5_2 : if (plane = 5) and (zunit = 2) generate lut5_2s : process (chamber_slv, z_slv) begin -- process lut5_2s if (chamber_slv = "000") and (z_slv = "0000") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "000") and (z_slv = "0010") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0011") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "000") and (z_slv = "0101") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0110") then index <= "011"; elsif (chamber_slv = "000") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1000") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "000") and (z_slv = "1010") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1011") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "000") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "000") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "001") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "001") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "001") and (z_slv = "1001") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "001") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "001") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "001") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "010") and (z_slv = "0011") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0110") then index <= "010"; elsif (chamber_slv = "010") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1001") then index <= "011"; elsif (chamber_slv = "010") and (z_slv = "1010") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "010") and (z_slv = "1100") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "010") and (z_slv = "1111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0001") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "011") and (z_slv = "0100") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0110") then index <= "010"; elsif (chamber_slv = "011") and (z_slv = "0111") then index <= "000"; elsif (chamber_slv = "011") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1001") then index <= "011"; elsif (chamber_slv = "011") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1100") then index <= "100"; elsif (chamber_slv = "011") and (z_slv = "1101") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1110") then index <= "101"; elsif (chamber_slv = "011") and (z_slv = "1111") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "0000") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0001") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0010") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0011") then index <= "001"; elsif (chamber_slv = "100") and (z_slv = "0100") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0101") then index <= "010"; elsif (chamber_slv = "100") and (z_slv = "0110") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "0111") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1000") then index <= "011"; elsif (chamber_slv = "100") and (z_slv = "1001") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1010") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1011") then index <= "100"; elsif (chamber_slv = "100") and (z_slv = "1100") then index <= "101"; elsif (chamber_slv = "100") and (z_slv = "1101") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1110") then index <= "000"; elsif (chamber_slv = "100") and (z_slv = "1111") then index <= "000"; else index <= "---"; end if; end process lut5_2s; end generate lut5_2; end default;