DEBUG_OUT(63 downto 32) => dbg_pc2
);
-monitor_fifos_q(3 downto 0) <= monitor_fifos(3 downto 0);
-monitor_fifos_q(7 downto 4) <= b"1111" when ((dbg_pc1(28) = '1') or (dbg_pc1(31) = '1'))
- else b"0000";
-monitor_fifos_q(11 downto 8) <= b"1111" when (dbg_fc1(28) = '1') else b"0000";
-monitor_fifos_q(15 downto 12) <= b"1111" when (pcs_an_complete = '0') else b"0000";
+-- gk 04.08.10
+MON_PROC : process(CLK)
+begin
+ if rising_edge(CLK) then
+ monitor_fifos_q(3 downto 0) <= monitor_fifos(3 downto 0);
+ if (dbg_pc1(28) = '1') then
+ monitor_fifos_q(5 downto 4) <= b"11";
+ else
+ monitor_fifos_q(5 downto 4) <= b"00";
+ end if;
+ if (dbg_pc1(30) = '1') then
+ monitor_fifos_q(7 downto 6) <= b"11";
+ else
+ monitor_fifos_q(7 downto 6) <= b"00";
+ end if;
+ if (dbg_fc1(28) = '1') then
+ monitor_fifos_q(11 downto 8) <= b"1111";
+ else
+ monitor_fifos_q(11 downto 8) <= b"0000";
+ end if;
+ if (pcs_an_complete = '0') then
+ monitor_fifos_q(15 downto 12) <= b"1111";
+ else
+ monitor_fifos_q(15 downto 12) <= b"0000";
+ end if;
+ end if;
+end process MON_PROC;
-- Third stage: Frame Constructor
FRAME_CONSTRUCTOR: trb_net16_gbe_frame_constr
signal invalid_hsize_ctr : std_logic_vector(15 downto 0);
signal invalid_hsize_lock : std_logic;
+signal load_eod_q : std_logic;
+signal read_size_q : std_logic_vector(17 downto 0);
+
+-- gk 06.08.10 write to fifo only if gbe is enabled but keep the saving logic unblocked
+signal sf_real_wr_en : std_logic;
+
begin
-- Fake signals
end process SF_DATA_PROC;
-- combinatorial read signal for the FEE data interface, DO NOT USE DIRECTLY
-fee_read_comb <= '1' when ( (sf_afull = '0') and (data_req = '1') and (DATA_GBE_ENABLE_IN = '1') ) -- GbE enabled
+fee_read_comb <= '1' when ( (sf_afull = '0') and (data_req = '1') ) --and (DATA_GBE_ENABLE_IN = '1') ) -- GbE enabled
else '0';
-- combinatorial write signal for the split FIFO, DO NOT USE DIRECTLY
-sf_wr_en_comb <= '1' when ( (fee_read = '1') and (FEE_DATAREADY_IN = '1') and (DATA_GBE_ENABLE_IN = '1') ) or -- GbE enabled
+sf_wr_en_comb <= '1' when ( (fee_read = '1') and (FEE_DATAREADY_IN = '1') ) or -- and (DATA_GBE_ENABLE_IN = '1') ) or -- GbE enabled
(save_addr = '1') or
(add_sub_state = '1') -- gk 29.03.10 save the subsubevent
else '0';
Data(17) => save_eod,
WrClock => CLK,
RdClock => CLK,
- WrEn => sf_wr_en,
+ WrEn => sf_real_wr_en, -- gk 06.08.10 --sf_wr_en,
RdEn => sf_rd_en,
Reset => RESET,
RPReset => RESET,
Full => sf_full,
AlmostFull => sf_afull
);
+-- gk 06.08.10
+sf_real_wr_en <= '1' when ((sf_wr_en = '1') and (DATA_GBE_ENABLE_IN = '1')) else '0';
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
when LIDLE =>
state2 <= x"0";
-- gk 23.07.10
- if( (sf_aempty = '0') and (PC_READY_IN = '1') and (event_waiting = '1') ) then
+ if( (sf_aempty = '0') and (PC_READY_IN = '1') and (event_waiting = '1') and (DATA_GBE_ENABLE_IN = '1') ) then -- gk 06.08.10
loadNextState <= INIT;
rst_rem_ctr_comb <= '1';
rst_regs_comb <= '1';
elsif (drop_headers = '1') then
headers_invalid_ctr <= headers_invalid_ctr + x"1";
dropped_ctr <= dropped_ctr + x"1";
- elsif (load_eod = '1') and (read_size /= x"3fffe") and (invalid_hsize_lock = '0') then
+ elsif (load_eod_q = '1') and (read_size_q /= x"3fffe") and (invalid_hsize_lock = '0') then -- ??
invalid_hsize_ctr <= invalid_hsize_ctr + x"1";
invalid_hsize_lock <= '1';
end if;
end if;
end process INVALID_STATS_PROC;
+-- gk 05.08.10
+INVALID_H_PROC : process(CLK)
+begin
+ if rising_edge(CLK) then
+ load_eod_q <= load_eod;
+ read_size_q <= read_size;
+ end if;
+end process INVALID_H_PROC;
+
-- gk 26.04.10
READOUT_CTR_PROC : process(CLK)
begin
MONITOR_OUT(95 downto 64) <= headers_invalid_ctr;
MONITOR_OUT(127 downto 96) <= dropped_sm_events_ctr;
MONITOR_OUT(159 downto 128) <= dropped_lr_events_ctr;
-MONITOR_OUT(191 downto 160) <= (others => '0');
+MONITOR_OUT(163 downto 160) <= b"1111" when (sf_afull = '1') else b"0000";
+MONITOR_OUT(191 downto 164) <= (others => '0');
-- Outputs
FEE_READ_OUT <= fee_read;