From: Jean THOMAS Date: Tue, 4 Aug 2020 13:48:24 +0000 (+0200) Subject: Raise ValueError if the number of DQ pads is not a multiple of 8 (fixing #48) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6c408b0a885518a181d2cecc1204aac61c64ed52;p=gram.git Raise ValueError if the number of DQ pads is not a multiple of 8 (fixing #48) --- diff --git a/gram/phy/ecp5ddrphy.py b/gram/phy/ecp5ddrphy.py index bdd02dd..de4cbdd 100644 --- a/gram/phy/ecp5ddrphy.py +++ b/gram/phy/ecp5ddrphy.py @@ -85,7 +85,8 @@ class ECP5DDRPHY(Peripheral, Elaboratable): self._sys_clk_freq = sys_clk_freq databits = len(self.pads.dq.io) - assert databits % 8 == 0 + if databits % 8 != 0: + raise ValueError("DQ pads should come in a multiple of 8") # CSR bank = self.csr_bank()