From 439794049b8a53cdb67cdf477c61634eca8886db Mon Sep 17 00:00:00 2001 From: Michael Nolan Date: Wed, 12 Feb 2020 14:12:48 -0500 Subject: [PATCH] Eliminate unused entries in shift matrix --- src/ieee754/part_shift/part_shift_dynamic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ieee754/part_shift/part_shift_dynamic.py b/src/ieee754/part_shift/part_shift_dynamic.py index 97be1118..f67bdd6e 100644 --- a/src/ieee754/part_shift/part_shift_dynamic.py +++ b/src/ieee754/part_shift/part_shift_dynamic.py @@ -69,7 +69,8 @@ class PartitionedDynamicShift(Elaboratable): # actually calculate the shift-partials here for i, b in enumerate(b_intervals): start = 0 - for j, a in enumerate(a_intervals): + for j in range(i, len(a_intervals)): + a = a_intervals[j] end = keys[i] result_width = matrix[i][j].width bwidth = math.ceil(math.log2(result_width + 1)) -- 2.30.2