From 74da4406afac70f8d2969e0b047c84b05212788d Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 22 Feb 2020 23:55:51 +0000 Subject: [PATCH] fix shiftermask error on pwid=0 --- src/ieee754/part_shift/part_shift_dynamic.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/ieee754/part_shift/part_shift_dynamic.py b/src/ieee754/part_shift/part_shift_dynamic.py index 04a6bec0..4f75cc86 100644 --- a/src/ieee754/part_shift/part_shift_dynamic.py +++ b/src/ieee754/part_shift/part_shift_dynamic.py @@ -23,15 +23,19 @@ class ShifterMask(Elaboratable): self.min_bits = min_bits self.pwid = pwid self.mask = Signal(bwid, reset_less=True) - self.gates = Signal(pwid, reset_less=True) + if pwid != 0: + self.gates = Signal(pwid, reset_less=True) def elaborate(self, platform): m = Module() comb = m.d.comb + minm = (1<