examples/dataflow/dma: test OOO ASMI reader
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Thu, 12 Jul 2012 17:45:12 +0000 (19:45 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Thu, 12 Jul 2012 17:45:12 +0000 (19:45 +0200)
examples/dataflow/dma.py

index 6e8c88401fcecc4800cd9db08fc692722773366a..7ec26f061cd69972de9b9cf2e7b753b4b09e4fb2 100644 (file)
@@ -92,15 +92,15 @@ def test_wb_writer():
        wishbone_sim(comp.get_fragment(), writer,
                lambda s: trgen.actor.done and not s.rd(comp.busy))
 
-def test_asmi_seqreader():
-       print("*** Testing ASMI sequential reader")
+def test_asmi_reader(nslots):
+       print("*** Testing ASMI reader (nslots={})".format(nslots))
        
        hub = asmibus.Hub(32, 32)
-       port = hub.get_port()
+       port = hub.get_port(nslots)
        hub.finalize()
        
        adrgen = ActorNode(SimActor(adrgen_gen(), ("address", Source, [("a", BV(32))])))
-       reader = ActorNode(dma_asmi.SequentialReader(port))
+       reader = ActorNode(dma_asmi.Reader(port))
        dumper = ActorNode(SimActor(dumper_gen(), ("data", Sink, [("d", BV(32))])))
        g = DataFlowGraph()
        g.add_connection(adrgen, reader)
@@ -112,4 +112,5 @@ def test_asmi_seqreader():
 
 test_wb_reader()
 test_wb_writer()
-test_asmi_seqreader()
+test_asmi_reader(1)
+test_asmi_reader(2)