diff --git a/DRAMSys/analyzer/businessObjects/phases/phase.h b/DRAMSys/analyzer/businessObjects/phases/phase.h index c7a072b8..62c5ea27 100644 --- a/DRAMSys/analyzer/businessObjects/phases/phase.h +++ b/DRAMSys/analyzer/businessObjects/phases/phase.h @@ -47,7 +47,7 @@ #include typedef unsigned int ID; -enum TextPositioning; +//enum TextPositioning; class Transaction; class Phase diff --git a/DRAMSys/analyzer/businessObjects/tracetime.h b/DRAMSys/analyzer/businessObjects/tracetime.h index 27fc880b..a580fdfa 100644 --- a/DRAMSys/analyzer/businessObjects/tracetime.h +++ b/DRAMSys/analyzer/businessObjects/tracetime.h @@ -38,6 +38,7 @@ #ifndef TRACETIME_H #define TRACETIME_H #include +#include //time in nanoseconds typedef long long traceTime; diff --git a/DRAMSys/analyzer/traceAnalyzer.pro b/DRAMSys/analyzer/traceAnalyzer.pro index e32a37de..d0b2fd81 100644 --- a/DRAMSys/analyzer/traceAnalyzer.pro +++ b/DRAMSys/analyzer/traceAnalyzer.pro @@ -6,9 +6,27 @@ QT += core gui QT += sql -CONFIG += qwt +CONFIG += no_keywords + + CONFIG += python -CONFIG += no_keywords + +unix:!macx { + QMAKE_CXXFLAGS += -std=c++11 + CONFIG += qwt + QMAKE_CXXFLAGS += -Xlinker -export-dynamic +} + +macx: { + CONFIG += c++11 + QMAKE_CXXFLAGS += -std=c++0x -stdlib=libc++ + QMAKE_LFLAGS += -F/opt/qwt-6.1.2/lib + LIBS += -F/opt/qwt-6.1.2/lib/ -framework qwt + INCLUDEPATH += /opt/qwt-6.1.2/lib/qwt.framework/Headers + DEPENDPATH += /opt/qwt-6.1.2 + INCLUDEPATH += /opt/local/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m + LIBS += -L/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/config-3.4m/ -lpython3.4 +} include(paths.pro) greaterThan(QT_MAJOR_VERSION, 4): QT += widgets @@ -101,6 +119,3 @@ OTHER_FILES += \ common/static/createTraceDB.sql \ scripts/metrics.py \ scripts/tests.py - -QMAKE_CXXFLAGS += -std=c++11 -QMAKE_CXXFLAGS += -Xlinker -export-dynamic diff --git a/DRAMSys/simulator/simulator.pro b/DRAMSys/simulator/simulator.pro index 9741a915..959658ff 100644 --- a/DRAMSys/simulator/simulator.pro +++ b/DRAMSys/simulator/simulator.pro @@ -30,6 +30,8 @@ message(LIBBOOST home is $${libboost_home}) LIBS += -L$${systemc_home}/lib-$${systemc_target_arch} -lsystemc LIBS += -L$${libboost_home} -lboost_filesystem -lboost_system + + LIBS += -lsqlite3 LIBS += -lpthread LIBS += -L../../DRAMSys/simulator/src/common/third_party/DRAMPower/src/ -ldrampower @@ -51,7 +53,19 @@ release { DEFINES += NDEBUG } -QMAKE_CXXFLAGS += -std=c++11 -O0 -g +#CONFIG += c++11 +#QMAKE_CXXFLAGS += -O0 -g +#QMAKE_CXXFLAGS += -std=c++0x -O0 -g + +unix:!macx { + QMAKE_CXXFLAGS += -std=c++11 -O0 -g +} + +macx: { + CONFIG += c++11 + QMAKE_CXXFLAGS += -std=c++0x -stdlib=libc++ -O0 -g +} + QMAKE_CXXFLAGS += -isystem $${systemc_home}/include QMAKE_CXXFLAGS += -isystem $${libboost_headers} diff --git a/DRAMSys/simulator/src/simulation/Dram.h b/DRAMSys/simulator/src/simulation/Dram.h index cef4dcc0..856899f2 100644 --- a/DRAMSys/simulator/src/simulation/Dram.h +++ b/DRAMSys/simulator/src/simulation/Dram.h @@ -44,6 +44,7 @@ #include #include #include +#include #include "../common/DebugManager.h" #include "../common/dramExtension.h" #include "../controller/core/TimingCalculation.h" @@ -73,7 +74,7 @@ struct Dram : sc_module std::vector ememory; // Data Storage: - map< unsigned long int, unsigned char[BUSWIDTH/2] > memory; + map< unsigned long int, std::array > memory; TlmRecorder *tlmRecorder; diff --git a/README.md b/README.md index f31e1054..6d275481 100644 --- a/README.md +++ b/README.md @@ -199,6 +199,51 @@ $ cd analyzer $ ./traceAnalyzer ``` +### Building on OSX + +- Install SystemC in /opt (as usual with ./configure --prefix=/opt/systemc; make; make install;). +- Install the required python over macports: +``` bash +sudo port install python34 +``` + +- Install the QtCreator via macports: +``` bash +sudo port install qt5-creator qt5 +``` + +- Install the QWT manually to /opt/qwt, then do: +``` bash +cd /Library/Frameworks +sudo ln -s /opt/qwt-6.1.2/lib/qwt.framework/ . +``` +- The boost library must be installed manually, since the macports version is not compatible with DRAMSys: + +In your “user-config.jam”, put this: + +``` bash +using clang : 11 + : "/usr/bin/clang++" + : "-std=c++11 -stdlib=libc++" "-stdlib=libc++"" + ; + +``` +Then compile and install it: +``` bash +./b2 toolset=clang-11 +sudo ./b2 install +``` +DRAMSys and Analyzer only runs if the following is configured in the project settings: +``` +DYLD_LIBRARY_PATH=/opt/boost/lib +LIBQWT_HEADERS=/opt/local/include +LIBQWT_HOME=/opt/local/lib +PYTHON_HEADERS=/opt/local/include +PYTHON_HOME=/opt/local/lib +SYSTEMC_TARGET_ARCH=macosx64 +``` +For the trace analyzer the file /opt/local/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/pyport.h has to be changed like this: https://trac.macports.org/attachment/ticket/44288/issue10910-workaround.txt + ### DRAMSys Thermal Simulation Before starting make sure you have a **clean repository** without any previous