Gabe Black has uploaded this change for review. (
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
---
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(-)
diff --git a/configs/example/apu_se.py b/configs/example/apu_se.py
index 077ce4c..61dcd9e 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 191ba3b..5948e82 100644
--- a/configs/learning_gem5/part1/simple.py
+++ b/configs/learning_gem5/part1/simple.py
@@ -93,7 +93,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 f07dc20..b172dd8 100644
--- a/configs/learning_gem5/part1/two_level.py
+++ b/configs/learning_gem5/part1/two_level.py
@@ -136,7 +136,7 @@
system.mem_ctrl.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 083750d..48d2662 100644
--- a/configs/learning_gem5/part2/simple_cache.py
+++ b/configs/learning_gem5/part2/simple_cache.py
@@ -83,8 +83,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
@@ -98,6 +96,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 360a4c3..23c2443 100644
--- a/configs/learning_gem5/part2/simple_memobj.py
+++ b/configs/learning_gem5/part2/simple_memobj.py
@@ -81,8 +81,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
@@ -96,6 +94,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 1fd1b4d..d8693bc 100644
--- a/configs/learning_gem5/part3/simple_ruby.py
+++ b/configs/learning_gem5/part3/simple_ruby.py
@@ -88,8 +88,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
@@ -100,6 +98,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: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s