]> jspc29.x-matter.uni-frankfurt.de Git - trbv2.git/commitdiff
buffer rd en was not correct
authorpalka <palka>
Fri, 22 Feb 2008 13:46:38 +0000 (13:46 +0000)
committerpalka <palka>
Fri, 22 Feb 2008 13:46:38 +0000 (13:46 +0000)
tdc_interface.vhd

index 236dc00bed4390a3a77d1a2225a5ba13080c468b..9be11d5fb06dbc9dcadee6f16372afa10f58e688 100755 (executable)
@@ -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;