From 9cd7dc3088168a2d1ab8920a4907695bef17e08b Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 16 Mar 2016 19:45:43 +0100 Subject: [PATCH] global: use SyncFIFO instead of Buffer --- example_designs/targets/udp.py | 4 +--- liteeth/core/icmp.py | 4 ++-- liteeth/core/udp.py | 3 ++- liteeth/frontend/etherbone.py | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/example_designs/targets/udp.py b/example_designs/targets/udp.py index 62aa311..7fe979d 100644 --- a/example_designs/targets/udp.py +++ b/example_designs/targets/udp.py @@ -1,7 +1,5 @@ from liteeth.common import * -from litex.soc.interconnect.stream_packet import Buffer - from targets.base import BaseSoC @@ -19,7 +17,7 @@ class UDPSoC(BaseSoC): def add_udp_loopback(self, port, dw, depth, name=None): port = self.core.udp.crossbar.get_port(port, dw) - buf = Buffer(eth_udp_user_description(dw), depth//(dw//8), 8) + buf = stream.SyncFIFO(eth_udp_user_description(dw), depth//(dw//8)) if name is None: self.submodules += buf else: diff --git a/liteeth/core/icmp.py b/liteeth/core/icmp.py index 2590eeb..668f57b 100644 --- a/liteeth/core/icmp.py +++ b/liteeth/core/icmp.py @@ -1,6 +1,6 @@ from liteeth.common import * -from litex.soc.interconnect.stream_packet import Depacketizer, Packetizer, Buffer +from litex.soc.interconnect.stream_packet import Depacketizer, Packetizer # icmp tx @@ -127,7 +127,7 @@ class LiteEthICMPEcho(Module): # # # # TODO: optimize ressources (no need to store parameters as datas) - self.submodules.buffer = Buffer(eth_icmp_user_description(8), 128, 2) + self.submodules.buffer = stream.SyncFIFO(eth_icmp_user_description(8), 128) self.comb += [ sink.connect(self.buffer.sink), self.buffer.source.connect(source), diff --git a/liteeth/core/udp.py b/liteeth/core/udp.py index 81b5e57..9547d57 100644 --- a/liteeth/core/udp.py +++ b/liteeth/core/udp.py @@ -1,7 +1,8 @@ from liteeth.common import * from liteeth.crossbar import LiteEthCrossbar -from litex.soc.interconnect.stream_packet import Depacketizer, Packetizer, Buffer +from litex.soc.interconnect import stream +from litex.soc.interconnect.stream_packet import Depacketizer, Packetizer # udp crossbar diff --git a/liteeth/frontend/etherbone.py b/liteeth/frontend/etherbone.py index 6e5fd4c..ead0c48 100644 --- a/liteeth/frontend/etherbone.py +++ b/liteeth/frontend/etherbone.py @@ -272,7 +272,7 @@ class LiteEthEtherboneRecordSender(Module): # # # # TODO: optimize ressources (no need to store parameters as datas) - pbuffer = Buffer(eth_etherbone_mmap_description(32), buffer_depth) + pbuffer = stream.SyncFIFO(eth_etherbone_mmap_description(32), buffer_depth) self.submodules += pbuffer self.comb += sink.connect(pbuffer.sink)