examples/flow/arithmetic: cleanup
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 16 Jun 2012 20:37:25 +0000 (22:37 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 16 Jun 2012 20:37:25 +0000 (22:37 +0200)
examples/dataflow/arithmetic.py

index 414b06c4070d2309918fd2ffb9da9cb1b4044dd9..63f97b167c64db5eee1d55b9b63db3a71b7454f5 100644 (file)
@@ -3,7 +3,6 @@ import sys
 import matplotlib.pyplot as plt
 import networkx as nx
 
-from migen.flow.ala import *
 from migen.flow.network import *
 from migen.flow.composer import *
 from migen.actorlib.sim import *
@@ -25,7 +24,7 @@ class Dumper(SimActor):
                        while True:
                                t = Token("result")
                                yield t
-                               print("Received: " + str(t.value["r"]))
+                               print(t.value["r"])
                super().__init__(dumper_gen(),
                        ("result", Sink, [("r", BV(32))]))
 
@@ -43,7 +42,7 @@ def main():
        ps = gen1 + gen2
        result = ps*gen1 + ps*gen2
        
-       g.add_connection(result.actor_node, Dumper())
+       g.add_connection(result.actor_node, ActorNode(Dumper()))
 
        gen1.actor_node.actor.name = "gen1"
        gen2.actor_node.actor.name = "gen2"