);
port(
RESET : in std_logic;
+ RESET_FLAGS_IN : in std_logic;
RESET_STATS_IN : in std_logic;
CLOCK : in std_logic;
--Timing Trigger
WRONG_POLAR_PROC : process(CLOCK)
begin
if rising_edge(CLOCK) then
- if (RESET = '1') or (RESET_STATS_IN = '1') then
+ if (RESET = '1') or (RESET_FLAGS_IN = '1') then
wrong_polarity <= '0';
elsif (trigger_length > 100) then
wrong_polarity <= '1';
STATUS_OUT(10 downto 8) <= (others => '0');
STATUS_OUT(3 downto 0) <= bsm_x;
- if (RESET = '1') or (RESET_STATS_IN = '1') then
+ if (RESET = '1') or (RESET_FLAGS_IN = '1') then
STATUS_OUT(7 downto 4) <= (others => '0');
STATUS_OUT(13) <= '0';
elsif (val_trg = '1') or (invalid_trg = '1') then
);
port(
RESET : in std_logic;
+ RESET_TRBNET : in std_logic;
CLK : in std_logic;
CLK_125_IN : in std_logic;
signal spimem_data_out : std_logic_vector(31 downto 0);
signal spi_fake_ack : std_logic;
- signal dma_start_address_i : std_logic_vector(31 downto 0);
- signal dma_length_i : std_logic_vector(31 downto 0);
signal dma_control_i : std_logic_vector(31 downto 0);
signal dma_status_i : std_logic_vector(31 downto 0);
signal dma_config_i : std_logic_vector(31 downto 0);
begin
- RESET_i <= RESET;
APL_MY_ADDRESS_IN <= x"FCCC";
THE_HUB : trb_net16_hub_base
USE_ONEWIRE => c_NO,
BROADCAST_SPECIAL_ADDR => x"FF",
MII_NUMBER => NUM_LINKS,
- MII_IS_UPLINK => (NUM_LINKS => c_YES, NUM_LINKS+1 => c_YES, others => c_NO), --NUM_LINKS => c_YES, NUM_LINKS+1 => c_YES,
+ MII_IS_UPLINK => (NUM_LINKS => c_YES, NUM_LINKS+1 => c_YES, 0 => c_YES, others => c_NO), --NUM_LINKS => c_YES, NUM_LINKS+1 => c_YES,
MII_IS_DOWNLINK => (others => c_YES), --NUM_LINKS => c_YES, NUM_LINKS+1 => c_YES,
MII_IS_UPLINK_ONLY => (others => c_NO), --NUM_LINKS => c_YES,
INIT_ENDPOINT_ID => x"0001",
)
port map (
CLK => CLK,
- RESET => RESET,
+ RESET => RESET_TRBNET,
CLK_EN => '1',
--Media interfacces
port map (
-- Misc
CLK => CLK,
- RESET => RESET_i,
+ RESET => RESET_TRBNET,
CLK_EN => '1',
-- APL Transmitter port
APL_DATA_IN => APL_DATA_IN(i*16+15 downto i*16),
& "00000" & apl_fifo_count_out(11*channel_address+10 downto 11*channel_address);
when x"30" =>
bus_data_i <= api_status(channel_address*32+31 downto channel_address*32);
- when x"70" =>
- bus_data_i <= dma_start_address_i;
- when x"71" =>
- bus_data_i <= dma_length_i;
when x"72" =>
bus_data_i <= dma_status_i;
when x"73" =>
sender_error <= (others => '0');
dma_control_i <= (others => '0');
reg_extended_trigger_information <= (others => '0');
- dma_config_i <= x"00000030";
+ dma_config_i <= x"00000020";
wren_length_fifo <= '0';
wren_addr_fifo <= '0';
else
THE_DMA_CORE : dma_core
port map(
- RESET_IN => reset_i,
+ RESET_IN => RESET,
CLK_IN => CLK,
CLK_125_IN => CLK_125_IN,
if buf_REGIO_COMMON_CTRL_REG_OUT(4) = '1' then
lvl1_tmg_trg_missing_flag <= '0';
- elsif int_lvl1_missing_tmg_trg = '1' then
+ elsif int_lvl1_missing_tmg_trg = '1' or int_lvl1_spurious_trg = '1' or int_spike_detected = '1' then
lvl1_tmg_trg_missing_flag <= '1';
end if;
)
port map(
RESET => reset_trg_logic,
+ RESET_FLAGS_IN => buf_REGIO_COMMON_CTRL_REG_OUT(4),
RESET_STATS_IN => buf_REGIO_COMMON_CTRL_REG_OUT(5),
CLOCK => CLK,
--Timing Trigger
signal INIT_POOL_PACKET_NUM : std_logic_vector(c_NUM_WIDTH-1 downto 0);
signal init_has_read_from_pool : std_logic_vector(POINT_NUMBER-1 downto 0);
signal saved_INIT_TYPE, current_INIT_TYPE : std_logic_vector(2 downto 0);
+ signal buf_INIT_DATAREADY_OUT : std_logic_vector (POINT_NUMBER-1 downto 0);
signal buf_INIT_READ_OUT : std_logic_vector(POINT_NUMBER-1 downto 0);
signal buf_REPLY_READ_OUT : std_logic_vector(POINT_NUMBER-1 downto 0);
--Output init data to obufs
----------------------------------
gen_init_data_out: for i in 0 to POINT_NUMBER-1 generate
- INIT_DATAREADY_OUT(i) <= INIT_POOL_DATAREADY and not init_has_read_from_pool(i) and real_activepoints(i) and not locking_point(i);
+ buf_INIT_DATAREADY_OUT(i) <= INIT_POOL_DATAREADY and not init_has_read_from_pool(i) and real_activepoints(i) and not locking_point(i);
INIT_DATA_OUT((i+1)*c_DATA_WIDTH-1 downto i*c_DATA_WIDTH) <= INIT_POOL_DATA;
INIT_PACKET_NUM_OUT((i+1)*c_NUM_WIDTH-1 downto i*c_NUM_WIDTH) <= INIT_POOL_PACKET_NUM;
end generate;
-
+INIT_DATAREADY_OUT <= buf_INIT_DATAREADY_OUT;
----------------------------------
--Locking of channels
-- elsif timer_ms_tick = '1' and INIT_READ_IN(i) = '0' and INIT_DATAREADY_OUT(i) = '1' then
-- timeout_counter(i) <= timeout_counter(i) + to_unsigned(2,2);
elsif timer_ms_tick = '1' and ((REPLY_POOL_next_read = '1') -- and got_trm(i) = '0'
- or (INIT_READ_IN(i) = '0' and INIT_DATAREADY_OUT(i) = '1')) then
+ or (INIT_READ_IN(i) = '0' and buf_INIT_DATAREADY_OUT(i) = '1')) then
timeout_counter(i) <= timeout_counter(i) + to_unsigned(1,1);
end if;
end if;
);\r
port(\r
RESET : in std_logic;\r
+ RESET_TRBNET : in std_logic;\r
CLK : in std_logic;\r
CLK_125_IN : in std_logic;\r
\r
);\r
port(\r
RESET : in std_logic;\r
+ RESET_FLAGS_IN : in std_logic;\r
RESET_STATS_IN : in std_logic;\r
CLOCK : in std_logic;\r
--Timing Trigger\r