SFP_MOD_0 : in std_logic;
--AddOn
--- FE_GPIO : inout std_logic_vector(11 downto 0);
--- FE_CLK : out std_logic_vector( 2 downto 1);
--- FE_DIFF : inout std_logic_vector(63 downto 0);
INP : in std_logic_vector(63 downto 0);
CS : out std_logic_vector(4 downto 1);
signal link_tx_ready_i : std_logic;
signal debug_i : std_logic_vector(31 downto 0);
signal tx_fsm_state : std_logic_vector(3 downto 0);
-
+ signal rx_dlm_word_i : std_logic_vector(7 downto 0);
+ signal rx_dlm_i : std_logic;
+
begin
trigger_in_i <= (TRIG_IN_BACKPL and IN_SELECT_EXT_CLOCK) or (TRIG_IN_RJ45 and not IN_SELECT_EXT_CLOCK);
MEDIA_MED2INT => med2int(0),
MEDIA_INT2MED => int2med(0),
-- komma operation
- RX_DLM_OUT => open,
- RX_DLM_WORD_OUT => open,
+ RX_DLM_OUT => rx_dlm_i, --open,
+ RX_DLM_WORD_OUT => rx_dlm_word_i, --open,
TX_DLM_IN => '0',
TX_DLM_WORD_IN => x"00",
RX_RST_OUT => open,
BACK_GPIO(0) <= sfp_txdis_i;
end generate;
+ LED_EXT_CLOCK <= not std_logic(rx_dlm_word_i(7));
+
HDR_IO(15 downto 12) <= tx_fsm_state;
- HDR_IO(11) <= init_quad;
+ HDR_IO(11) <= rx_dlm_i;
HDR_IO(10) <= clear_i;
HDR_IO(9) <= tx_clk_avail_i;
HDR_IO(8) <= tx_pll_lol_dual_a;
-- LED <= x"F0";
LED_RJ_GREEN <= "00";
LED_RJ_RED <= "11";
- LED_EXT_CLOCK <= IN_SELECT_EXT_CLOCK or led_off;
+-- LED_EXT_CLOCK <= IN_SELECT_EXT_CLOCK or led_off;
-------------------------------------------------------------------------------
-- TDC
-------------------------------------------------------------------------------
- THE_TDC : entity work.TDC_record
- generic map (
- CHANNEL_NUMBER => NUM_TDC_CHANNELS,
- STATUS_REG_NR => 21,
- DEBUG => c_NO,
- SIMULATION => c_NO
- )
- port map (
- RESET => reset_i,
- CLK_TDC => clk_full,
- CLK_READOUT => clk_sys,
- REFERENCE_TIME => trigger_in_i,
- HIT_IN => hit_in_i(NUM_TDC_CHANNELS-1 downto 1),
- HIT_CAL_IN => clk_cal,
- -- Trigger signals from handler
- BUSRDO_RX => readout_rx,
- BUSRDO_TX => readout_tx(0),
- -- Slow control bus
- BUS_RX => bustdc_rx,
- BUS_TX => bustdc_tx,
- -- Dubug signals
- INFO_IN => timer,
- LOGIC_ANALYSER_OUT => open
- );
-
+-- THE_TDC : entity work.TDC_record
+-- generic map (
+-- CHANNEL_NUMBER => NUM_TDC_CHANNELS,
+-- STATUS_REG_NR => 21,
+-- DEBUG => c_NO,
+-- SIMULATION => c_NO
+-- )
+-- port map (
+-- RESET => reset_i,
+-- CLK_TDC => clk_full,
+-- CLK_READOUT => clk_sys,
+-- REFERENCE_TIME => trigger_in_i,
+-- HIT_IN => hit_in_i(NUM_TDC_CHANNELS-1 downto 1),
+-- HIT_CAL_IN => clk_cal,
+-- -- Trigger signals from handler
+-- BUSRDO_RX => readout_rx,
+-- BUSRDO_TX => readout_tx(0),
+-- -- Slow control bus
+-- BUS_RX => bustdc_rx,
+-- BUS_TX => bustdc_tx,
+-- -- Dubug signals
+-- INFO_IN => timer,
+-- LOGIC_ANALYSER_OUT => open
+-- );
-------------------------------------------------------------------------------
-- No trigger/data endpoint included
-------------------------------------------------------------------------------
--- readout_tx(0).data_finished <= '1';
--- readout_tx(0).data_write <= '0';
--- readout_tx(0).busy_release <= '1';
+ readout_tx(0).data_finished <= '1';
+ readout_tx(0).data_write <= '0';
+ readout_tx(0).busy_release <= '1';
end architecture;