otsdaq_prepmodernization  v2_05_02_indev
ext_ip_addr_map.vhd
1 ----------------------------------------------------------------------------------
2 -- Company:
3 -- Engineer:
4 --
5 -- Create Date: 11:49:37 09/28/2017
6 -- Design Name:
7 -- Module Name: ext_ip_addr_map - Behavioral
8 -- Project Name:
9 -- Target Devices:
10 -- Tool versions:
11 -- Description:
12 --
13 -- Dependencies:
14 --
15 -- Revision:
16 -- Revision 0.01 - File Created
17 -- Additional Comments:
18 --
19 ----------------------------------------------------------------------------------
20 library IEEE;
21 use IEEE.STD_LOGIC_1164.ALL;
22 
23 -- Uncomment the following library declaration if using
24 -- arithmetic functions with Signed or Unsigned values
25 --use IEEE.NUMERIC_STD.ALL;
26 
27 -- Uncomment the following library declaration if instantiating
28 -- any Xilinx primitives in this code.
29 --library UNISIM;
30 --use UNISIM.VComponents.all;
31 --
32 --CE109 - 00000100 = 0x04 = 4 => 91 - kicker controller 1
33 --CE110 - 00010100 = 0x14 = 20 => 92 - kicker controller 2
34 --CE112 - 00100100 = 0x24 = 36 => 93 - kicker controller 3
35 --CE106 - 01000100 = 0x44 = 68 => 94 - kicker controller spare
36 --
37 --
38 --192.168.30.91 -- kc1 -- kicker controller 1
39 --192.168.30.92 -- kc2 -- kicker controller 2
40 --192.168.30.93 -- kc3 -- kicker controller 3
41 --192.168.30.94 -- kcc -- kicker controller computer
42 --192.168.30.95 -- kc3 -- kicker controller spare
43 
44 entity ext_ip_addr_map is
45  Port ( ext_ip_addr : in STD_LOGIC_VECTOR (7 downto 0);
46  ip_addr_out : out STD_LOGIC_VECTOR (7 downto 0));
47 end ext_ip_addr_map;
48 
49 architecture Behavioral of ext_ip_addr_map is
50 
51 begin
52 
53  ip_addr_out <= "01011011" when ext_ip_addr = "00000100" else
54  "01011100" when ext_ip_addr = "00010100" else
55  "01011101" when ext_ip_addr = "00100100" else
56  "01011110" when ext_ip_addr = "01000100" else
57  ext_ip_addr;
58 
59 end Behavioral;
60