gram.phy.ecp5ddrphy: Detect burstdet on rising edge, not by logic level
authorJean THOMAS <git0@pub.jeanthomas.me>
Fri, 7 Aug 2020 10:24:09 +0000 (12:24 +0200)
committerJean THOMAS <git0@pub.jeanthomas.me>
Fri, 7 Aug 2020 10:24:09 +0000 (12:24 +0200)
gram/phy/ecp5ddrphy.py

index b775af79f25a0f693315b6c6614eeb53a2d99842..a7d176429028791a4c91a77cf9eb049ef104be60 100644 (file)
@@ -9,6 +9,7 @@
 import math
 
 from nmigen import *
+from nmigen.hdl.ast import Rose
 from nmigen.lib.cdc import FFSynchronizer
 from nmigen.utils import log2_int
 
@@ -333,7 +334,7 @@ class ECP5DDRPHY(Peripheral, Elaboratable):
                 o_DQSW270=dqsw270,
                 o_DQSW=dqsw)
 
-            with m.If(burstdet):
+            with m.If(Rose(burstdet)):
                 m.d.sync += burstdet_reg[i].eq(1)
 
             # DQS and DM ---------------------------------------------------------------------------