]> jspc29.x-matter.uni-frankfurt.de Git - trb3.git/commitdiff
Try this as ram readout
authorAndreas Neiser <neiser@kph.uni-mainz.de>
Fri, 20 Feb 2015 16:29:07 +0000 (17:29 +0100)
committerAndreas Neiser <neiser@kph.uni-mainz.de>
Sat, 13 Jun 2015 15:36:58 +0000 (17:36 +0200)
ADC/source/adc_processor_cfd.vhd

index 5b2d57c0d670a3878ada076a8cd35d40de53f327..764827d513dc22d42eb83712c405e6aee024159f 100644 (file)
@@ -126,6 +126,11 @@ begin
         elsif READOUT_RX.valid_timing_trg = '1' then
           state <= CFD_READOUT;
           channelselect := 0;
+          -- if there's already new data present, 
+          -- start moving the counter already now 
+          if ram_data_sys(channelselect) /= x"00000000" then
+            ram_counter(channelselect) <= ram_counter(channelselect) + 1;
+          end if;
         end if;
 
       when RELEASE_DIRECT =>
@@ -156,6 +161,7 @@ begin
         if ram_data_sys(channelselect) = x"00000000" then
           if channelselect = 3 then
             state <= RELEASE_DIRECT;
+            channelselect := 0;
           else
             channelselect := channelselect + 1;
           end if;