liteeth/mac: fix padding limit (+1), netboot OK with sim platform
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 9 Mar 2015 19:59:34 +0000 (20:59 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 9 Mar 2015 19:59:34 +0000 (20:59 +0100)
misoclib/com/liteeth/mac/core/padding.py

index b30fc44ede31ebffeacf409b79eb38c4b4d4478f..f9ea898e2a1d8f08b8b8b1b14c60c712eb49b688 100644 (file)
@@ -17,7 +17,7 @@ class LiteEthMACPaddingInserter(Module):
                        If(sink.stb & sink.ack,
                                counter.ce.eq(1),
                                If(sink.eop,
-                                       If(counter.value < (packet_min_data-1),
+                                       If(counter.value < packet_min_data,
                                                source.eop.eq(0),
                                                NextState("PADDING")
                                        )
@@ -26,7 +26,7 @@ class LiteEthMACPaddingInserter(Module):
                )
                fsm.act("PADDING",
                        source.stb.eq(1),
-                       source.eop.eq(counter.value == (packet_min_data-1)),
+                       source.eop.eq(counter.value == packet_min_data),
                        source.data.eq(0),
                        If(source.ack,
                                counter.ce.eq(1),