From: Michael Nolan Date: Wed, 12 Feb 2020 19:12:48 +0000 (-0500) Subject: Eliminate unused entries in shift matrix X-Git-Tag: ls180-24jan2020~184 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=439794049b8a53cdb67cdf477c61634eca8886db;p=ieee754fpu.git Eliminate unused entries in shift matrix --- 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))