Merge pull request #43 from fzeder/master
Some changes in order to use DRAMSys in other machines.
This commit is contained in:
@@ -1,15 +1,39 @@
|
||||
#This file has to be included after CONFIG has been adjusted and before the path variables are used
|
||||
#It has to be adjusted to your paths
|
||||
# This file has to be included after CONFIG has been adjusted and before the
|
||||
# path variables are used.
|
||||
# It has to be adjusted to your paths or at your choice set the proper
|
||||
# environment variables to reflect your paths.
|
||||
|
||||
libqwt_home = $$(LIBQWT_HOME)
|
||||
isEmpty(libqwt_home) {
|
||||
libqwt_home = /opt/qwt/lib
|
||||
}
|
||||
message(LIBQWT path is $${libqwt_home})
|
||||
|
||||
libqwt_headers = $$(LIBQWT_HEADERS)
|
||||
isEmpty(libqwt_headers) {
|
||||
libqwt_headers = /opt/qwt/include
|
||||
}
|
||||
message(Getting LIBQWT headers from $${libqwt_headers})
|
||||
|
||||
CONFIG(qwt){
|
||||
LIBS += -L/opt/qwt/lib/ -lqwt -lutil
|
||||
INCLUDEPATH += /opt/qwt/include
|
||||
LIBS += -L$${libqwt_home}/ -lqwt -lutil
|
||||
INCLUDEPATH += $${libqwt_headers}
|
||||
}
|
||||
|
||||
python_home = $$(PYTHON_HOME)
|
||||
isEmpty(python_home) {
|
||||
python_home = /opt/python/lib
|
||||
}
|
||||
message(Python home is $${python_home})
|
||||
|
||||
python_headers = $$(PYTHON_HEADERS)
|
||||
isEmpty(python_headers) {
|
||||
python_headers = /opt/python/include/python3.4m
|
||||
}
|
||||
message(Getting python headers from $${python_headers})
|
||||
|
||||
CONFIG(python){
|
||||
LIBS += -L/opt/python/lib -lpython3.4m
|
||||
INCLUDEPATH += /opt/python/include/python3.4m
|
||||
# LIBS += -lpython3.3m
|
||||
# INCLUDEPATH += /usr/include/python3.3
|
||||
LIBS += -L$${python_home} -lpython3.4m
|
||||
INCLUDEPATH += $${python_headers}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
<PowerDownTimeout value="100" />
|
||||
<!-- Error Modelling -->
|
||||
<ErrorChipSeed value="42" />
|
||||
<ErrorCSVFile value="../src/error/error_new.csv" />
|
||||
<ErrorCSVFile value="../../DRAMSys/simulator/src/error/error.csv" />
|
||||
<ErrorStoreMode value="NoStorage" /> <!--3 Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel)-->
|
||||
</memconfig>
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
<PowerDownTimeout value="100" />
|
||||
<!-- Error Modelling -->
|
||||
<ErrorChipSeed value="42" />
|
||||
<ErrorCSVFile value="../src/error/error_new.csv" />
|
||||
<ErrorCSVFile value="../../DRAMSys/simulator/src/error/error.csv" />
|
||||
<ErrorStoreMode value="NoStorage" /> <!--3 Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel)-->
|
||||
</memconfig>
|
||||
|
||||
@@ -7,27 +7,53 @@ CONFIG -= qt
|
||||
|
||||
system(cd ../../DRAMSys/simulator/src/common/third_party/DRAMPower; make lib;)
|
||||
|
||||
LIBS += -L/opt/systemc/lib-linux64 -lsystemc
|
||||
LIBS += -L/opt/boost/lib -lboost_filesystem -lboost_system
|
||||
systemc_home = $$(SYSTEMC_HOME)
|
||||
isEmpty(systemc_home) {
|
||||
systemc_home = /opt/systemc
|
||||
}
|
||||
message(SystemC home is $${systemc_home})
|
||||
|
||||
systemc_target_arch = $$(SYSTEMC_TARGET_ARCH)
|
||||
isEmpty(systemc_target_arch) {
|
||||
systemc_target_arch = linux64
|
||||
}
|
||||
message(SystemC target architecture is $${systemc_target_arch})
|
||||
|
||||
QMAKE_RPATHDIR += $${systemc_home}/lib-$${systemc_target_arch}
|
||||
message(Linker options QMAKE_RPATHDIR is $${QMAKE_RPATHDIR})
|
||||
|
||||
libboost_home = $$(LIBBOOST_HOME)
|
||||
isEmpty(libboost_home) {
|
||||
libboost_home = /opt/boost/lib
|
||||
}
|
||||
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
|
||||
|
||||
INCLUDEPATH += /opt/systemc/include
|
||||
INCLUDEPATH += /opt/boost/include
|
||||
libboost_headers = $$(LIBBOOST_HEADERS)
|
||||
isEmpty(libboost_headers) {
|
||||
libboost_headers = /opt/boost/include
|
||||
}
|
||||
message(Getting LIBOOST headers from $${libboost_headers})
|
||||
|
||||
INCLUDEPATH += $${systemc_home}/include
|
||||
INCLUDEPATH += $${libboost_headers}
|
||||
INCLUDEPATH += src/common/third_party/DRAMPower/src
|
||||
INCLUDEPATH += src/common/third_party/DRAMPower/src/libdrampower
|
||||
|
||||
|
||||
DEFINES += TIXML_USE_STL
|
||||
DEFINES += SC_INCLUDE_DYNAMIC_PROCESSES
|
||||
release {
|
||||
DEFINES += NDEBUG
|
||||
}
|
||||
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
QMAKE_CXXFLAGS += -isystem /opt/systemc/include
|
||||
QMAKE_CXXFLAGS += -isystem /opt/boost/include
|
||||
QMAKE_CXXFLAGS += -std=c++11 -O0 -g
|
||||
QMAKE_CXXFLAGS += -isystem $${systemc_home}/include
|
||||
QMAKE_CXXFLAGS += -isystem $${libboost_headers}
|
||||
|
||||
SOURCES += \
|
||||
src/common/third_party/tinyxml2/tinyxml2.cpp \
|
||||
@@ -142,14 +168,26 @@ isEmpty(thermalsim) {
|
||||
$$eval(thermalsim) {
|
||||
message(Thermal Simulation Feature Enabled)
|
||||
|
||||
LIBS += -L/opt/3D-ICE/lib -lthreed-ice-2.2.5
|
||||
LIBS += -L/opt/SuperLU_4.3/lib -lsuperlu_4.3
|
||||
libthreed_ice_home = $$(LIBTHREED_ICE_HOME)
|
||||
isEmpty(libthreed_ice_home) {
|
||||
libthreed_ice_home = /opt/3D-ICE/
|
||||
}
|
||||
message(LIBTHREED_ICE_HOME path is $${libthreed_ice_home})
|
||||
|
||||
libsuperlu_home = $$(LIBSUPERLU_HOME)
|
||||
isEmpty(libsuperlu_home) {
|
||||
libsuperlu_home = /opt/SuperLU_4.3/
|
||||
}
|
||||
message(LIBSUPERLU_HOME path is $${libthreed_ice_home})
|
||||
|
||||
LIBS += -L$${libthreed_ice_home}/lib -lthreed-ice-2.2.5
|
||||
LIBS += -L$${libsuperlu_home}/lib -lsuperlu_4.3
|
||||
LIBS += -lblas
|
||||
message(Libraries: $${LIBS})
|
||||
|
||||
INCLUDEPATH += /opt/3D-ICE/include
|
||||
INCLUDEPATH += /opt/SuperLU_4.3/SRC
|
||||
INCLUDEPATH += /opt/systemc/include
|
||||
INCLUDEPATH += $${libthreed_ice_home}/include
|
||||
INCLUDEPATH += $${libsuperlu_home}/SRC
|
||||
INCLUDEPATH += $${systemc_home}/include
|
||||
INCLUDEPATH += src/common/third_party/icewrapper
|
||||
message(Include paths: $${INCLUDEPATH})
|
||||
|
||||
|
||||
Submodule DRAMSys/simulator/src/common/third_party/icewrapper updated: 2179c985a0...37cde24d8f
@@ -43,11 +43,12 @@
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
#include "/opt/systemc-2.3.0/include/systemc"
|
||||
#include "/opt/systemc-2.3.0/include/tlm"
|
||||
#include "/opt/systemc-2.3.0/include/tlm_utils/peq_with_cb_and_phase.h"
|
||||
#include "/opt/systemc-2.3.0/include/tlm_utils/simple_initiator_socket.h"
|
||||
#include "/opt/systemc-2.3.0/include/tlm_utils/simple_target_socket.h"
|
||||
#include <systemc>
|
||||
#include <tlm>
|
||||
#include <tlm_utils/peq_with_cb_and_phase.h>
|
||||
#include <tlm_utils/simple_initiator_socket.h>
|
||||
#include <tlm_utils/simple_target_socket.h>
|
||||
|
||||
#include "../common/dramExtension.h"
|
||||
#include "../common/DebugManager.h"
|
||||
#include "../common/protocol.h"
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
payload->set_data_ptr(dataElement);
|
||||
|
||||
// set data:
|
||||
for(int i = 0; i < bytesPerColumn*burstlength ; i++)
|
||||
for(unsigned i = 0; i < bytesPerColumn*burstlength ; i++)
|
||||
{
|
||||
dataElement[i] = (unsigned char)std::stoi(data.substr(i*2,2).c_str(),0,16);
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ void TracePlayer<BUSWIDTH>::setDataPointer(gp* payload, unsigned char * dataElem
|
||||
//check if payload takes ownership
|
||||
payload->set_data_length(size);
|
||||
payload->set_data_ptr(dataElement);
|
||||
for(int i = 0; i < size; i++)
|
||||
for(unsigned i = 0; i < size; i++)
|
||||
dataElement[i] = 0;
|
||||
}
|
||||
|
||||
|
||||
94
README.md
94
README.md
@@ -1,7 +1,9 @@
|
||||
de.uni-kl.ems.dram.vp.system
|
||||
============================
|
||||
|
||||
Generic DRAM controller simulator **DRAMSys** [1] and related tools.
|
||||
**DRAMSys** [1] is a flexible DRAM subsystem design space exploration
|
||||
framework that consists of models reflecting the DRAM functionality, power
|
||||
consumption, temperature behaviour and retention time errors.
|
||||
|
||||
## Basic Setup
|
||||
|
||||
@@ -57,6 +59,90 @@ $ git merge upstream/master
|
||||
$ git push origin HEAD
|
||||
```
|
||||
|
||||
### Dependencies
|
||||
|
||||
Make sure you have properly installed in your system the required libraries.
|
||||
They are:
|
||||
|
||||
- SystemC 2.3.1 and TLM 2.0
|
||||
|
||||
The sources can be downloaded from http://accellera.org/downloads/standards/systemc.
|
||||
|
||||
For installation instructions see the installation notes file contained in
|
||||
the release package.
|
||||
|
||||
- qwt-6.1.3
|
||||
|
||||
```bash
|
||||
$ svn checkout svn://svn.code.sf.net/p/qwt/code/branches/qwt-6.1
|
||||
$ cd qwt-6.1
|
||||
$ qmake qwt.pro
|
||||
$ make
|
||||
$ sudo make install
|
||||
```
|
||||
|
||||
For further information refer to http://qwt.sourceforge.net/
|
||||
|
||||
- python3.4
|
||||
|
||||
In Debian like distros:
|
||||
|
||||
```bash
|
||||
$ sudo apt-get install python3.4
|
||||
```
|
||||
|
||||
- libboost_filesystem and libboost_system
|
||||
|
||||
In Debian like distros:
|
||||
|
||||
```bash
|
||||
$ sudo apt-get install libboost-all-dev
|
||||
```
|
||||
|
||||
- Others
|
||||
|
||||
Some basic libraries may be already installed in your system. If not you can
|
||||
install the following packages or equivalent ones for your distro. In Debian
|
||||
like distros:
|
||||
|
||||
```bash
|
||||
$ sudo apt-get install libc6
|
||||
$ sudo apt-get install libstdc++6
|
||||
$ sudo apt-get install sqlite3
|
||||
$ sudo apt-get install libsqlite3-dev
|
||||
$ sudo apt-get install libqt5gui5
|
||||
$ sudo apt-get install libqt5sql5
|
||||
$ sudo apt-get install libqt5widgets5
|
||||
$ sudo apt-get install libqt5core5a
|
||||
```
|
||||
|
||||
To grant flexibility to the user the paths where to find some essential
|
||||
libraries and headers can be specified with environment variables. You can add
|
||||
such variables to you ~/.bashrc file or equivalent.
|
||||
|
||||
```bash
|
||||
# SystemC home and target architecture
|
||||
export SYSTEMC_HOME=<path>
|
||||
export SYSTEMC_TARGET_ARCH=<[linux,linux64]>
|
||||
|
||||
# DRAMSys libraries and headers
|
||||
export PYTHON_HOME=<path>
|
||||
export PYTHON_HEADERS=<path>
|
||||
export LIBQWT_HOME=<path>
|
||||
export LIBQWT_HEADERS=<path>
|
||||
export LIBBOOST_HOME=<path>
|
||||
export LIBBOOST_HEADERS=<path>
|
||||
```
|
||||
|
||||
Users interested in thermal simulation can also add some extra environment
|
||||
variables:
|
||||
|
||||
```bash
|
||||
# Necessary for thermal simulation
|
||||
export LIBTHREED_ICE_HOME=<path>
|
||||
export LIBSUPERLU_HOME=<path>
|
||||
```
|
||||
|
||||
### Buiding with QTCreator
|
||||
Execute the *QTCreator*.
|
||||
|
||||
@@ -228,7 +314,7 @@ Enable the error model in fr_fcfs.xml.
|
||||
<MaxNrOfTransactions value="8" />
|
||||
<Scheduler value="FR_FCFS" />
|
||||
<Capsize value="5" />
|
||||
<PowerDownMode value="TimeoutPDN" />
|
||||
<PowerDownMode value="NoPowerDown"/>
|
||||
<PowerDownTimeout value="100" />
|
||||
<!-- Error Model: -->
|
||||
<ErrorChipSeed value="42" />
|
||||
@@ -478,11 +564,11 @@ Below are listed the configuration sections and configuration fields.
|
||||
<MaxNrOfTransactions value="8"/>
|
||||
<Scheduler value="FIFO_STRICT"/>
|
||||
<Capsize value="5"/>
|
||||
<PowerDownMode value="TimeoutSREF"/>
|
||||
<PowerDownMode value="NoPowerDown"/>
|
||||
<PowerDownTimeout value="100"/>
|
||||
<!-- Error Modelling -->
|
||||
<ErrorChipSeed value="42"/>
|
||||
<ErrorCSVFile value="../src/error/error_new.csv"/>
|
||||
<ErrorCSVFile value="../../DRAMSys/simulator/src/error/error.csv" />
|
||||
<ErrorStoreMode value="NoStorage"/>
|
||||
</memconfig>
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user