From 9d2894727e2416d6cce6f9ec116f3c0345bbaf9c Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 30 Jan 2020 09:35:40 +0100 Subject: [PATCH] inteconnect/stream: use PipeValid implementation for Buffer --- litex/soc/interconnect/stream.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/litex/soc/interconnect/stream.py b/litex/soc/interconnect/stream.py index 9f81e76c..b25a58bf 100644 --- a/litex/soc/interconnect/stream.py +++ b/litex/soc/interconnect/stream.py @@ -592,19 +592,6 @@ class Monitor(Module, AutoCSR): underflow_counter = MonitorCounter(reset, latch, ~endpoint.valid & endpoint.ready, self.underflows.status) self.submodules += underflow_counter -# Buffer ------------------------------------------------------------------------------------------- - -class Buffer(PipelinedActor): - def __init__(self, layout): - self.sink = Endpoint(layout) - self.source = Endpoint(layout) - PipelinedActor.__init__(self, 1) - self.sync += \ - If(self.pipe_ce, - self.source.payload.eq(self.sink.payload), - self.source.param.eq(self.sink.param) - ) - # Pipe --------------------------------------------------------------------------------------------- class PipeValid(Module): @@ -658,6 +645,10 @@ class PipeReady(Module): ) ] +# Buffer ------------------------------------------------------------------------------------------- + +class Buffer(PipeValid): pass # FIXME: Replace Buffer with PipeValid in codebase? + # Cast --------------------------------------------------------------------------------------------- class Cast(CombinatorialActor): -- 2.30.2