soc/interconnect/stream/SyncFIFO: expose fifo level

This commit is contained in:
Florent Kermarrec 2015-11-16 16:11:31 +01:00
parent 7ed2576ce1
commit 2f52d364af
2 changed files with 2 additions and 1 deletions

View File

@ -113,6 +113,7 @@ class SyncFIFO(_FIFOWrapper):
self, self,
fifo.SyncFIFOBuffered if buffered else fifo.SyncFIFO, fifo.SyncFIFOBuffered if buffered else fifo.SyncFIFO,
layout, depth) layout, depth)
self.level = self.fifo.level
class AsyncFIFO(_FIFOWrapper): class AsyncFIFO(_FIFOWrapper):

View File

@ -379,6 +379,6 @@ class Buffer(Module):
# compute almost full # compute almost full
if almost_full is not None: if almost_full is not None:
self.almost_full = Signal() 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 # XXX