From: Florent Kermarrec Date: Sat, 2 May 2015 14:15:08 +0000 (+0200) Subject: litescope/frontend/wishbone: add support for packetized mode X-Git-Tag: 24jan2021_ls180~2268 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1761bfba8a3eff7b7399e7c856ec1d0e55f16ce7;p=litex.git litescope/frontend/wishbone: add support for packetized mode --- diff --git a/misoclib/tools/litescope/frontend/wishbone.py b/misoclib/tools/litescope/frontend/wishbone.py index 7937498f..e7e00660 100644 --- a/misoclib/tools/litescope/frontend/wishbone.py +++ b/misoclib/tools/litescope/frontend/wishbone.py @@ -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)