set initial element to b_interval shape
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 15 Feb 2020 15:46:24 +0000 (15:46 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 15 Feb 2020 15:46:24 +0000 (15:46 +0000)
src/ieee754/part_shift/part_shift_dynamic.py

index f2394d5a279c810f8ac41cc3ea84d78e50787a83..bfd8b244fba6889fac2ab87bc2868de37d770059 100644 (file)
@@ -157,7 +157,8 @@ class PartitionedDynamicShift(Elaboratable):
         # for o2 (namely, a2bx, a1bx, and a0b0). If I calculate the
         # partial results [a0b0, a1bx, a2bx, a3bx], I can use just
         # those partial results to calculate a0, a1, a2, and a3
-        element = b_intervals[0] & shifter_masks[0]
+        element = Signal(b_intervals[0].shape(), reset_less=True)
+        comb += element.eq(b_intervals[0] & shifter_masks[0])
         partial_results = []
         partial = Signal(width, name="partial0", reset_less=True)
         comb += partial.eq(a_intervals[0] << element)