summaryrefslogtreecommitdiff
path: root/configs/example
diff options
context:
space:
mode:
authorJason Lowe-Power <jason@lowepower.com>2019-05-16 19:09:56 -0700
committerJason Lowe-Power <jason@lowepower.com>2019-05-17 17:16:07 +0000
commite2656006df442a995bf80ee03fa9700d6ec14537 (patch)
tree5a53ae690b6ca9e222c5f9cb26be1c4d62f9c8a2 /configs/example
parent279501816a5fbff6dffe2a1a7c57bd26ae50eb62 (diff)
downloadgem5-e2656006df442a995bf80ee03fa9700d6ec14537.tar.xz
configs: Generalize FileSystemConfig for non se.py
This patch updates the FileSystemConfig so it works with more kinds of config scripts (e.g., the Learning gem5 scripts). There are 4 main changes: - Added system as a parameter to the config_filesystem function so the function can search the system for the number of CPUs instead of relying on options from Options.py - Instead of calling redirect_paths everywhere config_filesystem is used, now it is implicitly called. - Cleaned up the Ruby scripts a bit to remove redundant calls to config_filesystem - Added a config_filesystem call to the Ruby Learning gem5 script (currently the only Learning gem5 script that requires it). In the future, I think it would be better to move the config_filesystem call into simulate.py, probably into the instantiate function. I tried to use the per-CPU configuration parameters instead of options from Options.py, but that's not possible until after the SimObject params have been finalized in instantiate. Change-Id: Ie6501a7435cfb3ac9d2b45be3722388b34063b1e Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18848 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'configs/example')
-rw-r--r--configs/example/se.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/configs/example/se.py b/configs/example/se.py
index cbebcea5e..f43206ad2 100644
--- a/configs/example/se.py
+++ b/configs/example/se.py
@@ -64,7 +64,7 @@ from common import CacheConfig
from common import CpuConfig
from common import BPConfig
from common import MemConfig
-from common.FileSystemConfig import redirect_paths, config_filesystem
+from common.FileSystemConfig import config_filesystem
from common.Caches import *
from common.cpu2000 import *
@@ -246,9 +246,6 @@ for i in range(np):
system.cpu[i].createThreads()
-system.redirect_paths = redirect_paths(os.path.expanduser(options.chroot))
-config_filesystem(options)
-
if options.ruby:
Ruby.create_system(options, False, system)
assert(options.num_cpus == len(system.ruby._cpu_ports))
@@ -278,6 +275,7 @@ else:
system.system_port = system.membus.slave
CacheConfig.config_cache(options, system)
MemConfig.config_mem(options, system)
+ config_filesystem(system, options)
root = Root(full_system = False, system = system)
Simulation.run(options, root, system, FutureClass)