X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=examples%2Fassignment.py;h=c338a6bf7a26fd3bf07be6c0f2965947ad83b6a0;hb=ef7e6ced2fbede9970934dfc86140ab241f1a32d;hp=d48fff95bcdf8fddeb247c9c2aa748dbcb2c94ea;hpb=71d1f25d91fd5bfa2396591c0833dfa56f3f6f3a;p=sv2nmigen.git diff --git a/examples/assignment.py b/examples/assignment.py index d48fff9..c338a6b 100644 --- a/examples/assignment.py +++ b/examples/assignment.py @@ -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): - self.i = Signal() # input + self.i = Signal() # input self.o = Signal() # output + def elaborate(self, platform=None): + m = Module() + return m +