From: Jean THOMAS Date: Tue, 4 Aug 2020 13:45:37 +0000 (+0200) Subject: Raise ValueError if anti-starvation timeout is unsupported (fixing #48) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=51815f1d7530b6bd5458271092562b243f90f684;p=gram.git Raise ValueError if anti-starvation timeout is unsupported (fixing #48) --- diff --git a/gram/core/multiplexer.py b/gram/core/multiplexer.py index 37114dc..9de4b2b 100644 --- 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):