Small changes to support Clang and Mac OS
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
#include <memory>
|
||||
|
||||
typedef unsigned int ID;
|
||||
enum TextPositioning;
|
||||
//enum TextPositioning;
|
||||
class Transaction;
|
||||
|
||||
class Phase
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#ifndef TRACETIME_H
|
||||
#define TRACETIME_H
|
||||
#include <QString>
|
||||
#include <math.h>
|
||||
|
||||
//time in nanoseconds
|
||||
typedef long long traceTime;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <tlm_utils/peq_with_cb_and_phase.h>
|
||||
#include <tlm_utils/simple_target_socket.h>
|
||||
#include <vector>
|
||||
#include <array>
|
||||
#include "../common/DebugManager.h"
|
||||
#include "../common/dramExtension.h"
|
||||
#include "../controller/core/TimingCalculation.h"
|
||||
@@ -73,7 +74,7 @@ struct Dram : sc_module
|
||||
std::vector<errorModel *> ememory;
|
||||
|
||||
// Data Storage:
|
||||
map< unsigned long int, unsigned char[BUSWIDTH/2] > memory;
|
||||
map< unsigned long int, std::array<unsigned char, BUSWIDTH/2> > memory;
|
||||
|
||||
TlmRecorder *tlmRecorder;
|
||||
|
||||
|
||||
45
README.md
45
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++"
|
||||
: <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
|
||||
|
||||
Before starting make sure you have a **clean repository** without any previous
|
||||
|
||||
Reference in New Issue
Block a user