configs,tests: Update configs to use compatible SE workloads.
authorGabe Black <gabeblack@google.com>
Tue, 1 Sep 2020 06:00:27 +0000 (23:00 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 13 Oct 2020 04:59:04 +0000 (04:59 +0000)
If there's no more compatible workload than the base SEWorkload class it
will fall back to that for now.

Change-Id: Id27172c3074a7976823a891878ab9eecf6246c47
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33901
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
13 files changed:
configs/example/apu_se.py
configs/example/arm/starter_se.py
configs/example/hmc_hello.py
configs/example/se.py
configs/learning_gem5/part1/simple.py
configs/learning_gem5/part1/two_level.py
configs/learning_gem5/part2/simple_cache.py
configs/learning_gem5/part2/simple_memobj.py
configs/learning_gem5/part3/simple_ruby.py
configs/splash2/cluster.py
configs/splash2/run.py
tests/gem5/cpu_tests/run.py
tests/gem5/m5threads_test_atomic/atomic_system.py

index 18640c809fbd8d9245e7cb6dc021eb5e7effda80..ba0d9ea15a1b3e9a029c4d0453d56ab18500600d 100644 (file)
@@ -501,7 +501,7 @@ system = System(cpu = cpu_list,
                 mem_ranges = [AddrRange(options.mem_size)],
                 cache_line_size = options.cacheline_size,
                 mem_mode = mem_mode,
-                workload = SEWorkload())
+                workload = SEWorkload.init_compatible(executable))
 if fast_forward:
     system.future_cpu = future_cpu_list
 system.voltage_domain = VoltageDomain(voltage = options.sys_voltage)
index d342420b57886b22df1c2f10c9693c54aac97d54..8b1dbd2a0f05101b4d6a1f497f95852de062ee86 100644 (file)
@@ -171,7 +171,7 @@ def create(args):
               (len(processes), args.num_cores))
         sys.exit(1)
 
-    system.workload = SEWorkload()
+    system.workload = SEWorkload.init_compatible(processes[0].executable)
 
     # Assign one workload to each CPU
     for cpu, workload in zip(system.cpu_cluster.cpus, processes):
index 706fc2b681fd43d021217f44a3e9370b636d69a9..4e462350972034a3c84874aa47b8993e91cf7856 100644 (file)
@@ -50,7 +50,6 @@ HMC.add_options(parser)
 options = parser.parse_args()
 # create the system we are going to simulate
 system = System()
-system.workload = SEWorkload()
 # use timing mode for the interaction between master-slave ports
 system.mem_mode = 'timing'
 # set the clock fequency of the system
@@ -77,6 +76,8 @@ binary = 'tests/test-progs/hello/bin/' + isa + '/linux/hello'
 process = Process()
 # cmd is a list which begins with the executable (like argv)
 process.cmd = [binary]
+# set the system workload
+system.workload = SEWorkload.init_compatible(binary)
 # set the cpu workload
 system.cpu.workload = process
 # create thread contexts
index f3fea61bd58a43a87aa2f33559c058bba00bd700..d30679f2ae1eae1680f5bdf7a2bb5b8d67507edc 100644 (file)
@@ -169,11 +169,12 @@ if options.smt and options.num_cpus > 1:
     fatal("You cannot use SMT with multiple CPUs!")
 
 np = options.num_cpus
+mp0_path = multiprocesses[0].executable
 system = System(cpu = [CPUClass(cpu_id=i) for i in range(np)],
                 mem_mode = test_mem_mode,
                 mem_ranges = [AddrRange(options.mem_size)],
                 cache_line_size = options.cacheline_size,
-                workload = SEWorkload())
+                workload = SEWorkload.init_compatible(mp0_path))
 
 if numThreads > 1:
     system.multi_thread = True
index cb785b6e76d16e63695ea44ff063de72bec54dfa..3e90c624a4d93e5370edc27da468fb73b42cb15b 100644 (file)
@@ -94,7 +94,7 @@ thispath = os.path.dirname(os.path.realpath(__file__))
 binary = os.path.join(thispath, '../../../',
                       'tests/test-progs/hello/bin/', isa, 'linux/hello')
 
-system.workload = SEWorkload()
+system.workload = SEWorkload.init_compatible(binary)
 
 # Create a process for a simple "Hello World" application
 process = Process()
index 50d1d5f9ed5157b7b15360607b3c4aeeb5c931dc..79f87955f2b2f7065985cbccf4dab051fdaef5f0 100644 (file)
@@ -137,7 +137,7 @@ system.mem_ctrl.dram = DDR3_1600_8x8()
 system.mem_ctrl.dram.range = system.mem_ranges[0]
 system.mem_ctrl.port = system.membus.master
 
-system.workload = SEWorkload()
+system.workload = SEWorkload.init_compatible(binary)
 
 # Create a process for a simple "Hello World" application
 process = Process()
