diff options
author | Daniel R. Carvalho <odanrc@yahoo.com.br> | 2019-09-03 15:24:23 +0200 |
---|---|---|
committer | Daniel Carvalho <odanrc@yahoo.com.br> | 2019-10-01 06:15:03 +0000 |
commit | 224da08be767b51e8148e5f3e6e0da2e2ea77add (patch) | |
tree | 418b25cf9c7b5867e43fb1d52f12cd45c42430d6 /configs/ruby/Ruby.py | |
parent | b2b06531b8db161f0c7a084deb8d710a81fb855b (diff) | |
download | gem5-224da08be767b51e8148e5f3e6e0da2e2ea77add.tar.xz |
configs: Port MemConfig to the common object list
Port MemConfig to use the common object list.
Change-Id: If421c2745ac3431718a5170314045b456fc64a90
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20592
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'configs/ruby/Ruby.py')
-rw-r--r-- | configs/ruby/Ruby.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py index c9ae251d9..cad86bf79 100644 --- a/configs/ruby/Ruby.py +++ b/configs/ruby/Ruby.py @@ -49,6 +49,7 @@ from m5.util import addToPath, fatal addToPath('../') +from common import ObjectList from common import MemConfig from common import FileSystemConfig @@ -115,9 +116,10 @@ def setup_memory_controllers(system, ruby, dir_cntrls, options): dir_ranges = [] for r in system.mem_ranges: - mem_ctrl = MemConfig.create_mem_ctrl( - MemConfig.get(options.mem_type), r, index, options.num_dirs, - int(math.log(options.num_dirs, 2)), intlv_size) + mem_type = ObjectList.mem_list.get(options.mem_type) + mem_ctrl = MemConfig.create_mem_ctrl(mem_type, r, index, + options.num_dirs, int(math.log(options.num_dirs, 2)), + intlv_size) if options.access_backing_store: mem_ctrl.kvm_map=False @@ -131,7 +133,7 @@ def setup_memory_controllers(system, ruby, dir_cntrls, options): mem_ctrl.port = dir_cntrl.memory # Enable low-power DRAM states if option is set - if issubclass(MemConfig.get(options.mem_type), DRAMCtrl): + if issubclass(mem_type, DRAMCtrl): mem_ctrl.enable_dram_powerdown = \ options.enable_dram_powerdown |