core/mac/sram: add csr for fifo level of sram reader (for the linux driver)

This commit is contained in:
Florent Kermarrec 2017-12-31 07:12:55 +01:00
parent c9ec30df2f
commit 2788294834
1 changed files with 3 additions and 1 deletions

View File

@ -149,6 +149,7 @@ class LiteEthMACSRAMReader(Module, AutoCSR):
self._start = CSR()
self._ready = CSRStatus()
self._level = CSRStatus(log2_int(nslots) + 1)
self._slot = CSRStorage(slotbits)
self._length = CSRStorage(lengthbits)
@ -165,7 +166,8 @@ class LiteEthMACSRAMReader(Module, AutoCSR):
fifo.sink.valid.eq(self._start.re),
fifo.sink.slot.eq(self._slot.storage),
fifo.sink.length.eq(self._length.storage),
self._ready.status.eq(fifo.sink.ready)
self._ready.status.eq(fifo.sink.ready),
self._level.status.eq(fifo.level)
]
# length computation