From 1c29bbe7d09c3269162251dc9dda2292d240a532 Mon Sep 17 00:00:00 2001 From: Andreas Neiser Date: Fri, 20 Feb 2015 17:29:07 +0100 Subject: [PATCH] Try this as ram readout --- ADC/source/adc_processor_cfd.vhd | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 2.43.0