attribute syn_useioff of FLASH_CS : signal is true;
attribute syn_useioff of FLASH_IN : signal is true;
attribute syn_useioff of FLASH_OUT : signal is true;
-
+ attribute syn_useioff of HDR_IO : signal is false;
--Serdes: Backplane
--Backplane A2,A3,A0,A1 Slave 3,4,1,2, A0: TrbNet from backplane
signal med_ctrl_op : std_logic_vector (11*16-1 downto 0);
signal rdack, wrack : std_logic;
signal reset_from_net_i : std_logic;
+ signal send_reset_i : std_logic;
+ signal external_reset_delayed : std_logic_vector(4 downto 0);
signal trig_gen_out_i : std_logic_vector(3 downto 0);
signal monitor_inputs_i : std_logic_vector(17 downto 0);
NET_CLK_FULL_IN => med2int(9).clk_full,
NET_CLK_HALF_IN => med2int(9).clk_half,
RESET_FROM_NET => reset_from_net_i,
- SEND_RESET_IN => med2int(9).stat_op(15),
+ SEND_RESET_IN => send_reset_i,
BUS_RX => bustc_rx,
BUS_TX => bustc_tx,
LED_GREEN_OUT => LED_RJ_GREEN,
DEBUG_OUT => debug_clock_reset
);
-reset_from_net_i <= med2int(9).stat_op(13) or reset_via_gbe;
+reset_from_net_i <= med2int(9).stat_op(13) or external_reset_delayed(4) ;
+send_reset_i <= med2int(9).stat_op(15); --int2med(0).ctrl_op(15) or;
---------------------------------------------------------------------------
-- TrbNet Uplink
SD_LOS_IN(2) => backplane_rx_present(5),
SD_TXDIS_OUT(2) => backplane_tx_present(5),
SD_PRSNT_N_IN(3) => SFP_MOD0(1),
- SD_LOS_IN(3) => SFP_LOS(1),
+ SD_LOS_IN(3) => '0', --SFP_LOS(1),
SD_TXDIS_OUT(3) => SFP_TX_DIS(1),
--Control Interface
BUS_RX => bussci2_rx,
CTRL_DEBUG => (others => '0')
);
- external_reset_i <= reset_via_gbe or med2int(INTERFACE_NUM-1).stat_op(15);
+ external_reset_i <= reset_via_gbe; -- or med2int(9).stat_op(13);
+
+ process begin
+ wait until rising_edge(clk_sys);
+ external_reset_delayed(0) <= external_reset_delayed(0) or external_reset_i;
+ external_reset_delayed(3) <= external_reset_delayed(2);
+ external_reset_delayed(4) <= external_reset_delayed(2) and not external_reset_delayed(3);
+ if timer.tick_us = '1' then
+ external_reset_delayed(1) <= external_reset_delayed(0);
+ external_reset_delayed(2) <= external_reset_delayed(1);
+ end if;
+ if reset_i = '1' then
+ external_reset_delayed <= (others => '0');
+ end if;
+ end process;
+
end generate;
wrack <= ctrlbus_tx.ack or ctrlbus_tx.wack;
reboot_from_gbe <= '0';
reset_via_gbe <= '0';
+ external_reset_delayed <= (others => '0');
end generate;
---------------------------------------------------------------------------
-- TEST_LINE <= med_stat_debug(15 downto 0);
+ TEST_LINE(0) <= med2int(9).stat_op(13);
+ TEST_LINE(1) <= med2int(9).stat_op(15);
+ TEST_LINE(2) <= clear_i;
+ TEST_LINE(3) <= reset_i;
+ TEST_LINE(4) <= med2int(9).dataready;
+ TEST_LINE(5) <= int2med(9).dataready;
+ TEST_LINE(6) <= med2int(7).dataready;
+ TEST_LINE(7) <= int2med(7).dataready;
+-- TEST_LINE(7) <= med2int(9).stat_op(9);
end architecture;
STAT_DEBUG => open,
CTRL_DEBUG => (others => '0')
);
- external_reset_i <= reset_via_gbe or med2int(INTERFACE_NUM-1).stat_op(15);
+ external_reset_i <= reset_via_gbe; -- or med2int(INTERFACE_NUM-1).stat_op(15);
end generate;
not (med2int(8).stat_op(10) or med2int(8).stat_op(11) or not med2int(8).stat_op(9)) when INCLUDE_GBE = 1 and USE_BACKPLANE = 1 else
'1';
-
+ TEST_LINE(0) <= med2int(INTERFACE_NUM-1).stat_op(13);
+ TEST_LINE(1) <= med2int(INTERFACE_NUM-1).stat_op(15);
+ TEST_LINE(2) <= clear_i;
+ TEST_LINE(3) <= reset_i;
+-- TEST_LINE(4) <= time_counter(26);
+-- TEST_LINE(5) <= BACK_GPIO(1);
+-- TEST_LINE(6) <= sfp_txdis_i;
+ TEST_LINE(7) <= med2int(INTERFACE_NUM-1).stat_op(9);
+
end architecture;
NET_CLK_FULL_IN => med2int(0).clk_full,
NET_CLK_HALF_IN => med2int(0).clk_half,
RESET_FROM_NET => med2int(0).stat_op(13),
+ SEND_RESET_IN => med2int(0).stat_op(15),
BUS_RX => bustc_rx,
BUS_TX => bustc_tx,
--TEST_LINE <= med2int(0).dataready & int2med(0).dataready & med2int(0).data(6 downto 0) & int2med(0).data(6 downto 0);
-TEST_LINE <= med_stat_debug(15 downto 0);
-
+-- TEST_LINE <= med_stat_debug(15 downto 0);
+ TEST_LINE(0) <= med2int(0).stat_op(13);
+ TEST_LINE(1) <= med2int(0).stat_op(15);
+ TEST_LINE(2) <= clear_i;
+ TEST_LINE(3) <= reset_i;
+ TEST_LINE(4) <= time_counter(26);
+ TEST_LINE(5) <= BACK_GPIO(1);
+ TEST_LINE(6) <= sfp_txdis_i;
+ TEST_LINE(7) <= med2int(0).stat_op(9);
-------------------------------------------------------------------------------
-- TDC
-------------------------------------------------------------------------------
--TRIG_RIGHT : in std_logic; --not used
--Backplane, all lines
- BACK_GPIO : inout std_logic_vector(15 downto 0);
+-- BACK_GPIO : inout std_logic_vector(15 downto 0);
BACK_LVDS : inout std_logic_vector( 1 downto 0);
BACK_3V3 : inout std_logic_vector( 3 downto 0);
--Backplane for slaves on trbv3scbp1
--- BACK_GPIO : inout std_logic_vector(3 downto 0);
+ BACK_GPIO : inout std_logic_vector(3 downto 0);
--AddOn Connector
--to be added
--Trigger & Monitor
MONITOR_INPUTS => KEL(32 downto 1),--(others => '0'),
TRIG_GEN_INPUTS => KEL(32 downto 1),--(others => '0'),
- TRIG_GEN_OUTPUTS => BACK_GPIO(3 downto 1),--open,
+ TRIG_GEN_OUTPUTS => BACK_GPIO(3 downto 2),--open,
--SED
SED_ERROR_OUT => sed_error_i,
--Slowcontrol
end process;
-- TEST_LINE <= med_stat_debug(15 downto 0);
- TEST_LINE(15 downto 0) <= debug_clock_reset(15 downto 14) & med2int(0).stat_op(13) & clear_i & reset_i & debug_clock_reset(10 downto 0);
-
+-- TEST_LINE(15 downto 0) <= debug_clock_reset(15 downto 14) & med2int(0).stat_op(13) & clear_i & reset_i & debug_clock_reset(10 downto 0);
+ TEST_LINE(0) <= med2int(0).stat_op(13);
+ TEST_LINE(1) <= med2int(0).stat_op(15);
+ TEST_LINE(2) <= clear_i;
+ TEST_LINE(3) <= reset_i;
+ TEST_LINE(4) <= med2int(0).dataready;
+ TEST_LINE(5) <= int2med(0).dataready;
+ TEST_LINE(6) <= sfp_txdis_i;
+ TEST_LINE(7) <= med2int(0).stat_op(9);
-- readout_tx(0).data_finished <= '1';
-- readout_tx(0).data_write <= '0';
-- readout_tx(0).busy_release <= '1';