projects
/
nmutil.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43e728f
)
1 extra bit on mask shift size needed, to allow ">" to work
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Wed, 19 Aug 2020 04:44:20 +0000
(
05:44
+0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Wed, 19 Aug 2020 04:44:20 +0000
(
05:44
+0100)
src/nmutil/mask.py
patch
|
blob
|
history
diff --git
a/src/nmutil/mask.py
b/src/nmutil/mask.py
index a75d7e34a1675b37d9f1e97174074a932c4a7209..223752297e0d48ffeffc23f3c6ca02280270c13e 100644
(file)
--- 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):