add dummy Display function
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 13 Sep 2020 13:11:12 +0000 (14:11 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 13 Sep 2020 13:11:12 +0000 (14:11 +0100)
src/nmutil/util.py

index 5e8660b9c070e8b167e01d1bc2b109c7b53e3af3..c9e95cc6e585bda3610f6ab24612f0b8a41201a3 100644 (file)
@@ -58,3 +58,15 @@ def rising_edge(m, sig):
     m.d.comb += rising.eq(sig & ~delay) # sig is hi but delay-sig is lo
     return rising
 
+
+# Display function (dummy if non-existent)
+# added as a patch from jeanthom
+# https://gist.githubusercontent.com/jeanthom/
+#           f97f5b928720d4adda9d295e8a5bc078/
+#           raw/694274e0aceec993c0fc127e296b1a85b93c1b89/nmigen-display.diff
+try:
+    from nmigen.hdl.ast import Display
+except ImportError:
+    def Display(*args):
+        return []
+