From 3a1eadc04d88522a4d57ad69e84fd63b3112127c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20M=C3=BCck?= Date: Thu, 8 Oct 2020 11:00:13 -0500 Subject: [PATCH] configs: Ruby fixes for SimpleMemory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Idc21c8c616ef953d161685ec459765ef21ac9bc3 Signed-off-by: Tiago Mück Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41817 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- configs/ruby/Ruby.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py index 47790058f0..2bed3419cf 100644 --- a/configs/ruby/Ruby.py +++ b/configs/ruby/Ruby.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012, 2017-2018 ARM Limited +# Copyright (c) 2012, 2017-2018, 2021 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -131,13 +131,16 @@ def setup_memory_controllers(system, ruby, dir_cntrls, options): dram_intf = MemConfig.create_mem_intf(mem_type, r, index, options.num_dirs, int(math.log(options.num_dirs, 2)), intlv_size, options.xor_low_bit) - mem_ctrl = m5.objects.MemCtrl(dram = dram_intf) + if issubclass(mem_type, DRAMInterface): + mem_ctrl = m5.objects.MemCtrl(dram = dram_intf) + else: + mem_ctrl = dram_intf if options.access_backing_store: dram_intf.kvm_map=False mem_ctrls.append(mem_ctrl) - dir_ranges.append(mem_ctrl.dram.range) + dir_ranges.append(dram_intf.range) if crossbar != None: mem_ctrl.port = crossbar.master