examples/dataflow/dma: update to new APIs
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Wed, 28 Nov 2012 21:42:01 +0000 (22:42 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Wed, 28 Nov 2012 21:42:01 +0000 (22:42 +0100)
examples/dataflow/dma.py

index 7ec26f061cd69972de9b9cf2e7b753b4b09e4fb2..1de8d6f9fa0bfc8e5a61418626b6476b05f3e0b4 100644 (file)
@@ -57,7 +57,7 @@ def wishbone_sim(efragment, master, end_simulation):
 def asmi_sim(efragment, hub, end_simulation):
        def _end_simulation(s):
                s.interrupt = end_simulation(s)
-       peripheral = asmibus.Target(hub, MyModelASMI())
+       peripheral = asmibus.Target(MyModelASMI(), hub)
        tap = asmibus.Tap(hub)
        def _end_simulation(s):
                s.interrupt = end_simulation(s)
@@ -79,7 +79,7 @@ def test_wb_reader():
        comp = CompositeActor(g)
        
        wishbone_sim(comp.get_fragment(), reader,
-               lambda s: adrgen.actor.done and not s.rd(comp.busy))
+               lambda s: adrgen.actor.token_exchanger.done and not s.rd(comp.busy))
 
 def test_wb_writer():
        print("*** Testing Wishbone writer")
@@ -90,7 +90,7 @@ def test_wb_writer():
        comp = CompositeActor(g)
        
        wishbone_sim(comp.get_fragment(), writer,
-               lambda s: trgen.actor.done and not s.rd(comp.busy))
+               lambda s: trgen.actor.token_exchanger.done and not s.rd(comp.busy))
 
 def test_asmi_reader(nslots):
        print("*** Testing ASMI reader (nslots={})".format(nslots))
@@ -108,7 +108,7 @@ def test_asmi_reader(nslots):
        comp = CompositeActor(g)
        
        asmi_sim(hub.get_fragment() + comp.get_fragment(), hub,
-               lambda s: adrgen.actor.done and not s.rd(comp.busy))
+               lambda s: adrgen.actor.token_exchanger.done and not s.rd(comp.busy))
 
 test_wb_reader()
 test_wb_writer()