From: Jean THOMAS Date: Fri, 17 Jul 2020 16:39:09 +0000 (+0200) Subject: Code cleaning in ECP5 PHY X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=29e394a72601b97a82d713e6cf4c2c86a0c2bc2d;p=gram.git Code cleaning in ECP5 PHY --- diff --git a/gram/phy/ecp5ddrphy.py b/gram/phy/ecp5ddrphy.py index e4a0a5b..139b40e 100644 --- a/gram/phy/ecp5ddrphy.py +++ b/gram/phy/ecp5ddrphy.py @@ -145,9 +145,6 @@ class ECP5DDRPHY(Peripheral, Elaboratable): tck = 2/(2*2*self._sys_clk_freq) nphases = 2 databits = len(self.pads.dq.io) - nranks = 1 if not hasattr(self.pads, "cs_n") else len(self.pads.cs_n.o) - addressbits = len(self.pads.a.o0) - bankbits = len(self.pads.ba.o0) # Init ------------------------------------------------------------------------------------- m.submodules.init = init = ECP5DDRPHYInit() @@ -186,14 +183,14 @@ class ECP5DDRPHY(Peripheral, Elaboratable): self.pads.ba.o_clk.eq(ClockSignal("dramsync")), self.pads.ba.o_fclk.eq(ClockSignal("sync2x")), ] - for i in range(addressbits): + for i in range(len(self.pads.a.o0)): m.d.comb += [ self.pads.a.o0[i].eq(dfi.phases[0].address[i]), self.pads.a.o1[i].eq(dfi.phases[0].address[i]), self.pads.a.o2[i].eq(dfi.phases[1].address[i]), self.pads.a.o3[i].eq(dfi.phases[1].address[i]), ] - for i in range(bankbits): + for i in range(len(self.pads.ba.o0)): m.d.comb += [ self.pads.ba.o0[i].eq(dfi.phases[0].bank[i]), self.pads.ba.o1[i].eq(dfi.phases[0].bank[i]),