Simplify tck expression
authorJean THOMAS <git0@pub.jeanthomas.me>
Tue, 28 Jul 2020 12:08:33 +0000 (14:08 +0200)
committerJean THOMAS <git0@pub.jeanthomas.me>
Tue, 28 Jul 2020 12:08:33 +0000 (14:08 +0200)
gram/phy/ecp5ddrphy.py

index f477a73d953e89cdfa8c3488599d0d41a7489fe4..e573cacf84cec267a10045373682bfcbd201a911 100644 (file)
@@ -106,7 +106,7 @@ class ECP5DDRPHY(Peripheral, Elaboratable):
         self.dfi = Interface(addressbits, bankbits, nranks, 4*databits, 4)
 
         # PHY settings -----------------------------------------------------------------------------
-        tck = 2/(2*2*self._sys_clk_freq)
+        tck = 1/(2*self._sys_clk_freq)
         nphases = 2
         databits = len(self.pads.dq.io)
         nranks = 1 if not hasattr(self.pads, "cs") else len(self.pads.cs.o0)
@@ -137,7 +137,7 @@ class ECP5DDRPHY(Peripheral, Elaboratable):
 
         m.submodules.bridge = self._bridge
 
-        tck = 2/(2*2*self._sys_clk_freq)
+        tck = 1/(2*self._sys_clk_freq)
         nphases = 2
         databits = len(self.pads.dq.io)