projects
/
gram.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
884f601
)
Raise ValueError if commands array isn't of len=4 (fixing #48)
author
Jean THOMAS
<git0@pub.jeanthomas.me>
Tue, 4 Aug 2020 13:43:56 +0000
(15:43 +0200)
committer
Jean THOMAS
<git0@pub.jeanthomas.me>
Tue, 4 Aug 2020 13:43:56 +0000
(15:43 +0200)
gram/core/multiplexer.py
patch
|
blob
|
history
diff --git
a/gram/core/multiplexer.py
b/gram/core/multiplexer.py
index f59c3894c2edc24b77df069513c4a7ea9cf7e356..37114dca207922f5fcf1db1586373a673a17c65f 100644
(file)
--- a/
gram/core/multiplexer.py
+++ b/
gram/core/multiplexer.py
@@
-140,7
+140,9
@@
class _Steerer(Elaboratable):
"""
def __init__(self, commands, dfi):
- assert len(commands) == 4
+ if len(commands) != 4:
+ raise ValueError("Commands is not the right size")
+
self._commands = commands
self._dfi = dfi
self.sel = [Signal(range(len(commands))) for i in range(len(dfi.phases))]