configs: Revamp ruby mem test to align with MemTest
authorNikos Nikoleris <nikos.nikoleris@arm.com>
Thu, 4 Oct 2018 15:15:52 +0000 (16:15 +0100)
committerNikos Nikoleris <nikos.nikoleris@arm.com>
Fri, 9 Nov 2018 13:51:34 +0000 (13:51 +0000)
The test script was broken as it was based on an older version of
MemTest, this changes revamps the creation of MemTest and removes
parameters that are not any longer valid.

Change-Id: Ib87369c1e4717c2da23e8108c72eec871e56f6ed
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/13596
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

configs/example/ruby_mem_test.py

index ab658f787e9797f34155b1c1bda113520ac2e03b..68ad1ca66b133b6b6eb2f2085359699aa70ed1de 100644 (file)
@@ -96,9 +96,7 @@ if options.num_cpus > block_size:
 #
 # Currently ruby does not support atomic or uncacheable accesses
 #
-cpus = [ MemTest(atomic = False,
-                 max_loads = options.maxloads,
-                 issue_dmas = False,
+cpus = [ MemTest(max_loads = options.maxloads,
                  percent_functional = options.functional,
                  percent_uncacheable = 0,
                  progress_interval = options.progress,
@@ -106,15 +104,11 @@ cpus = [ MemTest(atomic = False,
          for i in xrange(options.num_cpus) ]
 
 system = System(cpu = cpus,
-                funcmem = SimpleMemory(in_addr_map = False),
-                funcbus = IOXBar(),
                 clk_domain = SrcClockDomain(clock = options.sys_clock),
                 mem_ranges = [AddrRange(options.mem_size)])
 
 if options.num_dmas > 0:
-    dmas = [ MemTest(atomic = False,
-                     max_loads = options.maxloads,
-                     issue_dmas = True,
+    dmas = [ MemTest(max_loads = options.maxloads,
                      percent_functional = 0,
                      percent_uncacheable = 0,
                      progress_interval = options.progress,
@@ -150,8 +144,7 @@ for (i, cpu) in enumerate(cpus):
     #
     # Tie the cpu memtester ports to the correct system ports
     #
-    cpu.test = system.ruby._cpu_ports[i].slave
-    cpu.functional = system.funcbus.slave
+    cpu.port = system.ruby._cpu_ports[i].slave
 
     #
     # Since the memtester is incredibly bursty, increase the deadlock
@@ -159,16 +152,6 @@ for (i, cpu) in enumerate(cpus):
     #
     system.ruby._cpu_ports[i].deadlock_threshold = 5000000
 
-for (i, dma) in enumerate(dmas):
-    #
-    # Tie the dma memtester ports to the correct functional port
-    # Note that the test port has already been connected to the dma_sequencer
-    #
-    dma.functional = system.funcbus.slave
-
-# connect reference memory to funcbus
-system.funcbus.master = system.funcmem.port
-
 # -----------------------
 # run simulation
 # -----------------------