]> jspc29.x-matter.uni-frankfurt.de Git - trb3.git/commitdiff
performance increase for 200MHz - cu
authorhadaq <hadaq>
Wed, 20 Mar 2013 10:12:52 +0000 (10:12 +0000)
committerhadaq <hadaq>
Wed, 20 Mar 2013 10:12:52 +0000 (10:12 +0000)
tdc_releases/tdc_v1.3/Channel.vhd
tdc_releases/tdc_v1.3/Readout.vhd

index e45423d2f4a77f6b638055d4c6c63599d68a43e8..1f6d6df1f98a3fb5784386823a9c166489e27eae 100644 (file)
@@ -52,6 +52,7 @@ architecture Channel of Channel is
 
   -- time stamp
   signal coarse_cntr_reg : std_logic_vector(10 downto 0);
+  signal trig_win_end_i  : std_logic;
 
   -- debug
   signal sync_q                : std_logic_vector(2 downto 0);
@@ -76,6 +77,7 @@ architecture Channel of Channel is
   attribute syn_preserve                    : boolean;
   attribute syn_preserve of coarse_cntr_reg : signal is true;
   attribute syn_preserve of hit_buf         : signal is true;
+  attribute syn_preserve of trig_win_end_i  : signal is true;
   attribute nomerge                         : string;
   attribute nomerge of hit_buf              : signal is "true";
 
@@ -95,7 +97,7 @@ begin
       CLK_100              => CLK_100,
       RESET_100            => RESET_100,
       HIT_IN               => hit_buf,
-      TRIGGER_WIN_END_IN   => TRIGGER_WIN_END_IN,
+      TRIGGER_WIN_END_IN   => trig_win_end_i,
       EPOCH_COUNTER_IN     => EPOCH_COUNTER_IN,
 --      DATA_FINISHED_IN     => data_finished_i,
       COARSE_COUNTER_IN    => coarse_cntr_reg,
@@ -108,6 +110,7 @@ begin
       ENCODER_START_OUT    => encoder_start_i,
       ENCODER_FINISHED_OUT => encoder_finished_i);
 
+  trig_win_end_i <= TRIGGER_WIN_END_IN when rising_edge(CLK_200);
 --  data_finished_i <= DATA_FINISHED_IN when rising_edge(CLK_100);
 
   pulse_sync_encoder_start : pulse_sync
index ee3397dd4f471277773897040aa5d409b13894a4..477ece94c88b91db114bb4653b12912197335ecd 100644 (file)
@@ -5,7 +5,7 @@
 -- File       : Readout.vhd
 -- Author     : cugur@gsi.de
 -- Created    : 2012-10-25
--- Last update: 2013-03-07
+-- Last update: 2013-03-20
 -------------------------------------------------------------------------------
 -- Description: 
 -------------------------------------------------------------------------------
@@ -224,7 +224,7 @@ begin  -- behavioral
   begin
     if rising_edge(CLK_200) then
       if RESET_200 = '1' then
-        trg_win_cnt     <= '1' & trg_win_post_200;
+        trg_win_cnt <= '1' & trg_win_post_200;
       elsif start_trg_win_cnt_200_p = '1' then
         trg_win_end_200 <= '0';
         trg_win_cnt     <= "000000000001";
@@ -379,11 +379,12 @@ begin  -- behavioral
           readout_fsm           <= '1';
         elsif VALID_NOTIMING_TRG_IN = '1' then
           if TRG_TYPE_IN = x"E" then
-            RD_NEXT <= SEND_STATUS;
+            wr_header_fsm <= '1';
+            RD_NEXT       <= SEND_STATUS;
           else
-            RD_NEXT <= SEND_TRG_RELEASE_A;
+            data_finished_fsm <= '1';
+            RD_NEXT           <= SEND_TRG_RELEASE_A;
           end if;
-          wr_header_fsm <= '1';
         elsif INVALID_TRG_IN = '1' then
           RD_NEXT           <= SEND_TRG_RELEASE_A;
           data_finished_fsm <= '1';