soc/interconnect/packet/Depacketizer: use both sink.valid and sink.ready to update...
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Thu, 16 Jan 2020 08:46:54 +0000 (09:46 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Thu, 16 Jan 2020 08:46:54 +0000 (09:46 +0100)
litex/soc/interconnect/packet.py

index 7ac82027d4e63059eb7619ba44ddb7fadc13ce77..961179e65bebc60c1d7c25bf6c57ce381527a659 100644 (file)
@@ -336,7 +336,7 @@ class Depacketizer(Module):
                 )
             )
         )
-        self.sync += If(sink.ready, sink_d.eq(sink))
+        self.sync += If(sink.valid & sink.ready, sink_d.eq(sink))
         fsm.act("UNALIGNED-DATA-COPY",
             source.valid.eq(sink.valid | sink_d.last),
             source.last.eq(sink.last | sink_d.last),