From: Jean THOMAS Date: Tue, 4 Aug 2020 13:43:56 +0000 (+0200) Subject: Raise ValueError if commands array isn't of len=4 (fixing #48) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=afafadffe4d59cc943ca6879c36ebe461add8120;p=gram.git Raise ValueError if commands array isn't of len=4 (fixing #48) --- diff --git a/gram/core/multiplexer.py b/gram/core/multiplexer.py index f59c389..37114dc 100644 --- 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))]