From: Jason Lowe-Power Date: Wed, 16 Sep 2020 00:59:51 +0000 (-0700) Subject: configs: Add special case in MemConfig X-Git-Tag: v20.1.0.0~22 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=914d6af8a875f472a919fd6619a0a7da7fd78c6d;p=gem5.git configs: Add special case in MemConfig SimpleMemory doesn't implement a full MemCtrl interface. Thus, like the NVM and HMC memories, we need to add a special case to MemConfig.py. The --mem-type command line option now works for SimpleMemory and all of the DRAM interfaces (it does not work for the NVM interfaces, though). Issue-on: https://gem5.atlassian.net/browse/GEM5-777 Change-Id: I6d60649215be324bdd2a104b1976752f936c960e Signed-off-by: Jason Lowe-Power Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34595 Reviewed-by: Daniel Carvalho Reviewed-by: Nikos Nikoleris Maintainer: Jason Lowe-Power Tested-by: kokoro --- diff --git a/configs/common/MemConfig.py b/configs/common/MemConfig.py index 941b381d4..8221f85f0 100644 --- a/configs/common/MemConfig.py +++ b/configs/common/MemConfig.py @@ -227,11 +227,15 @@ def config_mem(options, system): mem_ctrl = m5.objects.MemCtrl(min_writes_per_switch = 8, static_backend_latency = '4ns', static_frontend_latency = '4ns') + elif opt_mem_type == "SimpleMemory": + mem_ctrl = m5.objects.SimpleMemory() else: mem_ctrl = m5.objects.MemCtrl() # Hookup the controller to the interface and add to the list - mem_ctrl.dram = dram_intf + if opt_mem_type != "SimpleMemory": + mem_ctrl.dram = dram_intf + mem_ctrls.append(mem_ctrl) elif opt_nvm_type and (not opt_mem_type or range_iter % 2 == 0):