From: Jan Michel Date: Sat, 9 May 2020 13:52:23 +0000 (+0200) Subject: fix handling of non-existing counters on bus X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=9d389e15b160ef391790f2fc8378003325aa92fc;p=trb3.git fix handling of non-existing counters on bus --- diff --git a/base/code/input_statistics.vhd b/base/code/input_statistics.vhd index 6aa0bbe..4ef7be8 100644 --- a/base/code/input_statistics.vhd +++ b/base/code/input_statistics.vhd @@ -139,7 +139,7 @@ begin fifo_read(to_integer(unsigned(ADDR_IN(4 downto 0)))) <= '1'; fifo_select <= to_integer(unsigned(ADDR_IN(4 downto 0))); fifo_wait <= '1'; - elsif ADDR_IN(6) = '1' and tmp < INPUTS then + elsif ADDR_IN(6) = '1' and to_integer(unsigned(ADDR_IN(5 downto 0))) < INPUTS then DATA_OUT(23 downto 0) <= std_logic_vector(cnt(to_integer(unsigned(ADDR_IN(5 downto 0))))); ACK_OUT <= '1'; else