From e30d63033a9677c1379517af1b02522b28ae9108 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq <sebastien@milkymist.org> Date: Sat, 27 Aug 2011 15:13:51 +0200 Subject: [PATCH] divider: fix counter width calculation --- core/tdc_divider.vhd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tdc_divider.vhd b/core/tdc_divider.vhd index be4b749..c380dc1 100644 --- a/core/tdc_divider.vhd +++ b/core/tdc_divider.vhd @@ -56,7 +56,7 @@ begin end function; signal qr : std_logic_vector(2*g_WIDTH-1 downto 0); -signal counter : std_logic_vector(f_log2_size(g_WIDTH)-1 downto 0); +signal counter : std_logic_vector(f_log2_size(g_WIDTH+1)-1 downto 0); signal divisor_r : std_logic_vector(g_WIDTH-1 downto 0); signal diff : std_logic_vector(g_WIDTH downto 0); signal ready : std_logic; -- GitLab