liteeth/core/ip: simplify ip rx checksum control
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 24 Apr 2015 09:31:10 +0000 (11:31 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 24 Apr 2015 09:31:10 +0000 (11:31 +0200)
misoclib/com/liteeth/core/ip/__init__.py

index f625f0511c9453a21454ec7947ad8458f73038e4..72d70423498997c954ab6d655d07ce303851d7c2 100644 (file)
@@ -121,8 +121,8 @@ class LiteEthIPRX(Module):
         self.submodules.checksum = checksum = LiteEthIPV4Checksum(skip_checksum=False)
         self.comb += [
             checksum.header.eq(depacketizer.header),
-            checksum.reset.eq(depacketizer.source.stb & depacketizer.source.eop),
-            checksum.ce.eq(depacketizer.source.stb & depacketizer.source.sop)
+            checksum.reset.eq(~(depacketizer.source.stb & depacketizer.source.sop)),
+            checksum.ce.eq(1)
         ]
 
         self.submodules.fsm = fsm = FSM(reset_state="IDLE")