From 9cac606760b0fb8ea0ec89cc05aa1f4d5231a829 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 19 Aug 2020 05:44:20 +0100 Subject: [PATCH] 1 extra bit on mask shift size needed, to allow ">" to work --- src/nmutil/mask.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nmutil/mask.py b/src/nmutil/mask.py index a75d7e3..2237522 100644 --- a/src/nmutil/mask.py +++ b/src/nmutil/mask.py @@ -5,7 +5,7 @@ from nmigen.utils import log2_int class Mask(Elaboratable): def __init__(self, sz): self.sz = sz - self.shift = Signal(log2_int(sz, False)) + self.shift = Signal(log2_int(sz, False)+1) self.mask = Signal(sz) def elaborate(self, platform): -- 2.30.2