From 03346a2ceb1096bbc820f0dcc8530a8031065d7c Mon Sep 17 00:00:00 2001 From: Andreas Neiser Date: Wed, 18 Feb 2015 15:26:34 +0100 Subject: [PATCH] Fix for Modelsim --- ADC/source/adc_ad9219.vhd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ADC/source/adc_ad9219.vhd b/ADC/source/adc_ad9219.vhd index 62cd932..b8c9afe 100644 --- a/ADC/source/adc_ad9219.vhd +++ b/ADC/source/adc_ad9219.vhd @@ -179,12 +179,13 @@ begin clk_fifo <= clk_adc; fifo_empty <= (others => '0'); -- since we're reading with sampling frequency fill_fifo : process is - variable count : integer range 0 to 7 := 0; + constant count_max : integer := 7; + variable count : integer range 0 to count_max := 0; begin wait until rising_edge(clk_fifo); if RESTART_IN = '1' then count := 0; - elsif count /= count'high then + elsif count /= count_max then count := count + 1; fifo_read <= (others => '0'); else -- 2.43.0