From: Florent Kermarrec Date: Mon, 16 Nov 2015 15:11:31 +0000 (+0100) Subject: soc/interconnect/stream/SyncFIFO: expose fifo level X-Git-Tag: 24jan2021_ls180~2059 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f52d364affc6f5483ff8c3e635f0469abe7525a;p=litex.git soc/interconnect/stream/SyncFIFO: expose fifo level --- diff --git a/litex/soc/interconnect/stream.py b/litex/soc/interconnect/stream.py index f0a78101..89231d1d 100644 --- a/litex/soc/interconnect/stream.py +++ b/litex/soc/interconnect/stream.py @@ -113,6 +113,7 @@ class SyncFIFO(_FIFOWrapper): self, fifo.SyncFIFOBuffered if buffered else fifo.SyncFIFO, layout, depth) + self.level = self.fifo.level class AsyncFIFO(_FIFOWrapper): diff --git a/litex/soc/interconnect/stream_packet.py b/litex/soc/interconnect/stream_packet.py index cf2309c7..6a4e2d4f 100644 --- a/litex/soc/interconnect/stream_packet.py +++ b/litex/soc/interconnect/stream_packet.py @@ -379,6 +379,6 @@ class Buffer(Module): # compute almost full if almost_full is not None: self.almost_full = Signal() - self.comb += self.almost_full.eq(data_fifo.fifo.level > almost_full) + self.comb += self.almost_full.eq(data_fifo.level > almost_full) # XXX