liteusb: add basic wishbone frontend (We could also reuse Etherbone in the future)
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 1 May 2015 18:20:20 +0000 (20:20 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 1 May 2015 18:44:59 +0000 (20:44 +0200)
misoclib/com/liteusb/frontend/wishbone.py [new file with mode: 0644]

diff --git a/misoclib/com/liteusb/frontend/wishbone.py b/misoclib/com/liteusb/frontend/wishbone.py
new file mode 100644 (file)
index 0000000..fceb54f
--- /dev/null
@@ -0,0 +1,14 @@
+from migen.fhdl.std import *
+
+from misoclib.com.liteusb.common import *
+from misoclib.tools.litescope.bridge.wishbone import LiteScopeWishboneBridge
+
+class LiteUSBWishboneBridge(LiteScopeWishboneBridge):
+    def __init__(self, port, clk_freq):
+        LiteScopeWishboneBridge.__init__(self, port, clk_freq)
+        self.comb += [
+            port.sink.sop.eq(1),
+            port.sink.eop.eq(1),
+            port.sink.length.eq(1),
+            port.sink.dst.eq(port.tag)
+        ]