From 6c408b0a885518a181d2cecc1204aac61c64ed52 Mon Sep 17 00:00:00 2001 From: Jean THOMAS Date: Tue, 4 Aug 2020 15:48:24 +0200 Subject: [PATCH] Raise ValueError if the number of DQ pads is not a multiple of 8 (fixing #48) --- gram/phy/ecp5ddrphy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() -- 2.30.2