From: Sebastien Bourdeauducq Date: Fri, 22 Jun 2012 11:22:36 +0000 (+0200) Subject: examples/sim/dataflow: use new dataflow API (thanks Ross Manyika for reporting) X-Git-Tag: 24jan2021_ls180~2099^2~895 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=67dc911788a76722aea383c8ce6da07757a82e79;p=litex.git examples/sim/dataflow: use new dataflow API (thanks Ross Manyika for reporting) --- diff --git a/examples/sim/dataflow.py b/examples/sim/dataflow.py index 98d79652..42863f92 100644 --- a/examples/sim/dataflow.py +++ b/examples/sim/dataflow.py @@ -17,13 +17,13 @@ def sink_gen(): print("Received: " + str(t.value["value"])) def main(): - source = SimActor(source_gen(), ("source", Source, [("value", BV(32))])) - sink = SimActor(sink_gen(), ("sink", Sink, [("value", BV(32))])) + source = ActorNode(SimActor(source_gen(), ("source", Source, [("value", BV(32))]))) + sink = ActorNode(SimActor(sink_gen(), ("sink", Sink, [("value", BV(32))]))) g = DataFlowGraph() g.add_connection(source, sink) comp = CompositeActor(g) def end_simulation(s): - s.interrupt = source.done + s.interrupt = source.actor.done fragment = comp.get_fragment() + Fragment(sim=[end_simulation]) sim = Simulator(fragment, Runner()) sim.run()