sim: Fixed error when compiling gem5 with dramsim2.
authorMahyar Samani <msamani@ucdavis.edu>
Thu, 16 Jul 2020 16:51:46 +0000 (16:51 +0000)
committerMahyar Samani <msamani@ucdavis.edu>
Fri, 17 Jul 2020 17:22:47 +0000 (17:22 +0000)
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 <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
ext/dramsim2/README
ext/dramsim2/SConscript
src/mem/DRAMSim2.py

index f83e3f0bd37a8dc6219b5ca5f252d262e31f887e..7c5535d9eea98107fd711f5e5b176a6bb80b6090 100644 (file)
@@ -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
index bc4c04706395bf94f3fa8ec77bd55b65d5cbbdff..869d220323d30afcab614e4122fbec2e17a16995 100644 (file)
@@ -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']:
index aa837295a6ce9b0443732d0e286b0df9823858c5..bf5143ff68cd9f3295b111dce1bb20680dcaf87d 100644 (file)
@@ -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):