From 1761bfba8a3eff7b7399e7c856ec1d0e55f16ce7 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Sat, 2 May 2015 16:15:08 +0200 Subject: [PATCH] litescope/frontend/wishbone: add support for packetized mode --- misoclib/tools/litescope/frontend/wishbone.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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) -- 2.30.2