add elaborate function
[sv2nmigen.git] / examples / assignment.py
index d48fff95bcdf8fddeb247c9c2aa748dbcb2c94ea..c338a6bf7a26fd3bf07be6c0f2965947ad83b6a0 100644 (file)
@@ -1,8 +1,16 @@
-from nmigen import Memory, Module, Signal, Cat, Elaboratable
-# module_1
-#clsdeclNode(compound_stmt, [Node(classdef, [Leaf(1, 'class'), Leaf(1, 'assignment'), Leaf(11, ':'), Node(suite, [Leaf(4, '\n'), Leaf(5, '    '), Node(stmt, [Node(small_stmt, [Node(pass_stmt, [Leaf(1, 'pass')]), Leaf(4, '\n')]), Leaf(5, '        '), Leaf(3, 'self.i = Signal() # input'), Leaf(5, '        '), Leaf(3, Leaf(4, '\n')), Leaf(5, '        '), Leaf(3, 'self.o = Signal() # output')]), Leaf(6, '')])])])
-#clsstr:
-class assignment(self):
+# this file has been generated by sv2nmigen
+
+from nmigen import Signal, Module, Const, Cat, Elaboratable
+
+
+
+#ASSIGN[None, Leaf(1, 'o'), '=', Leaf(1, 'i')]
+class assignment(Elaboratable):
+
     def __init__(self):
     def __init__(self):
-        self.i = Signal() # input        
+        self.i = Signal() # input
         self.o = Signal() # output
         self.o = Signal() # output
+    def elaborate(self, platform=None):
+        m = Module()
+        return m
+