core/icmp: Use new LiteX's PacketFIFO.
This commit is contained in:
parent
c294a3848e
commit
2b237881d9
|
@ -6,7 +6,7 @@
|
|||
|
||||
from liteeth.common import *
|
||||
|
||||
from litex.soc.interconnect.packet import Depacketizer, Packetizer
|
||||
from litex.soc.interconnect.packet import Depacketizer, Packetizer, PacketFIFO
|
||||
|
||||
# ICMP TX ------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -133,11 +133,14 @@ class LiteEthICMPEcho(Module):
|
|||
|
||||
# # #
|
||||
|
||||
# TODO: optimize ressources (no need to store parameters as datas)
|
||||
self.submodules.buffer = stream.SyncFIFO(eth_icmp_user_description(dw), 128//(dw//8), buffered=True)
|
||||
self.submodules.buffer = PacketFIFO(eth_icmp_user_description(dw),
|
||||
payload_depth = 128//(dw//8),
|
||||
param_depth = 1,
|
||||
buffered = True
|
||||
)
|
||||
self.comb += [
|
||||
sink.connect(self.buffer.sink),
|
||||
self.buffer.source.connect(source),
|
||||
self.buffer.source.connect(source, omit={"checksum"}),
|
||||
self.source.msgtype.eq(0x0),
|
||||
self.source.checksum.eq(self.buffer.source.checksum + 0x800 + (self.buffer.source.checksum >= 0xf800))
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue