-- Compare Event Information
---------------------------------------------------------------------------
- PROC_COMPARE_NUMBER : process(CLOCK)
+-- PROC_COMPARE_NUMBER : process(CLOCK)
+-- begin
+-- if rising_edge(CLOCK) then
+-- if current_state = IDLE then
+-- error_sync <= '0';
+-- elsif dat_fifo_valid_read = '1' then
+-- if DAT_HDR_DATA_IN(3 downto 0) /= DAT_DATA_FLAGS_IN(dat_fifo_number*4+3 downto dat_fifo_number*4+0) then
+-- error_sync <= '1';
+-- end if;
+-- end if;
+-- end if;
+-- end process;
+
+ PROC_COMPARE_NUMBER : process
begin
- if rising_edge(CLOCK) then
- if current_state = IDLE then
- error_sync <= '0';
- elsif dat_fifo_valid_read = '1' then
- if DAT_HDR_DATA_IN(3 downto 0) /= DAT_DATA_FLAGS_IN(dat_fifo_number*4+3 downto dat_fifo_number*4+0) then
- error_sync <= '1';
- end if;
- end if;
+ wait until rising_edge(CLOCK);
+ if current_state = IDLE then
+ error_sync <= '0';
+ elsif dat_fifo_valid_read = '1' and (
+ DAT_HDR_DATA_IN(0) /= DAT_DATA_FLAGS_IN(dat_fifo_number*4+0) or
+ DAT_HDR_DATA_IN(1) /= DAT_DATA_FLAGS_IN(dat_fifo_number*4+1) or
+ DAT_HDR_DATA_IN(2) /= DAT_DATA_FLAGS_IN(dat_fifo_number*4+2) or
+ DAT_HDR_DATA_IN(3) /= DAT_DATA_FLAGS_IN(dat_fifo_number*4+3)
+ ) then
+ error_sync <= '1';
end if;
end process;