From: palka Date: Fri, 22 Feb 2008 13:46:38 +0000 (+0000) Subject: buffer rd en was not correct X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=c64203663f0349246f656e4daa8097273a3e7f6c;p=trbv2.git buffer rd en was not correct --- diff --git a/tdc_interface.vhd b/tdc_interface.vhd index 236dc00..9be11d5 100755 --- a/tdc_interface.vhd +++ b/tdc_interface.vhd @@ -499,7 +499,7 @@ begin if rising_edge(CLK) then if RESET = '1' then lvl1_data_counter <= (others => '0'); - elsif LVL1_START_fsm_currentstate = SAVE_ADD_DATA_3 then + elsif LVL1_START_fsm_currentstate = SAVE_ADD_DATA_2 then lvl1_data_counter <= words_in_event - 3 - HOW_MANY_ADD_DATA; elsif LVL1_START_fsm_currentstate = SAVE_ADD_DATA_4 and lvl1_data_counter > 0 then lvl1_data_counter <= lvl1_data_counter - 1; @@ -592,12 +592,12 @@ begin end if; end if; end process COUNT_WORDS_IN_EVENT; - TRIGGER_COUNTER_PROC : process (CLK, RESET) + TRIGGER_COUNTER_PROC : process (CLK, RESET, LVL1_START_fsm_currentstate) begin if rising_edge(CLK) then if RESET = '1' then trigger_counter <= (others => '1'); - elsif trigger_with_gen_pulse = '1' then + elsif LVL1_START_fsm_currentstate = SEND_LVL1_TRIGG_1 then trigger_counter <= trigger_counter + 1; else trigger_counter <= trigger_counter;