From f2be9f195c5aa226fa546e79c9acf95c8a800915 Mon Sep 17 00:00:00 2001 From: Matthew Poremba Date: Wed, 1 May 2019 11:32:49 -0700 Subject: mem: Option to toggle DRAM low-power states Adding an option to enable DRAM low-power states. The low power states can have a significant impact on application performance (sim_ticks) on the order of 2-3x, especially for compute-gpu apps. The options allows for it to easily be enabled/disabled to compare performance numbers. The option is disabled by default. Change-Id: Ib9bddbb792a1a6a4afb5339003472ff8f00a5859 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18548 Reviewed-by: Wendy Elsasser Reviewed-by: Andreas Sandberg Maintainer: Jason Lowe-Power Tested-by: kokoro --- configs/common/MemConfig.py | 5 +++++ configs/common/Options.py | 2 ++ configs/ruby/Ruby.py | 5 +++++ 3 files changed, 12 insertions(+) (limited to 'configs') diff --git a/configs/common/MemConfig.py b/configs/common/MemConfig.py index 29c41388c..d09869285 100644 --- a/configs/common/MemConfig.py +++ b/configs/common/MemConfig.py @@ -224,6 +224,11 @@ def config_mem(options, system): if issubclass(cls, m5.objects.DRAMCtrl) and opt_mem_ranks: mem_ctrl.ranks_per_channel = opt_mem_ranks + # Enable low-power DRAM states if option is set + if issubclass(cls, m5.objects.DRAMCtrl): + mem_ctrl.enable_dram_powerdown = \ + options.enable_dram_powerdown + if opt_elastic_trace_en: mem_ctrl.latency = '1ns' print("For elastic trace, over-riding Simple Memory " diff --git a/configs/common/Options.py b/configs/common/Options.py index 4279b8006..f6fa0d031 100644 --- a/configs/common/Options.py +++ b/configs/common/Options.py @@ -104,6 +104,8 @@ def addNoISAOptions(parser): parser.add_option("--mem-size", action="store", type="string", default="512MB", help="Specify the physical memory size (single memory)") + parser.add_option("--enable-dram-powerdown", action="store_true", + help="Enable low-power states in DRAMCtrl") parser.add_option("--memchecker", action="store_true") diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py index 2d69ac19a..c9ae251d9 100644 --- a/configs/ruby/Ruby.py +++ b/configs/ruby/Ruby.py @@ -130,6 +130,11 @@ def setup_memory_controllers(system, ruby, dir_cntrls, options): else: mem_ctrl.port = dir_cntrl.memory + # Enable low-power DRAM states if option is set + if issubclass(MemConfig.get(options.mem_type), DRAMCtrl): + mem_ctrl.enable_dram_powerdown = \ + options.enable_dram_powerdown + index += 1 dir_cntrl.addr_ranges = dir_ranges -- cgit v1.2.3