deal with zero-width ShiftMask
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 21 Feb 2020 13:00:57 +0000 (13:00 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 21 Feb 2020 13:00:57 +0000 (13:00 +0000)
src/ieee754/part_shift/part_shift_dynamic.py

index c051397bd52b0e7d8595efdb80c1c92a546cafbb..daa1ec07a3d0df02f21b8af174fc14c98a2a007f 100644 (file)
@@ -31,7 +31,7 @@ class ShifterMask(Elaboratable):
 
         # zero-width mustn't try to do anything
         if self.pwid == 0:
-            self.mask.eq((1<<min_bits)-1)
+            self.mask.eq((1<<self.min_bits)-1)
             return m
 
         bits = Signal(self.pwid, reset_less=True)