Conflicts resolved

This commit is contained in:
Felipe S. Prado
2016-10-21 15:29:38 +02:00
11 changed files with 288 additions and 51 deletions

View File

@@ -165,7 +165,7 @@ def generatePlots(pathToTrace):
cursor.execute(" SELECT WindowSize FROM GeneralInfo")
windowSize = float(cursor.fetchone()[0])
if(windowSize == 0):
outputFiles = "No output file created"
outputFiles = "No output file created. Check WindowSize and EnableWindowing configs."
else:
cursor.execute(" SELECT TraceEnd FROM GeneralInfo ")
traceEnd = float(cursor.fetchone()[0])

View File

@@ -22,12 +22,12 @@ unix:!macx {
macx: {
CONFIG += c++11
QMAKE_CXXFLAGS += -std=c++0x -stdlib=libc++ -DMAC
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 += /usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/include/python3.5m
LIBS += -L/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib -lpython3.5
QMAKE_LFLAGS += -F$$(LIBQWT_HOME)
LIBS += -F$$(LIBQWT_HOME) -framework qwt
INCLUDEPATH += $$(LIBQWT_HEADERS)
DEPENDPATH += $$replace(LIBQWT_HOME, lib, )
INCLUDEPATH += $$(PYTHON_HEADERS)
LIBS += -L$$(PYTHON_HOME) -lpython3.5
}
# QWT library and header files

View File

@@ -0,0 +1,25 @@
<!--
DDR3 Example:
1GB x64 DIMM with: 8 * 1 Gb x8 Devices (e.g. Micron MT41J128M8) with Page Size: 1KB
Device Characteristics:
Rows: 16 K [13:0] -> 14 bit
Bank: 8 [2:0] -> 3 bit
Cols: 1 K [9:0] -> 10 bit
Due to the DIMM we have a Byte Offset Y
2 2 2 | 2 2 2 2 2 2 2 1 1 1 1 1 1 1 | 1 1 1
9 8 7 | 6 5 4 3 2 1 0 9 8 7 6 5 4 3 | 2 1 0 9 8 7 6 5 4 3 | 2 1 0
B B B | R R R R R R R R R R R R R R | C C C C C C C C C C | Y Y Y
-->
<addressmapping>
<channel from="128" to="128" /> <!-- only one channel -->
<bank from="27" to="29" />
<row from="13" to="26" />
<column from="3" to="12" />
<bytes from="0" to="2" />
</addressmapping>

View File

@@ -0,0 +1,25 @@
<!--
DDR3 Example:
1GB x64 DIMM with: 8 * 1 Gb x8 Devices (e.g. Micron MT41J128M8) with Page Size: 1KB
Device Characteristics:
Rows: 16 K [13:0] -> 14 bit
Bank: 8 [2:0] -> 3 bit
Cols: 1 K [9:0] -> 10 bit
Due to the DIMM we have a Byte Offset Y
2 2 2 2 2 2 2 1 1 1 1 1 1 1 | 1 1 1 | 1 1 1
9 8 7 6 5 4 3 2 1 0 9 8 7 6 | 5 4 3 | 2 1 0 9 8 7 6 5 4 3 | 2 1 0
R R R R R R R R R R R R R R | B B B | C C C C C C C C C C | Y Y Y
-->
<addressmapping>
<channel from="128" to="128" /> <!-- only one channel -->
<row from="16" to="29" />
<bank from="13" to="15" />
<column from="3" to="12" />
<bytes from="0" to="2" />
</addressmapping>

View File

@@ -0,0 +1,25 @@
<!--
DDR3 Example:
2GB x64 DIMM with: 8 * 2 Gb x8 Devices (e.g. Micron MT41J256M8) with Page Size: 1KB
Device Characteristics:
Rows: 32 K [14:0] -> 15 bit
Bank: 8 [2:0] -> 3 bit
Cols: 1 K [9:0] -> 10 bit
Due to the DIMM we have a Byte Offset Y
3 2 2 | 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 | 1 1 1
0 9 8 | 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 | 2 1 0 9 8 7 6 5 4 3 | 2 1 0
B B B | R R R R R R R R R R R R R R R | C C C C C C C C C C | Y Y Y
-->
<addressmapping>
<channel from="128" to="128" /> <!-- only one channel -->
<bank from="28" to="30" />
<row from="13" to="27" />
<column from="3" to="12" />
<bytes from="0" to="2" />
</addressmapping>

View File

@@ -0,0 +1,25 @@
<!--
DDR3 Example:
2GB x64 DIMM with: 8 * 2 Gb x8 Devices (e.g. Micron MT41J256M8) with Page Size: 1KB
Device Characteristics:
Rows: 32 K [14:0] -> 15 bit
Bank: 8 [2:0] -> 3 bit
Cols: 1 K [9:0] -> 10 bit
Due to the DIMM we have a Byte Offset Y
3 2 2 2 2 2 2 2 1 1 1 1 1 1 1 | 1 1 1 | 1 1 1
0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 | 5 4 3 | 2 1 0 9 8 7 6 5 4 3 | 2 1 0
R R R R R R R R R R R R R R R | B B B | C C C C C C C C C C | Y Y Y
-->
<addressmapping>
<channel from="128" to="128" /> <!-- only one channel -->
<row from="16" to="30" />
<bank from="13" to="15" />
<column from="3" to="12" />
<bytes from="0" to="2" />
</addressmapping>

View File

@@ -48,6 +48,7 @@ OTHER_FILES += resources/traces/mediabench-g721encode_32.stl
OTHER_FILES += resources/traces/small.stl
OTHER_FILES += resources/traces/chstone-motion_32.stl
OTHER_FILES += resources/traces/mediabench-adpcmdecode_32.stl
OTHER_FILES += resources/traces/ddr3_example.stl
# mcconfigs
OTHER_FILES += resources/configs/mcconfigs/fifoStrict.xml
@@ -66,10 +67,52 @@ OTHER_FILES += resources/configs/memspecs/MatzesWideIO.xml
OTHER_FILES += resources/configs/memspecs/DDR4.xml
OTHER_FILES += resources/configs/memspecs/WideIO.xml
OTHER_FILES += resources/configs/memspecs/MatzesWideIO-short.xml
OTHER_FILES += resources/configs/memspecs/MICRON_1Gb_DDR3-1600_8bit_G.xml
OTHER_FILES += resources/configs/memspecs/JEDEC_256Mb_WIDEIO_SDR-200_128bit.xml
OTHER_FILES += resources/configs/memspecs/JEDEC_256Mb_WIDEIO_SDR-266_128bit.xml
OTHER_FILES += resources/configs/memspecs/MICRON_1Gb_DDR2-1066_16bit_H.xml
OTHER_FILES += resources/configs/memspecs/MICRON_1Gb_DDR2-800_16bit_H.xml
OTHER_FILES += resources/configs/memspecs/MICRON_1Gb_DDR3-1066_16bit_G.xml
OTHER_FILES += resources/configs/memspecs/MICRON_1Gb_DDR3-1066_16bit_G_2s.xml
OTHER_FILES += resources/configs/memspecs/MICRON_1Gb_DDR3-1066_16bit_G_3s.xml
OTHER_FILES += resources/configs/memspecs/MICRON_1Gb_DDR3-1066_16bit_G_mu.xml
OTHER_FILES += resources/configs/memspecs/MICRON_1Gb_DDR3-1066_8bit_G.xml
OTHER_FILES += resources/configs/memspecs/MICRON_1Gb_DDR3-1066_8bit_G_2s.xml
OTHER_FILES += resources/configs/memspecs/MICRON_1Gb_DDR3-1066_8bit_G_3s.xml
OTHER_FILES += resources/configs/memspecs/MICRON_1Gb_DDR3-1066_8bit_G_mu.xml
OTHER_FILES += resources/configs/memspecs/MICRON_1Gb_DDR3-1600_8bit_G.xml
OTHER_FILES += resources/configs/memspecs/MICRON_1Gb_DDR3-1600_8bit_G_2s.xml
OTHER_FILES += resources/configs/memspecs/MICRON_1Gb_DDR3-1600_8bit_G_3s.xml
OTHER_FILES += resources/configs/memspecs/MICRON_1Gb_DDR3-1600_8bit_G_mu.xml
OTHER_FILES += resources/configs/memspecs/MICRON_2Gb_DDR3-1066_8bit_D.xml
OTHER_FILES += resources/configs/memspecs/MICRON_2Gb_DDR3-1066_8bit_D_2s.xml
OTHER_FILES += resources/configs/memspecs/MICRON_2Gb_DDR3-1066_8bit_D_3s.xml
OTHER_FILES += resources/configs/memspecs/MICRON_2Gb_DDR3-1066_8bit_D_mu.xml
OTHER_FILES += resources/configs/memspecs/MICRON_2Gb_DDR3-1600_16bit_D.xml
OTHER_FILES += resources/configs/memspecs/MICRON_2Gb_DDR3-1600_16bit_D_2s.xml
OTHER_FILES += resources/configs/memspecs/MICRON_2Gb_DDR3-1600_16bit_D_3s.xml
OTHER_FILES += resources/configs/memspecs/MICRON_2Gb_DDR3-1600_16bit_D_mu.xml
OTHER_FILES += resources/configs/memspecs/MICRON_2Gb_LPDDR-266_16bit_A.xml
OTHER_FILES += resources/configs/memspecs/MICRON_2Gb_LPDDR-333_16bit_A.xml
OTHER_FILES += resources/configs/memspecs/MICRON_2Gb_LPDDR2-1066-S4_16bit_A.xml
OTHER_FILES += resources/configs/memspecs/MICRON_2Gb_LPDDR2-800-S4_16bit_A.xml
OTHER_FILES += resources/configs/memspecs/MICRON_4Gb_DDR4-1866_8bit_A.xml
OTHER_FILES += resources/configs/memspecs/MICRON_4Gb_DDR4-2400_8bit_A.xml
OTHER_FILES += resources/configs/memspecs/MICRON_4Gb_LPDDR3-1333_32bit_A.xml
OTHER_FILES += resources/configs/memspecs/MICRON_4Gb_LPDDR3-1600_32bit_A.xml
OTHER_FILES += resources/configs/memspecs/SAMSUNG_K4B1G1646E_1Gb_DDR3-1600_16bit.xml
# address mapping configs
OTHER_FILES += resources/configs/amconfigs/am_ddr3.xml
OTHER_FILES += resources/configs/amconfigs/am_ddr4.xml
OTHER_FILES += resources/configs/amconfigs/am_ddr3_x16_brc.xml
OTHER_FILES += resources/configs/amconfigs/am_ddr3_x16_rbc.xml
OTHER_FILES += resources/configs/amconfigs/am_ddr3_8x1Gbx8_dimm_p1KB_brc.xml
OTHER_FILES += resources/configs/amconfigs/am_ddr3_8x1Gbx8_dimm_p1KB_rbc.xml
OTHER_FILES += resources/configs/amconfigs/am_ddr3_8x2Gbx8_dimm_p1KB_brc.xml
OTHER_FILES += resources/configs/amconfigs/am_ddr3_8x2Gbx8_dimm_p1KB_rbc.xml
OTHER_FILES += resources/configs/amconfigs/resources/configs/amconfigs/am_ddr4.xml
OTHER_FILES += resources/configs/amconfigs/am_highHits.xml
OTHER_FILES += resources/configs/amconfigs/am_highPara.xml
OTHER_FILES += resources/configs/amconfigs/am_wideio.xml

View File

@@ -5,7 +5,7 @@
<DatabaseRecording value="1" />
<PowerAnalysis value="1" />
<EnableWindowing value = "1" />
<WindowSize value="1000" />
<WindowSize value="100" />
<NumberOfTracePlayers value="1"/>
<NumberOfMemChannels value="1"/>
<ControllerCoreDisableRefresh value="0"/>
@@ -29,21 +29,33 @@
<GeneratePowerMap value="1" />
</thermalsimconfig>
<!-- Memory Device Specification: Which Device is on our simulated DDR3 DIMM -->
<memspecs>
<memspec src="../../DRAMSys/simulator/resources/configs/memspecs/MICRON_1Gb_DDR3-1600_8bit_G.xml"></memspec>
</memspecs>
<!-- Addressmapping Configuration of the Memory Controller -->
<addressmappings>
<addressmapping src="../../DRAMSys/simulator/resources/configs/amconfigs/am_ddr3.xml"></addressmapping>
<addressmapping src="../../DRAMSys/simulator/resources/configs/amconfigs/am_ddr3_8x1Gbx8_dimm_p1KB_brc.xml"></addressmapping>
</addressmappings>
<!-- Memory Controller Configuration -->
<mcconfigs>
<!-- Without Scheduler FIFO -->
<mcconfig src="../../DRAMSys/simulator/resources/configs/mcconfigs/fifoStrict.xml"/>
<!-- With FR-FCFS Scheduler -->
<!--<mcconfig src="../../DRAMSys/simulator/resources/configs/mcconfigs/fr_fcfs.xml"/>-->
</mcconfigs>
<tracesetups>
<tracesetup id="fifo">
<device clkMhz="200">chstone-adpcm_32.stl</device>
<!--
This device mimics an image processing application
running on an FPGA with 200 Mhz.
-->
<device clkMhz="200">ddr3_example.stl</device>
</tracesetup>
</tracesetups>

View File

@@ -139,7 +139,7 @@ void ControllerCore::triggerRefresh(tlm::tlm_generic_payload& payload)
powerDownManager->wakeUpForRefresh(bank, time); //expects PDNA and PDNP to exit without delay
bool pdnpToSrefTransition = false;
if (config.PowerDownMode == EPowerDownMode::Staggered) {
pdnpToSrefTransition = state->getLastCommand(Command::PDNPX,bank).getStart() >= time;
pdnpToSrefTransition = state->getLastCommand(Command::PDNPX,bank).getStart() >= time;
}
if (pdnpToSrefTransition) {
powerDownManager->sleep(bank,time);

View File

@@ -244,9 +244,9 @@ struct Dram : sc_module
cout << name() << string("\tTotal Time: \t") <<(endTime-startTime).to_string() << endl;
//cout << name() << string("\tTotal IDLE: \t") <<idleTime.to_string() << endl;
//cout << name() << string("\tTotal Active DataBus: \t") << activeTime.to_string() << endl;
cout << name() << string("\tAVG BW: \t") <<std::fixed<<std::setprecision(2) << ((bandwidth/100)*maxBandwidth) << " GiB/s (" << bandwidth << " %)" << endl;
cout << name() << string("\tAVG BW/IDLE: \t") <<std::fixed<<std::setprecision(2) << ((bandwidth_IDLE/100)*maxBandwidth) <<" GiB/s ("<< (bandwidth_IDLE) << " %)" << endl;
cout << name() << string("\tMAX BW: \t") <<std::fixed<<std::setprecision(2) <<maxBandwidth << " GiB/s" << endl;
cout << name() << string("\tAVG BW: \t") <<std::fixed<<std::setprecision(2) << ((bandwidth/100)*maxBandwidth) << " Gibit/s (" << bandwidth << " %)" << endl;
cout << name() << string("\tAVG BW/IDLE: \t") <<std::fixed<<std::setprecision(2) << ((bandwidth_IDLE/100)*maxBandwidth) <<" Gibit/s ("<< (bandwidth_IDLE) << " %)" << endl;
cout << name() << string("\tMAX BW: \t") <<std::fixed<<std::setprecision(2) <<maxBandwidth << " Gibit/s" << endl;
// Clean up:
for (auto e : ememory) {
delete e;

154
README.md
View File

@@ -65,7 +65,7 @@ They are:
- SystemC 2.3.1 and TLM 2.0
The sources can be downloaded from http://accellera.org/downloads/standards/systemc.
The sources can be downloaded from [this](http://accellera.org/downloads/standards/systemc).
For installation instructions see the installation notes file contained in
the release package.
@@ -80,7 +80,7 @@ They are:
$ sudo make install
```
For further information refer to http://qwt.sourceforge.net/
For further information refer to [this](http://qwt.sourceforge.net/)
- python3.5
@@ -211,68 +211,150 @@ $ ./traceAnalyzer
```
### Building on OSX
- Install XCode
- Install SystemC manually in /opt:
- 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
$ ./configure --prefix=/opt/systemc
$ make
$ sudo make install
```
- Install the QtCreator via macports:
Or you can install via homebrew:
``` bash
sudo port install qt5-creator qt5
$ brew install systemc
```
in this case, systemc will be installed, e.g. in:
```
/usr/local/Cellar/systemc/2.3.1
```
and make a simlink of the lib directory:
```
ln -s lib/ lib-macosx64
```
- Install the required python 3 over homebrew:
``` bash
$ brew install python3
```
Python3 (via homebrew) will be installed in
```
/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework
```
or you can install manually using official package provided in [link](https://www.python.org/downloads/)
**Note:** Official Python Package will be installed in
```
/Library/Frameworks/Python.framework
```
- Install the QtCreator using offical setup file from [link](https://www.qt.io/download-open-source/#section-2)
**Note:** You have later setup PATH for Qt5 and its tool if you install QtCreator manually, e.g:
``` bash
# Setting PATH for Qt5 and its tools
PATH="/Users/<username>/Qt5.7.0/5.7/clang_64/bin:${PATH}"
export PATH
```
- 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++""
;
$ cd /Library/Frameworks
$ sudo ln -s /opt/qwt-6.1.2/lib/qwt.framework/ .
```
- The boost library can be installed manually or through homebrew:
Manually: Install boost lib (filesystem & system) in /opt/boost
```
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:
$ ./bootstrap.sh --prefix=/opt/boost --with-libraries=filesystem,system
$ sudo ./b2 install
```
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
Homebrew: Install boost lib (all, which consumes large storage) in
```
/usr/local/Cellar
```
``` bash
$ brew install boost
```
- Export correct Environment Variables in your terminal's profile, e.g:
``` bash
# Setting for DRAMSys
# SystemC via official source
export SYSTEMC_HOME=/opt/systemc
export SYSTEMC_TARGET_ARCH=macosx64
# SystemC via Homebrew
#export SYSTEMC_HOME=/usr/local/Cellar/systemc/2.3.1
#export SYSTEMC_TARGET_ARCH=macosx64
# Python via official pkg
export PYTHON_HOME=/Library/Frameworks/Python.framework/Versions/3.5/lib
export PYTHON_HEADERS=/Library/Frameworks/Python.framework/Versions/3.5/Headers
# Python3 via Homebrew
#export PYTHON_HOME=/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib
#export PYTHON_HEADERS=/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/Headers
export LIBQWT_HOME=/opt/qwt-6.1.4/lib
export LIBQWT_HEADERS=/opt/qwt-6.1.4/lib/qwt.framework/Headers
export LIBBOOST_HOME=/opt/boost/lib
export LIBBOOST_HEADERS=/opt/boost/include
# Add Boost Lib into Dynamic Lib Path
DYLD_LIBRARY_PATH="/opt/boost/lib:${DYLD_LIBRARY_PATH}"
export DYLD_LIBRARY_PATH
```
- For the trace analyzer the file:
```
/opt/local/Library/Frameworks/Python.framework/Versions/3.5/include/python3.4m/pyport.h
```
has to be changed like [this](https://trac.macports.org/attachment/ticket/44288/issue10910-workaround.txt)
- Install package [xerces](http://xerces.apache.org/mirrors.cgi) if your system does not have.
- Type following command inside your dram.vp.system folder:
``` bash
$ mkdir build
$ qmake ../DRAMSys/dram.vp.system.pro
$ make -j<number_jobs>
```
Now you can try to run DramSys and traceAnalyzer App inside folder simulator and analyzer, respectively
### DRAMSys Thermal Simulation
The thermal simulation is performed by a **3D-ICE** [8] server accessed
through the network. Therefore users interested in thermal simulation during
their DRAMSys simulations need to make sure they have a 3D-ICE server up and
running before starting. For more information about 3D-ICE visit the official
website http://esl.epfl.ch/3D-ICE.
running before starting. For more information about 3D-ICE visit the [official website](http://esl.epfl.ch/3D-ICE).
#### Installing the lastest 3D-ICE version
Download the lastest version. Make sure you got version 2.2.6 or greater:
[Download](http://esl.epfl.ch/3d-ice/download.html) the lastest version. Make sure you got version 2.2.6 or greater:
``` bash
$ wget http://esl.epfl.ch/files/content/sites/esl/files/3dice/releases/3d-ice-latest.zip
$ tar -xvzf 3d-ice-latest.zip
```
Install SuperLU dependencies:
Install [SuperLU](http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_5.2.1.tar.gz) dependencies:
``` bash
$ sudo apt-get install build-essential git bison flex libblas-dev