Merge branch 'master' of git.rhrk.uni-kl.de:EIT-Wehn/dram.vp.system
This commit is contained in:
@@ -31,7 +31,7 @@ def memory_utilisation_window(connection, tracePath, steps):
|
||||
cursor.execute(" SELECT WindowSize FROM GeneralInfo ")
|
||||
windowSize = float(cursor.fetchone()[0])
|
||||
# All possible cases of data transfers inside a time window
|
||||
queryFull = """ SELECT sum(DataStrobeEnd - DataStrobeBegin) FROM transactions Where DataStrobeBegin > ? and DataStrobeEnd < ?""" # The data transfer begins and ends inside the time window
|
||||
queryFull = """ SELECT sum(DataStrobeEnd - DataStrobeBegin) FROM transactions Where DataStrobeBegin >= ? and DataStrobeEnd <= ?""" # The data transfer begins and ends inside the time window
|
||||
queryEnd = """ SELECT sum(DataStrobeEnd - ?) FROM transactions Where DataStrobeBegin < ? and DataStrobeEnd > ? and DataStrobeEnd <=?""" # Only the end of the data transfer is inside the time window
|
||||
queryBegin = """ SELECT sum(? - DataStrobeBegin) FROM transactions Where DataStrobeBegin >= ? and DataStrobeBegin < ? and DataStrobeEnd > ?""" # Only the beginning of the data transfer is inside the time window
|
||||
queryPart = """ SELECT DataStrobeBegin FROM transactions Where DataStrobeBegin <= ? and DataStrobeEnd >= ?""" # The data transfer occupies all the time window
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<WindowSize value="1000" />
|
||||
<ThermalSimulation value="0"/>
|
||||
<SimulationProgressBar value="1"/>
|
||||
<NumberOfMemChannels value="1"/>
|
||||
<NumberOfMemChannels value="4"/>
|
||||
<NumberOfDevicesOnDIMM value = "1" />
|
||||
<CheckTLM2Protocol value = "0" />
|
||||
</simconfig>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- Temperature Simulator Configuration -->
|
||||
<thermalconfig src="config.xml" />
|
||||
<!-- Memory Device Specification: Which Device is used for Wide I/O -->
|
||||
<memspec src="WideIO.xml"></memspec>
|
||||
<memspec src="wideio.xml"></memspec>
|
||||
<!-- Addressmapping Configuration of the Memory Controller -->
|
||||
<addressmapping src="am_wideio.xml"></addressmapping>
|
||||
<!-- Memory Controller Configuration -->
|
||||
|
||||
@@ -18,8 +18,11 @@ isEmpty(systemc_target_arch) {
|
||||
|
||||
message(SystemC target architecture is $${systemc_target_arch})
|
||||
|
||||
#QMAKE_RPATHDIR += $${systemc_home}/lib-$${systemc_target_arch}
|
||||
#message(Linker options QMAKE_RPATHDIR is $${QMAKE_RPATHDIR})
|
||||
unix:!macx {
|
||||
message(Building on a GNU/Linux)
|
||||
QMAKE_RPATHDIR += $${systemc_home}/lib-$${systemc_target_arch}
|
||||
message(Linker options QMAKE_RPATHDIR is $${QMAKE_RPATHDIR})
|
||||
}
|
||||
|
||||
DEFINES += TIXML_USE_STL
|
||||
DEFINES += SC_INCLUDE_DYNAMIC_PROCESSES
|
||||
@@ -38,9 +41,9 @@ INCLUDEPATH += $${systemc_home}/include
|
||||
INCLUDEPATH += src/common/third_party/DRAMPower/src
|
||||
INCLUDEPATH += src/common/third_party/DRAMPower/src/libdrampower
|
||||
|
||||
LIBS += -lsqlite3
|
||||
LIBS += -L$${systemc_home}/lib-$${systemc_target_arch} -lsystemc
|
||||
LIBS += libDRAMSys.a
|
||||
LIBS += ../../DRAMSys/simulator/src/common/third_party/DRAMPower/src/libdrampower.a
|
||||
LIBS += -lsqlite3
|
||||
|
||||
SOURCES += src/simulation/main.cpp
|
||||
|
||||
@@ -64,7 +64,7 @@ chomp $storeModeLine;
|
||||
|
||||
system("sed -i.bu '" . $storeModeLine . "s^.*^ <StoreMode value=\"Store\"/>^' ../../DRAMSys/tests/TLM_compliance/fifoStrict.xml");
|
||||
|
||||
`./dramSys ../../DRAMSys/tests/TLM_compliance/sim-batch.xml &> ../../DRAMSys/tests/TLM_compliance/output.txt`;
|
||||
`./DRAMSys ../../DRAMSys/tests/TLM_compliance/sim-batch.xml &> ../../DRAMSys/tests/TLM_compliance/output.txt`;
|
||||
|
||||
if("" ne `grep "Error: tlm2_protocol_checker" ../../DRAMSys/tests/TLM_compliance/output.txt`)
|
||||
{
|
||||
@@ -80,7 +80,7 @@ system("sed -i.bu '" . $storeModeLine . "s^.*^ <StoreMode value=\"NoStorage\"
|
||||
|
||||
`rm -f sim-batch/TLM_compliance_test*.tdb`;
|
||||
|
||||
`./dramSys ../../DRAMSys/tests/TLM_compliance/sim-batch.xml &> ../../DRAMSys/tests/TLM_compliance/output.txt`;
|
||||
`./DRAMSys ../../DRAMSys/tests/TLM_compliance/sim-batch.xml &> ../../DRAMSys/tests/TLM_compliance/output.txt`;
|
||||
|
||||
if("" ne `grep "Error: tlm2_protocol_checker" ../../DRAMSys/tests/TLM_compliance/output.txt`)
|
||||
{
|
||||
|
||||
72
DRAMSys/tests/error/generateErrorTest_4ch.pl
Normal file
72
DRAMSys/tests/error/generateErrorTest_4ch.pl
Normal file
@@ -0,0 +1,72 @@
|
||||
#!/usr/bin/perl -w
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
# Assuming this address mapping:
|
||||
# <addressmapping>
|
||||
# <channel from="27" to="28" />
|
||||
# <row from="14" to="26" />
|
||||
# <column from="7" to="13" />
|
||||
# <bank from="4" to="6" />
|
||||
# <bytes from="0" to="3" />
|
||||
# </addressmapping>
|
||||
|
||||
# This is how it should look like later:
|
||||
# 31: write 0x0 ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
|
||||
my $numberOfRows = 8192;
|
||||
my $numberOfColumnsPerRow = 128;
|
||||
my $bytesPerColumn = 16;
|
||||
my $burstLength = 4; # burst length of 4 columns --> 4 columns written or read per access
|
||||
my $dataLength = $bytesPerColumn * $burstLength;
|
||||
|
||||
my $rowOffset = 0x4000;
|
||||
my $colOffset = 0x80;
|
||||
|
||||
# Generate Data Pattern:
|
||||
my $dataPatternByte = "ff";
|
||||
|
||||
my $dataPattern = "";
|
||||
for(my $i = 0; $i < $dataLength; $i++)
|
||||
{
|
||||
$dataPattern .= $dataPatternByte;
|
||||
}
|
||||
|
||||
my $clkCounter = 0;
|
||||
my $addr = 0;
|
||||
|
||||
# Generate Trace file (writes):
|
||||
|
||||
for(my $ch = 0; $ch < 4; $ch++) {
|
||||
$addr = 0;
|
||||
$addr |= $ch << 27;
|
||||
for(my $row = 0; $row < ($numberOfRows * $rowOffset); $row = $row + $rowOffset)
|
||||
{
|
||||
for(my $col = 0; $col < ($numberOfColumnsPerRow * $colOffset); $col = $col + ($colOffset * $burstLength))
|
||||
{
|
||||
my $addrHex = sprintf("0x%x", $addr);
|
||||
print "$clkCounter:\twrite\t$addrHex\t$dataPattern\n";
|
||||
$clkCounter++;
|
||||
$addr += $colOffset * $burstLength;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$clkCounter = 350000000;
|
||||
$addr = 0;
|
||||
|
||||
# Generate Trace file (reads):
|
||||
for(my $ch = 0; $ch < 4; $ch++) {
|
||||
$addr = 0;
|
||||
$addr |= $ch << 27;
|
||||
for(my $row = 0; $row < ($numberOfRows * $rowOffset); $row = $row + $rowOffset)
|
||||
{
|
||||
for(my $col = 0; $col < ($numberOfColumnsPerRow * $colOffset); $col = $col + ($colOffset * $burstLength))
|
||||
{
|
||||
my $addrHex = sprintf("0x%x", $addr);
|
||||
print "$clkCounter:\tread\t$addrHex\t$dataPattern\n";
|
||||
$clkCounter++;
|
||||
$addr += $colOffset * $burstLength;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ if (! -e $trace_file) {
|
||||
|
||||
# Run Simulation:
|
||||
chdir("../../../build/simulator/");
|
||||
`./dramSys ../../DRAMSys/tests/error/sim-batch.xml > ../../DRAMSys/tests/error/output.txt`;
|
||||
`./DRAMSys ../../DRAMSys/tests/error/sim-batch.xml > ../../DRAMSys/tests/error/output.txt`;
|
||||
|
||||
chdir("../../DRAMSys/tests/error");
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ use File::Compare;
|
||||
|
||||
# Run Simulation:
|
||||
chdir("../../../build/simulator/");
|
||||
`./dramSys ../../DRAMSys/tests/simple/sim-batch.xml > ../../DRAMSys/tests/simple/output.txt`;
|
||||
`./DRAMSys ../../DRAMSys/tests/simple/sim-batch.xml > ../../DRAMSys/tests/simple/output.txt`;
|
||||
|
||||
chdir("../../DRAMSys/tests/simple");
|
||||
|
||||
|
||||
@@ -76,12 +76,12 @@ chdir("build/") || die("chdir");
|
||||
# Build the Project:
|
||||
my $starttime = time();
|
||||
print "\n", color($timestamp_color), timestamp(), color("reset"),"Build Project\t";
|
||||
`qmake ../DRAMSys/dram.vp.system.pro >/dev/null 2>&1`;
|
||||
`qmake ../DRAMSys/DRAMSys.pro >/dev/null 2>&1`;
|
||||
`make -j$numberOfCores > /dev/null 2>&1`;
|
||||
my $took = time() - $starttime;
|
||||
|
||||
# Check if Build was sucessful:
|
||||
if( -e "./simulator/dramSys" )
|
||||
if( -e "./simulator/DRAMSys" )
|
||||
{
|
||||
print color("reset"),"[ ", color("green"), "done", color("reset"), " ]\t", "(", $took, " seconds)\n";
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ foreach (@powerDownModes)
|
||||
system("sed -i.bu '" . $bankwiseLogicLine . "s^.*^ <BankwiseLogic value=\"0\"/>^' ../../DRAMSys/tests/timing_compliance/fifoStrict.xml");
|
||||
system("sed -i.bu '" . $powerDownModeLine . "s^.*^ <PowerDownMode value=\"$_\" />^' ../../DRAMSys/tests/timing_compliance/fifoStrict.xml");
|
||||
|
||||
`./dramSys ../../DRAMSys/tests/timing_compliance/sim-batch.xml`;
|
||||
`./DRAMSys ../../DRAMSys/tests/timing_compliance/sim-batch.xml`;
|
||||
|
||||
@files = `ls sim-batch/timing_compliance_test_fifoStrict_channel*.tdb`;
|
||||
chomp @files;
|
||||
@@ -76,7 +76,7 @@ foreach (@powerDownModes)
|
||||
system("sed -i.bu '" . $powerAnalysisLine . "s^.*^ <PowerAnalysis value=\"0\" />^' ../../DRAMSys/tests/timing_compliance/sim-batch.xml");
|
||||
system("sed -i.bu '" . $bankwiseLogicLine . "s^.*^ <BankwiseLogic value=\"1\"/>^' ../../DRAMSys/tests/timing_compliance/fifoStrict.xml");
|
||||
|
||||
`./dramSys ../../DRAMSys/tests/timing_compliance/sim-batch.xml`;
|
||||
`./DRAMSys ../../DRAMSys/tests/timing_compliance/sim-batch.xml`;
|
||||
|
||||
foreach (@files)
|
||||
{
|
||||
|
||||
@@ -147,7 +147,7 @@ $ qtcreator &
|
||||
|
||||
Use the menu bar and open the DRAMSys project.
|
||||
|
||||
**File -> Open Project -> dram.vp.system/DRAMSys/dram.vp.system.pro**
|
||||
**File -> Open Project -> dram.vp.system/DRAMSys/DRAMSys.pro**
|
||||
|
||||
When you open the project for the first time a configuration window pops-up.
|
||||
Then click in **Configure Project** and after that **Build** the project.
|
||||
@@ -173,7 +173,7 @@ use **qmake** to generate a Makefile and then compile the project.
|
||||
``` bash
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ qmake ../DRAMSys/dram.vp.system.pro
|
||||
$ qmake ../DRAMSys/DRAMSys.pro
|
||||
$ make
|
||||
```
|
||||
|
||||
@@ -301,7 +301,7 @@ has to be changed like [this](https://trac.macports.org/attachment/ticket/44288/
|
||||
|
||||
``` bash
|
||||
$ mkdir build
|
||||
$ qmake ../DRAMSys/dram.vp.system.pro
|
||||
$ qmake ../DRAMSys/DRAMSys.pro
|
||||
$ make -j<number_jobs>
|
||||
```
|
||||
|
||||
@@ -418,7 +418,7 @@ or
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ export THERMALSIM=true
|
||||
$ qmake ../DRAMSys/dram.vp.system.pro
|
||||
$ qmake ../DRAMSys/DRAMSys.pro
|
||||
$ make
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user