From c3173996cbb578f75aa217826dcaf55b730323e6 Mon Sep 17 00:00:00 2001 From: Andreas Neiser Date: Mon, 23 Feb 2015 09:33:47 +0100 Subject: [PATCH] resize ram counters properly --- ADC/source/adc_processor_cfd.vhd | 2 +- ADC/source/adc_processor_cfd_ch.vhd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ADC/source/adc_processor_cfd.vhd b/ADC/source/adc_processor_cfd.vhd index 94dd995..0a71b00 100644 --- a/ADC/source/adc_processor_cfd.vhd +++ b/ADC/source/adc_processor_cfd.vhd @@ -93,7 +93,7 @@ begin DEBUG => debug_adc(i) ); - ram_addr_sys(i) <= std_logic_vector(ram_counter(i)); + ram_addr_sys(i) <= std_logic_vector(resize(ram_counter(i),ram_addr_sys(i)'length)); dpram : entity work.dpram_32x512 port map(WrAddress => ram_addr_adc(i), RdAddress => ram_addr_sys(i), diff --git a/ADC/source/adc_processor_cfd_ch.vhd b/ADC/source/adc_processor_cfd_ch.vhd index 9f97c4a..c2f65cf 100644 --- a/ADC/source/adc_processor_cfd_ch.vhd +++ b/ADC/source/adc_processor_cfd_ch.vhd @@ -221,7 +221,7 @@ begin end process proc_integral_delay; -- ZeroX detect, integrate, write to RAM - RAM_ADDR <= std_logic_vector(ram_counter); + RAM_ADDR <= std_logic_vector(resize(ram_counter,RAM_ADDR'length)); proc_zeroX_gate : process is variable zeroX : std_logic := '0'; variable integral_counter : integer range 0 to 2 ** CONF.IntegrateWindow'length - 1; -- 2.43.0