Eliminate unused entries in shift matrix
authorMichael Nolan <mtnolan2640@gmail.com>
Wed, 12 Feb 2020 19:12:48 +0000 (14:12 -0500)
committerMichael Nolan <mtnolan2640@gmail.com>
Wed, 12 Feb 2020 19:12:48 +0000 (14:12 -0500)
src/ieee754/part_shift/part_shift_dynamic.py

index 97be1118e016164896d5f35927b36deb9f32e560..f67bdd6e0ee120b292a559e44aebedccba267efa 100644 (file)
@@ -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))