1 -------------------------------------
2 -- Author: Ryan Rivera, FNAL
3 -- Created: Sep 11, 2015
4 -- on Feb 3 -- BIG CHANGE, to not allow single byte address changing. Now a 32 bit reg in address space.
6 -- This block takes decipher data on rising edge of capture_source_sig, if not 0 or 255
8 -- This allows the 1 byte packet ("CAPTAN Ping") to change the ip addrs of the GEI remotely
10 -- NOTE: reseting returns the GEI to the default address as specified by user logic.
11 -------------------------------------
15 use IEEE.std_logic_1164.
all;
16 use ieee.numeric_std.
all;
19 use work.params_package.
all;
25 data_in : in (7 downto 0);
27 set_ctrl_dest_strobe :
out ;
28 set_data_dest_strobe :
out ;
30 protocol_ping_strobe : out
37 signal capture_old : ;
44 if (rising_edge(clk)) then
46 capture_old <= capture;
47 protocol_ping_strobe <= '0';
48 set_ctrl_dest_strobe <= '0';
49 set_data_dest_strobe <= '0';
51 if (capture_old = '0' and capture = '1') then -- rising edge of source capture
52 if (data_in = x"00") then -- 0s is used as "CAPTAN ping"
53 protocol_ping_strobe <= '1';
54 elsif (data_in = x"01") then -- 1 is used to set ctrl dest with the current source
55 set_ctrl_dest_strobe <= '1';
56 elsif (data_in = x"02") then -- 2 is used to set data dest with the current source
57 set_data_dest_strobe <= '1';
58 --else (data_in = x"FF") -- 1s is used as "CAPTAN no-op"