From 0bd936d071b6ac053efc697b0a9880533f666693 Mon Sep 17 00:00:00 2001 From: Mahyar Samani Date: Thu, 16 Jul 2020 16:51:46 +0000 Subject: [PATCH] sim: Fixed error when compiling gem5 with dramsim2. Compiling gem5 with dramsim2 included fails due to some inconsistencies in including SimObjects. In this patch this issue is fixed along with temporarily disabling -Werror=nonnull-compare in CCFLAGS. Also, the remote for cloning dramsim2 has been changed. Change-Id: Ia24095150d026d736352aaf0d735b7554ede10bb Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31434 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- ext/dramsim2/README | 2 +- ext/dramsim2/SConscript | 2 +- src/mem/DRAMSim2.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/dramsim2/README b/ext/dramsim2/README index f83e3f0bd..7c5535d9e 100644 --- a/ext/dramsim2/README +++ b/ext/dramsim2/README @@ -2,7 +2,7 @@ Follow these steps to get DRAMSim2 as part of gem5 1. Download DRAMSim2 1.1 Go to ext/dramsim2 (this directory) - 1.2 Clone DRAMSim2: git clone git://github.com/dramninjasUMD/DRAMSim2.git + 1.2 Clone DRAMSim2: git clone git@github.com:umd-memsys/DRAMSim2.git 2. Compile gem5 2.1 Business as usual diff --git a/ext/dramsim2/SConscript b/ext/dramsim2/SConscript index bc4c04706..869d22032 100644 --- a/ext/dramsim2/SConscript +++ b/ext/dramsim2/SConscript @@ -73,7 +73,7 @@ DRAMFile('Transaction.cpp') # DRAMSim2 violates some of the warning flags used by gem5, so # we explicitly disable them here dramenv = main.Clone() -dramenv.Append(CCFLAGS=['-Wno-unused-value']) +dramenv.Append(CCFLAGS=['-Wno-unused-value', '-Wno-error=nonnull-compare']) # If we are using clang, there are more flags to disable if main['CLANG']: diff --git a/src/mem/DRAMSim2.py b/src/mem/DRAMSim2.py index aa837295a..bf5143ff6 100644 --- a/src/mem/DRAMSim2.py +++ b/src/mem/DRAMSim2.py @@ -34,7 +34,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from m5.params import * -from AbstractMemory import * +from m5.objects.AbstractMemory import * # A wrapper for DRAMSim2 multi-channel memory controller class DRAMSim2(AbstractMemory): -- 2.30.2