projects
/
gram.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afafadf
)
Raise ValueError if anti-starvation timeout is unsupported (fixing #48)
author
Jean THOMAS
<git0@pub.jeanthomas.me>
Tue, 4 Aug 2020 13:45:37 +0000
(15:45 +0200)
committer
Jean THOMAS
<git0@pub.jeanthomas.me>
Tue, 4 Aug 2020 13:45:37 +0000
(15:45 +0200)
gram/core/multiplexer.py
patch
|
blob
|
history
diff --git
a/gram/core/multiplexer.py
b/gram/core/multiplexer.py
index 37114dca207922f5fcf1db1586373a673a17c65f..9de4b2baf8476d80891c525a554a39202d481127 100644
(file)
--- a/
gram/core/multiplexer.py
+++ b/
gram/core/multiplexer.py
@@
-206,6
+206,9
@@
class _Steerer(Elaboratable):
class _AntiStarvation(Elaboratable):
def __init__(self, timeout):
+ if timeout <= 2:
+ raise ValueError("Timeout values under 2 are not currently supported")
+
self.en = Signal()
self.max_time = Signal(reset=1)
self._timeout = timeout
@@
-213,9
+216,6
@@
class _AntiStarvation(Elaboratable):
def elaborate(self, platform):
m = Module()
- # TODO: timeout=1 fails formal checks
- assert self._timeout != 1
-
if self._timeout > 0:
time = Signal(range(self._timeout))
with m.If(~self.en):