remove continue/skip and add comment that all
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 22 Feb 2022 12:56:59 +0000 (12:56 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 22 Feb 2022 12:56:59 +0000 (12:56 +0000)
control pins have to be requested "xdr:4"

gram/phy/ecp5ddrphy.py

index 17098b15b210fe2eed66030beb032fef1a5c0a1f..336b0635b6afbd7575e2e519792d9461574b568e 100644 (file)
@@ -235,7 +235,9 @@ class ECP5DDRPHY(Peripheral, Elaboratable):
                 self.pads.ba.o3[i].eq(dfi.phases[1].bank[i]),
             ]
 
-        # Control pins
+        # Control pins: all of thees have to be declared "xdr 4" when
+        # requesting the resource:
+        # ddr_pins = platform.request("ddr3", 0, xdr={"clk":4, "odt":4, ... })
         controls = ["ras", "cas", "we", "clk_en", "odt"]
         if hasattr(self.pads, "reset"):
             controls.append("reset")
@@ -244,8 +246,6 @@ class ECP5DDRPHY(Peripheral, Elaboratable):
         for name in controls:
             print ("clock", name, getattr(self.pads, name))
             pad = getattr(self.pads, name)
-            if not hasattr(pad, "o_clk"):
-                continue
             m.d.comb += [
                 pad.o_clk.eq(ClockSignal("dramsync")),
                 pad.o_fclk.eq(ClockSignal("sync2x")),