From 977b6ccf129ce07add7527041bb272483858e3be Mon Sep 17 00:00:00 2001 From: Jean THOMAS Date: Fri, 17 Jul 2020 18:31:48 +0200 Subject: [PATCH] Fix when there are multiple clocks --- gram/phy/ecp5ddrphy.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gram/phy/ecp5ddrphy.py b/gram/phy/ecp5ddrphy.py index 33fd2bd..97d1d7e 100644 --- a/gram/phy/ecp5ddrphy.py +++ b/gram/phy/ecp5ddrphy.py @@ -169,14 +169,16 @@ class ECP5DDRPHY(Peripheral, Elaboratable): rddata_en = Signal(self.settings.read_latency) # Clock -------------------------------------------------------------------------------- + m.d.comb += [ + self.pads.clk.o_clk.eq(ClockSignal("dramsync")), + self.pads.clk.o_fclk.eq(ClockSignal("sync2x")), + ] for i in range(len(self.pads.clk.o0)): m.d.comb += [ - self.pads.clk.o_clk[i].eq(ClockSignal("dramsync")), - self.pads.clk.o_fclk[i].eq(ClockSignal("sync2x")), self.pads.clk.o0[i].eq(0), self.pads.clk.o1[i].eq(1), self.pads.clk.o2[i].eq(0), - self.pads.clk.o3[i].eq(1) + self.pads.clk.o3[i].eq(1), ] # Addresses and Commands --------------------------------------------------------------- -- 2.30.2