From: Andreas Neiser Date: Fri, 20 Feb 2015 16:29:07 +0000 (+0100) Subject: Try this as ram readout X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=1c29bbe7d09c3269162251dc9dda2292d240a532;p=trb3.git Try this as ram readout --- diff --git a/ADC/source/adc_processor_cfd.vhd b/ADC/source/adc_processor_cfd.vhd index 5b2d57c..764827d 100644 --- a/ADC/source/adc_processor_cfd.vhd +++ b/ADC/source/adc_processor_cfd.vhd @@ -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;