litescope/frontend/wishbone: add support for packetized mode

This commit is contained in:
Florent Kermarrec 2015-05-02 16:15:08 +02:00
parent ff51bde7f0
commit 1761bfba8a
1 changed files with 8 additions and 0 deletions

View File

@ -139,3 +139,11 @@ class LiteScopeWishboneBridge(Module):
)
)
)
if phy.sink.description.packetized:
self.comb += [
phy.sink.sop.eq((byte_counter.value == 0) & (word_counter.value == 0)),
phy.sink.eop.eq((byte_counter.value == 3) & (word_counter.value == (length-1)))
]
if hasattr(phy.sink, "length"):
self.comb += phy.sink.length.eq(4*length)