Small changes to support Clang and Mac OS
This commit is contained in:
@@ -47,7 +47,7 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
typedef unsigned int ID;
|
typedef unsigned int ID;
|
||||||
enum TextPositioning;
|
//enum TextPositioning;
|
||||||
class Transaction;
|
class Transaction;
|
||||||
|
|
||||||
class Phase
|
class Phase
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
#ifndef TRACETIME_H
|
#ifndef TRACETIME_H
|
||||||
#define TRACETIME_H
|
#define TRACETIME_H
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
//time in nanoseconds
|
//time in nanoseconds
|
||||||
typedef long long traceTime;
|
typedef long long traceTime;
|
||||||
|
|||||||
@@ -6,9 +6,27 @@
|
|||||||
|
|
||||||
QT += core gui
|
QT += core gui
|
||||||
QT += sql
|
QT += sql
|
||||||
CONFIG += qwt
|
CONFIG += no_keywords
|
||||||
|
|
||||||
|
|
||||||
CONFIG += python
|
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)
|
include(paths.pro)
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
@@ -101,6 +119,3 @@ OTHER_FILES += \
|
|||||||
common/static/createTraceDB.sql \
|
common/static/createTraceDB.sql \
|
||||||
scripts/metrics.py \
|
scripts/metrics.py \
|
||||||
scripts/tests.py
|
scripts/tests.py
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += -std=c++11
|
|
||||||
QMAKE_CXXFLAGS += -Xlinker -export-dynamic
|
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ message(LIBBOOST home is $${libboost_home})
|
|||||||
|
|
||||||
LIBS += -L$${systemc_home}/lib-$${systemc_target_arch} -lsystemc
|
LIBS += -L$${systemc_home}/lib-$${systemc_target_arch} -lsystemc
|
||||||
LIBS += -L$${libboost_home} -lboost_filesystem -lboost_system
|
LIBS += -L$${libboost_home} -lboost_filesystem -lboost_system
|
||||||
|
|
||||||
|
|
||||||
LIBS += -lsqlite3
|
LIBS += -lsqlite3
|
||||||
LIBS += -lpthread
|
LIBS += -lpthread
|
||||||
LIBS += -L../../DRAMSys/simulator/src/common/third_party/DRAMPower/src/ -ldrampower
|
LIBS += -L../../DRAMSys/simulator/src/common/third_party/DRAMPower/src/ -ldrampower
|
||||||
@@ -51,7 +53,19 @@ release {
|
|||||||
DEFINES += NDEBUG
|
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 $${systemc_home}/include
|
||||||
QMAKE_CXXFLAGS += -isystem $${libboost_headers}
|
QMAKE_CXXFLAGS += -isystem $${libboost_headers}
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
#include <tlm_utils/peq_with_cb_and_phase.h>
|
#include <tlm_utils/peq_with_cb_and_phase.h>
|
||||||
#include <tlm_utils/simple_target_socket.h>
|
#include <tlm_utils/simple_target_socket.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <array>
|
||||||
#include "../common/DebugManager.h"
|
#include "../common/DebugManager.h"
|
||||||
#include "../common/dramExtension.h"
|
#include "../common/dramExtension.h"
|
||||||
#include "../controller/core/TimingCalculation.h"
|
#include "../controller/core/TimingCalculation.h"
|
||||||
@@ -73,7 +74,7 @@ struct Dram : sc_module
|
|||||||
std::vector<errorModel *> ememory;
|
std::vector<errorModel *> ememory;
|
||||||
|
|
||||||
// Data Storage:
|
// Data Storage:
|
||||||
map< unsigned long int, unsigned char[BUSWIDTH/2] > memory;
|
map< unsigned long int, std::array<unsigned char, BUSWIDTH/2> > memory;
|
||||||
|
|
||||||
TlmRecorder *tlmRecorder;
|
TlmRecorder *tlmRecorder;
|
||||||
|
|
||||||
|
|||||||
45
README.md
45
README.md
@@ -199,6 +199,51 @@ $ cd analyzer
|
|||||||
$ ./traceAnalyzer
|
$ ./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++"
|
||||||
|
: <cxxflags>"-std=c++11 -stdlib=libc++" <linkflags>"-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
|
### DRAMSys Thermal Simulation
|
||||||
|
|
||||||
Before starting make sure you have a **clean repository** without any previous
|
Before starting make sure you have a **clean repository** without any previous
|
||||||
|
|||||||
Reference in New Issue
Block a user