From: Jean THOMAS Date: Wed, 8 Jul 2020 12:51:34 +0000 (+0200) Subject: Remove useless variables in _Steerer, ensure command array has 4 elements X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=12cfc9d43bf473a15d37b6ba871b4238649d0449;p=gram.git Remove useless variables in _Steerer, ensure command array has 4 elements --- diff --git a/gram/core/multiplexer.py b/gram/core/multiplexer.py index fa521fd..b813b80 100644 --- a/gram/core/multiplexer.py +++ b/gram/core/multiplexer.py @@ -143,11 +143,10 @@ class _Steerer(Elaboratable): """ def __init__(self, commands, dfi): + assert len(commands) == 4 self._commands = commands self._dfi = dfi - ncmd = len(commands) - nph = len(dfi.phases) - self.sel = [Signal(range(ncmd)) for i in range(nph)] + self.sel = [Signal(range(len(commands))) for i in range(len(dfi.phases))] def elaborate(self, platform): m = Module()