From: Florent Kermarrec Date: Mon, 9 Feb 2015 18:24:49 +0000 (+0100) Subject: icmp: replace fifo with packet buffer and reduce buffering X-Git-Tag: 24jan2021_ls180~2604^2~55 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=13e9e23a942db76915d12bede4cb73b3d63a2d4d;p=litex.git icmp: replace fifo with packet buffer and reduce buffering --- diff --git a/liteeth/core/icmp/__init__.py b/liteeth/core/icmp/__init__.py index d2e0abe4..35a69cc9 100644 --- a/liteeth/core/icmp/__init__.py +++ b/liteeth/core/icmp/__init__.py @@ -113,12 +113,12 @@ class LiteEthICMPEcho(Module): self.sink = sink = Sink(eth_icmp_user_description(8)) self.source = source = Source(eth_icmp_user_description(8)) ### - self.submodules.fifo = fifo = SyncFIFO(eth_icmp_user_description(8), 512, buffered=True) + self.submodules.buffer = PacketBuffer(eth_icmp_user_description(8), 128, 2) self.comb += [ - Record.connect(sink, fifo.sink), - Record.connect(fifo.source, source), + Record.connect(sink, self.buffer.sink), + Record.connect(self.buffer.source, source), self.source.msgtype.eq(0x0), - self.source.checksum.eq(~((~fifo.source.checksum)-0x0800)) + self.source.checksum.eq(~((~self.buffer.source.checksum)-0x0800)) ] class LiteEthICMP(Module):