Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/33901 )

Change subject: configs,tests: Update configs to use compatible SE workloads.
......................................................................

configs,tests: Update configs to use compatible SE workloads.

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 <[email protected]>
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
---
M configs/example/apu_se.py
M configs/example/arm/starter_se.py
M configs/example/hmc_hello.py
M configs/example/se.py
M configs/learning_gem5/part1/simple.py
M configs/learning_gem5/part1/two_level.py
M configs/learning_gem5/part2/simple_cache.py
M configs/learning_gem5/part2/simple_memobj.py
M configs/learning_gem5/part3/simple_ruby.py
M configs/splash2/cluster.py
M configs/splash2/run.py
M tests/gem5/cpu_tests/run.py
M tests/gem5/m5threads_test_atomic/atomic_system.py
13 files changed, 21 insertions(+), 18 deletions(-)

Approvals:
  Matthew Poremba: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/configs/example/apu_se.py b/configs/example/apu_se.py
index 18640c8..ba0d9ea 100644
--- a/configs/example/apu_se.py
+++ b/configs/example/apu_se.py
@@ -501,7 +501,7 @@
                 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)
diff --git a/configs/example/arm/starter_se.py b/configs/example/arm/starter_se.py
index d342420..8b1dbd2 100644
--- a/configs/example/arm/starter_se.py
+++ b/configs/example/arm/starter_se.py
@@ -171,7 +171,7 @@
               (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):
diff --git a/configs/example/hmc_hello.py b/configs/example/hmc_hello.py
index 706fc2b..4e46235 100644
--- a/configs/example/hmc_hello.py
+++ b/configs/example/hmc_hello.py
@@ -50,7 +50,6 @@
 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 @@
 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
diff --git a/configs/example/se.py b/configs/example/se.py
index f3fea61..d30679f 100644
--- a/configs/example/se.py
+++ b/configs/example/se.py
@@ -169,11 +169,12 @@
     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
diff --git a/configs/learning_gem5/part1/simple.py b/configs/learning_gem5/part1/simple.py
index cb785b6..3e90c62 100644
--- a/configs/learning_gem5/part1/simple.py
+++ b/configs/learning_gem5/part1/simple.py
@@ -94,7 +94,7 @@
 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()
diff --git a/configs/learning_gem5/part1/two_level.py b/configs/learning_gem5/part1/two_level.py
index 50d1d5f..79f8795 100644
--- a/configs/learning_gem5/part1/two_level.py
+++ b/configs/learning_gem5/part1/two_level.py
@@ -137,7 +137,7 @@
 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()
diff --git a/configs/learning_gem5/part2/simple_cache.py b/configs/learning_gem5/part2/simple_cache.py
index 391de8b..7303a73 100644
--- a/configs/learning_gem5/part2/simple_cache.py
+++ b/configs/learning_gem5/part2/simple_cache.py
@@ -84,8 +84,6 @@
 # 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 @@
 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
diff --git a/configs/learning_gem5/part2/simple_memobj.py b/configs/learning_gem5/part2/simple_memobj.py
index 80f6602..ae86396 100644
--- a/configs/learning_gem5/part2/simple_memobj.py
+++ b/configs/learning_gem5/part2/simple_memobj.py
@@ -82,8 +82,6 @@
 # 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 @@
 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
diff --git a/configs/learning_gem5/part3/simple_ruby.py b/configs/learning_gem5/part3/simple_ruby.py
index f0a9e08..8e9f186 100644
--- a/configs/learning_gem5/part3/simple_ruby.py
+++ b/configs/learning_gem5/part3/simple_ruby.py
@@ -89,8 +89,6 @@
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 @@
     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)

diff --git a/configs/splash2/cluster.py b/configs/splash2/cluster.py
index 2b36c82..67f64f3 100644
--- a/configs/splash2/cluster.py
+++ b/configs/splash2/cluster.py
@@ -216,8 +216,6 @@
 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 cpu in cluster.cpus:
         cpu.workload = root.workload

+system.workload = SEWorkload.init_compatible(root.workload.executable)
+
 # ----------------------
 # Run the simulation
 # ----------------------
diff --git a/configs/splash2/run.py b/configs/splash2/run.py
index b3b8787..3da73d5 100644
--- a/configs/splash2/run.py
+++ b/configs/splash2/run.py
@@ -195,8 +195,7 @@
 # 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 @@
 for cpu in cpus:
     cpu.workload = root.workload

+system.workload = SEWorkload.init_compatible(root.workload.executable)
+
 # ----------------------
 # Run the simulation
 # ----------------------
diff --git a/tests/gem5/cpu_tests/run.py b/tests/gem5/cpu_tests/run.py
index b893b80..f6a1cf6 100644
--- a/tests/gem5/cpu_tests/run.py
+++ b/tests/gem5/cpu_tests/run.py
@@ -119,7 +119,7 @@

 system = System()

-system.workload = SEWorkload()
+system.workload = SEWorkload.init_compatible(args.binary)

 system.clk_domain = SrcClockDomain()
 system.clk_domain.clock = '1GHz'
diff --git a/tests/gem5/m5threads_test_atomic/atomic_system.py b/tests/gem5/m5threads_test_atomic/atomic_system.py
index a08be5c..f5c53e5 100644
--- a/tests/gem5/m5threads_test_atomic/atomic_system.py
+++ b/tests/gem5/m5threads_test_atomic/atomic_system.py
@@ -40,7 +40,7 @@
 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'

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33901
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Id27172c3074a7976823a891878ab9eecf6246c47
Gerrit-Change-Number: 33901
Gerrit-PatchSet: 8
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Brandon Potter <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Matthew Poremba <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to