From 12cfc9d43bf473a15d37b6ba871b4238649d0449 Mon Sep 17 00:00:00 2001 From: Jean THOMAS Date: Wed, 8 Jul 2020 14:51:34 +0200 Subject: [PATCH] Remove useless variables in _Steerer, ensure command array has 4 elements --- gram/core/multiplexer.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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() -- 2.30.2