index 391de8ba709c3ee725facd949852dc8221bfe2a4..7303a73fac40e9a860fc926c5a97d36db1b16c87 100644 (file)
@@ -84,8 +84,6 @@ system.mem_ctrl.port = system.membus.master
 # Connect the system up to the membus
 system.system_port = system.membus.slave
 
-system.workload = SEWorkload()
-
 # Create a process for a simple "Hello World" application
 process = Process()
 # Set the command
@@ -99,6 +97,8 @@ process.cmd = [binpath]
 system.cpu.workload = process
 system.cpu.createThreads()
 
+system.workload = SEWorkload.init_compatible(binpath)
+
 # set up the root SimObject and start the simulation
 root = Root(full_system = False, system = system)
 # instantiate all of the objects we've created above
index 80f6602213b1556c291e7bf69c1b5a4c895ddd05..ae86396706108458953c8cc178654f3376ff6162 100644 (file)
@@ -82,8 +82,6 @@ system.mem_ctrl.port = system.membus.master
 # Connect the system up to the membus
 system.system_port = system.membus.slave
 
-system.workload = SEWorkload()
-
 # Create a process for a simple "Hello World" application
 process = Process()
 # Set the command
@@ -97,6 +95,8 @@ process.cmd = [binpath]
 system.cpu.workload = process
 system.cpu.createThreads()
 
+system.workload = SEWorkload.init_compatible(binpath)
+
 # set up the root SimObject and start the simulation
 root = Root(full_system = False, system = system)
 # instantiate all of the objects we've created above
index f0a9e08c260a2204d328ec2c01dcee059499c0f4..8e9f18691468a16e5591e47cf2db4f04ce0a0417 100644 (file)
@@ -89,8 +89,6 @@ thispath = os.path.dirname(os.path.realpath(__file__))
 binary = os.path.join(thispath, '../../../', 'tests/test-progs/threads/bin/',
                       isa, 'linux/threads')
 
-system.workload = SEWorkload()
-
 # Create a process for a simple "multi-threaded" application
 process = Process()
 # Set the command
@@ -101,6 +99,8 @@ for cpu in system.cpu:
     cpu.workload = process
     cpu.createThreads()
 
+system.workload = SEWorkload.init_compatible(binary)
+
 # Set up the pseudo file system for the threads function above
 config_filesystem(system)
 
index 2b36c825d835842993447077d45a1599f5ce3174..67f64f34fcf5f55606d04196008082341b013375 100644 (file)
@@ -216,8 +216,6 @@ system.clock = '1GHz'
 system.toL2bus = L2XBar(clock = busFrequency)
 system.l2 = L2(size = options.l2size, assoc = 8)
 
-system.workload = SEWorkload()
-
 # ----------------------
 # Connect the L2 cache and memory together
 # ----------------------
@@ -284,6 +282,8 @@ for cluster in clusters:
     for cpu in cluster.cpus:
         cpu.workload = root.workload
 
+system.workload = SEWorkload.init_compatible(root.workload.executable)
+
 # ----------------------
 # Run the simulation
 # ----------------------
index b3b878703d5242f2ddb3d50ed95057a6d58010e9..3da73d50940a8a5bafccfc2d71d243f91e769fad 100644 (file)
@@ -195,8 +195,7 @@ else:
 # Create a system, and add system wide objects
 # ----------------------
 system = System(cpu = cpus, physmem = SimpleMemory(),
-                membus = SystemXBar(clock = busFrequency),
-                workload = SEWorkload())
+                membus = SystemXBar(clock = busFrequency))
 system.clock = '1GHz'
 
 system.toL2bus = L2XBar(clock = busFrequency)
@@ -268,6 +267,8 @@ else:
 for cpu in cpus:
     cpu.workload = root.workload
 
+system.workload = SEWorkload.init_compatible(root.workload.executable)
+
 # ----------------------
 # Run the simulation
 # ----------------------
index b893b80ad8f2af87598997e61b85080d622c6d78..f6a1cf6658f1413324bf2db60b79f1a5e6850935 100644 (file)
@@ -119,7 +119,7 @@ args = parser.parse_args()
 
 system = System()
 
-system.workload = SEWorkload()
+system.workload = SEWorkload.init_compatible(args.binary)
 
 system.clk_domain = SrcClockDomain()
 system.clk_domain.clock = '1GHz'
index a08be5c5fed2cf6427fb846f59b73e18f9fac00f..f5c53e530aa6cb0280ff20eea7381774e54cd6eb 100644 (file)
@@ -40,7 +40,7 @@ args = parser.parse_args()
 root = Root(full_system = False)
 root.system = System()
 
-root.system.workload = SEWorkload()
+root.system.workload = SEWorkload.init_compatible(args.cmd)
 
 root.system.clk_domain = SrcClockDomain()
 root.system.clk_domain.clock = '3GHz'