From ea70fb6de877d183735d82b81e3fe62831db93d1 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Tue, 21 Apr 2020 09:41:44 +0200 Subject: [PATCH 01/22] qmake to cmake. --- .gitlab-ci.yml | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 700ec923..718fd16c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,7 +19,7 @@ build: - rm -rf build - mkdir -p build - cd build - - qmake ../DRAMSys/DRAMSys.pro + - cmake ../DRAMSys - make -j4 - find . -name "*.o" -type f -delete - rm -rf ${CI_PROJECT_DIR}/coverage diff --git a/README.md b/README.md index bc1c6595..063b989d 100644 --- a/README.md +++ b/README.md @@ -1071,11 +1071,11 @@ running before starting. For more information about 3D-ICE visit the [official w #### Installing the lastest 3D-ICE version -[Download](http://esl.epfl.ch/3d-ice/download.html) the lastest version. Make sure you got version 2.2.6 or greater: +[Download](https://www.epfl.ch/labs/esl/open-source-software-projects/3d-ice/3d-ice-download/) 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 +$ wget https://www.epfl.ch/labs/esl/wp-content/uploads/2018/12/3d-ice-latest.zip +$ unzip 3d-ice-latest.zip ``` Install [SuperLU](http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_5.2.1.tar.gz) dependencies: From 410b5cfb0bb04cc620f6105bbcec628ed9796668 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Tue, 21 Apr 2020 09:49:47 +0200 Subject: [PATCH 02/22] Lower cmake3 version. --- .gitlab-ci.yml | 2 +- DRAMSys/CMakeLists.txt | 2 +- DRAMSys/library/CMakeLists.txt | 2 +- DRAMSys/traceAnalyzer/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 718fd16c..2c650e3d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,7 +19,7 @@ build: - rm -rf build - mkdir -p build - cd build - - cmake ../DRAMSys + - cmake3 ../DRAMSys - make -j4 - find . -name "*.o" -type f -delete - rm -rf ${CI_PROJECT_DIR}/coverage diff --git a/DRAMSys/CMakeLists.txt b/DRAMSys/CMakeLists.txt index 9ce35df7..6de513dd 100644 --- a/DRAMSys/CMakeLists.txt +++ b/DRAMSys/CMakeLists.txt @@ -30,7 +30,7 @@ # # Author: Matthias Jung -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.6) # Project Name: project(DRAMSys) diff --git a/DRAMSys/library/CMakeLists.txt b/DRAMSys/library/CMakeLists.txt index 0bfbbd1e..94f6bfb8 100644 --- a/DRAMSys/library/CMakeLists.txt +++ b/DRAMSys/library/CMakeLists.txt @@ -30,7 +30,7 @@ # # Author: Matthias Jung -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.6) # Project Name project(DRAMSysLibrary) diff --git a/DRAMSys/traceAnalyzer/CMakeLists.txt b/DRAMSys/traceAnalyzer/CMakeLists.txt index 3db02a3b..4a4eb37a 100644 --- a/DRAMSys/traceAnalyzer/CMakeLists.txt +++ b/DRAMSys/traceAnalyzer/CMakeLists.txt @@ -30,7 +30,7 @@ # # Author: Matthias Jung -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.6) # Project Name: project(TraceAnalyzer) From 6418d2c232ca2c31cc460588f5e9b5be969d241b Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Tue, 21 Apr 2020 17:36:28 +0200 Subject: [PATCH 03/22] Separate cmake file for simulator to use old paths. --- DRAMSys/CMakeLists.txt | 12 ++------ DRAMSys/library/CMakeLists.txt | 2 +- DRAMSys/simulator/CMakeLists.txt | 46 ++++++++++++++++++++++++++++ DRAMSys/simulator/main.cpp | 4 +-- DRAMSys/traceAnalyzer/CMakeLists.txt | 4 +-- 5 files changed, 54 insertions(+), 14 deletions(-) create mode 100644 DRAMSys/simulator/CMakeLists.txt diff --git a/DRAMSys/CMakeLists.txt b/DRAMSys/CMakeLists.txt index 6de513dd..48511ed2 100644 --- a/DRAMSys/CMakeLists.txt +++ b/DRAMSys/CMakeLists.txt @@ -30,7 +30,7 @@ # # Author: Matthias Jung -cmake_minimum_required(VERSION 3.6) +cmake_minimum_required(VERSION 3.10) # Project Name: project(DRAMSys) @@ -50,11 +50,5 @@ add_subdirectory(library) # Add TraceAnalyzer: add_subdirectory(traceAnalyzer) -# Build: -add_executable(DRAMSys simulator/main.cpp) -target_include_directories(DRAMSys - PUBLIC library/src/simulation/ - PUBLIC library/src/common/third_party/sqlite-amalgamation/ -) -target_link_libraries(DRAMSys sqlite3::sqlite3 systemc DRAMSysLibrary) - +# Add DRAMSysSimulator: +add_subdirectory(simulator) diff --git a/DRAMSys/library/CMakeLists.txt b/DRAMSys/library/CMakeLists.txt index 94f6bfb8..0bfbbd1e 100644 --- a/DRAMSys/library/CMakeLists.txt +++ b/DRAMSys/library/CMakeLists.txt @@ -30,7 +30,7 @@ # # Author: Matthias Jung -cmake_minimum_required(VERSION 3.6) +cmake_minimum_required(VERSION 3.10) # Project Name project(DRAMSysLibrary) diff --git a/DRAMSys/simulator/CMakeLists.txt b/DRAMSys/simulator/CMakeLists.txt new file mode 100644 index 00000000..abe50b28 --- /dev/null +++ b/DRAMSys/simulator/CMakeLists.txt @@ -0,0 +1,46 @@ +# Copyright (c) 2020, Fraunhofer IESE +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER +# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Author: Matthias Jung + +cmake_minimum_required(VERSION 3.10) + +# Project Name +project(DRAMSysSimulator) + +# Configuration: +set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ Version") +set(DCMAKE_SH="CMAKE_SH-NOTFOUND") + +add_executable(DRAMSys main.cpp) +target_include_directories(DRAMSys + PUBLIC ../library/src/simulation/ +) +target_link_libraries(DRAMSys systemc DRAMSysLibrary) diff --git a/DRAMSys/simulator/main.cpp b/DRAMSys/simulator/main.cpp index cf231c5f..93d5fd6d 100644 --- a/DRAMSys/simulator/main.cpp +++ b/DRAMSys/simulator/main.cpp @@ -66,14 +66,14 @@ int sc_main(int argc, char **argv) if (argc == 1) { // Get path of resources: resources = pathOfFile(argv[0]) - + std::string("/../DRAMSys/library/resources/"); + + std::string("/../../DRAMSys/library/resources/"); SimulationXML = resources + "simulations/ddr3-example.xml"; } // Run with specific config but default resource folders: else if (argc == 2) { // Get path of resources: resources = pathOfFile(argv[0]) - + std::string("/../DRAMSys/library/resources/"); + + std::string("/../../DRAMSys/library/resources/"); SimulationXML = argv[1]; } // Run with spefific config and specific resource folder: diff --git a/DRAMSys/traceAnalyzer/CMakeLists.txt b/DRAMSys/traceAnalyzer/CMakeLists.txt index 4a4eb37a..00b38a9a 100644 --- a/DRAMSys/traceAnalyzer/CMakeLists.txt +++ b/DRAMSys/traceAnalyzer/CMakeLists.txt @@ -30,7 +30,7 @@ # # Author: Matthias Jung -cmake_minimum_required(VERSION 3.6) +cmake_minimum_required(VERSION 3.10) # Project Name: project(TraceAnalyzer) @@ -59,7 +59,7 @@ set(CMAKE_AUTORCC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) # Configure: -set (CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 11) set(DCMAKE_SH="CMAKE_SH-NOTFOUND") include_directories( From 2420d213c7a199e512b4020ed11813f58ac76e69 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Wed, 22 Apr 2020 16:51:58 +0200 Subject: [PATCH 04/22] DRAMSys4.0 is building and running with gem5. --- DRAMSys/CMakeLists.txt | 3 + DRAMSys/gem5/CMakeLists.txt | 73 ++++++++ DRAMSys/gem5/gem5.pro | 167 ------------------ DRAMSys/gem5/main.cpp | 1 + .../configs/amconfigs/congen_extended.xml | 28 ++- .../resources/simulations/ddr3-example.xml | 2 +- .../resources/simulations/ddr3-gem5-se.xml | 4 +- DRAMSys/library/src/controller/Controller.cpp | 5 +- 8 files changed, 95 insertions(+), 188 deletions(-) create mode 100644 DRAMSys/gem5/CMakeLists.txt delete mode 100644 DRAMSys/gem5/gem5.pro diff --git a/DRAMSys/CMakeLists.txt b/DRAMSys/CMakeLists.txt index 48511ed2..d0180170 100644 --- a/DRAMSys/CMakeLists.txt +++ b/DRAMSys/CMakeLists.txt @@ -52,3 +52,6 @@ add_subdirectory(traceAnalyzer) # Add DRAMSysSimulator: add_subdirectory(simulator) + +# Add DRAMSysgem5 +add_subdirectory(gem5) diff --git a/DRAMSys/gem5/CMakeLists.txt b/DRAMSys/gem5/CMakeLists.txt new file mode 100644 index 00000000..f854c2c1 --- /dev/null +++ b/DRAMSys/gem5/CMakeLists.txt @@ -0,0 +1,73 @@ +# Copyright (c) 2020, Technische Universität Kaiserslautern +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER +# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Author: Lukas Steiner + +cmake_minimum_required(VERSION 3.10) + +# Project Name +project(DRAMSysGem5) + +# Configuration: +set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ Version") +set(DCMAKE_SH="CMAKE_SH-NOTFOUND") + +include_directories( + $ENV{GEM5}/build/ARM/ + $ENV{GEM5}/util/tlm/examples/slave_port + $ENV{GEM5}/util/tlm/examples/common + $ENV{GEM5}/util/tlm/src/ + $ENV{GEM5}/util/systemc +) + +link_directories( + $ENV{GEM5}/build/ARM/ +) + +add_executable(DRAMSysGem5 + main.cpp + $ENV{GEM5}/util/systemc/sc_gem5_control.cc + $ENV{GEM5}/util/systemc/sc_logger.cc + $ENV{GEM5}/util/systemc/sc_module.cc + $ENV{GEM5}/util/systemc/stats.cc + $ENV{GEM5}/util/tlm/examples/common/cli_parser.cc + $ENV{GEM5}/util/tlm/examples/common/report_handler.cc + $ENV{GEM5}/util/tlm/src/master_transactor.cc + $ENV{GEM5}/util/tlm/src/sc_master_port.cc + $ENV{GEM5}/util/tlm/src/sc_slave_port.cc + $ENV{GEM5}/util/tlm/src/slave_transactor.cc + $ENV{GEM5}/util/tlm/src/sc_ext.cc + $ENV{GEM5}/util/tlm/src/sc_mm.cc + $ENV{GEM5}/util/tlm/src/sim_control.cc +) +target_include_directories(DRAMSysGem5 + PUBLIC ../library/src/simulation/ +) +target_link_libraries(DRAMSysGem5 systemc DRAMSysLibrary gem5_opt) \ No newline at end of file diff --git a/DRAMSys/gem5/gem5.pro b/DRAMSys/gem5/gem5.pro deleted file mode 100644 index 031a3e86..00000000 --- a/DRAMSys/gem5/gem5.pro +++ /dev/null @@ -1,167 +0,0 @@ -TARGET = DRAMSys_gem5 -TEMPLATE = app -CONFIG += console -CONFIG -= app_bundle -CONFIG -= qt - -# gem5 parameters: -gem5_arch = 'ARM' -gem5_variant = 'opt' -gem5_root = $$(GEM5) - -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}) - -unix:!macx { - message(Building on a GNU/Linux) - QMAKE_RPATHDIR += $${systemc_home}/lib-$${systemc_target_arch} - QMAKE_RPATHDIR += $${gem5_root}/build/$${gem5_arch} - message(Linker options QMAKE_RPATHDIR is $${QMAKE_RPATHDIR}) -} - -DEFINES += TIXML_USE_STL -DEFINES += SC_INCLUDE_DYNAMIC_PROCESSES -DEFINES += DRAMSYS_GEM5 - -dramsys_disable_coverage_check = $$(DRAMSYS_DISABLE_COVERAGE_CHECK) -isEmpty(dramsys_disable_coverage_check) { - coverage_check = true - message(Coverage check ENABLED) -} else { - coverage_check = false - message(Coverage check DISABLED) -} - -unix:!macx { - QMAKE_CXXFLAGS += -std=c++11 -O0 -g - $$eval(coverage_check) { - QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage -fPIC -O0 - QMAKE_LFLAGS += -lgcov --coverage - } -} - -macx: { - CONFIG += c++11 - QMAKE_CXXFLAGS += -std=c++0x -stdlib=libc++ -O0 -g - $$eval(coverage_check) { - QMAKE_CXXFLAGS += --coverage - QMAKE_LFLAGS += --coverage - } -} - -INCLUDEPATH += ../library/src/simulation/ -INCLUDEPATH += $${systemc_home}/include -INCLUDEPATH += ../library/src/common/third_party/DRAMPower/src -INCLUDEPATH += ../library/src/common/third_party/DRAMPower/src/libdrampower -INCLUDEPATH += $${gem5_root}/build/$${gem5_arch}/ -INCLUDEPATH += $${gem5_root}/util/tlm/examples/slave_port -INCLUDEPATH += $${gem5_root}/util/tlm/examples/common -INCLUDEPATH += $${gem5_root}/util/tlm/src/ -INCLUDEPATH += $${gem5_root}/util/systemc - -LIBS += -L$${systemc_home}/lib-$${systemc_target_arch} -lsystemc -LIBS += ../library/libDRAMSys.a -LIBS += ../../DRAMSys/library/src/common/third_party/DRAMPower/src/libdrampower.a -LIBS += -lsqlite3 -LIBS += -L$${gem5_root}/build/$${gem5_arch} -lgem5_$${gem5_variant} - -SOURCES += $${gem5_root}/util/systemc/sc_gem5_control.cc -SOURCES += $${gem5_root}/util/systemc/sc_logger.cc -SOURCES += $${gem5_root}/util/systemc/sc_module.cc -SOURCES += $${gem5_root}/util/systemc/stats.cc -SOURCES += $${gem5_root}/util/tlm/examples/common/cli_parser.cc -SOURCES += $${gem5_root}/util/tlm/examples/common/report_handler.cc -SOURCES += $${gem5_root}/util/tlm/src/master_transactor.cc -SOURCES += $${gem5_root}/util/tlm/src/sc_master_port.cc -SOURCES += $${gem5_root}/util/tlm/src/sc_slave_port.cc -SOURCES += $${gem5_root}/util/tlm/src/slave_transactor.cc -SOURCES += $${gem5_root}/util/tlm/src/sc_ext.cc -SOURCES += $${gem5_root}/util/tlm/src/sc_mm.cc -SOURCES += $${gem5_root}/util/tlm/src/sim_control.cc - -SOURCES += main.cpp - -DISTFILES += ../DRAMSys.astylerc - -DISTFILES += etrace_single/config.ini -DISTFILES += etrace_single_L2/HPCG-47MB/config.ini -DISTFILES += etrace_single_L2/Pathfinder/config.ini -DISTFILES += etrace_single_L2/hpcc-linpack/config.ini -DISTFILES += etrace_single_L2/hpcc-fft/config.ini -DISTFILES += etrace_single_L2/config.ini -DISTFILES += etrace_single_L2/hpcc-dgemm/config.ini -DISTFILES += etrace_single_L2/hpcc-gups/config.ini -DISTFILES += configs/singleElasticTraceReplayWithL2.ini -DISTFILES += configs/nvdimmp.ini -DISTFILES += configs/hello.ini -DISTFILES += configs/dualElasticTraceReplay.ini -DISTFILES += configs/singleElasticTraceReplay.ini -DISTFILES += configs/boot_linux.ini -DISTFILES += gem5_fs/stream/config.ini -DISTFILES += gem5_fs/stream/stream_1_cores.rcS -DISTFILES += gem5_fs/parsec/simmedium/fluidanimate/fluidanimate_simmedium_2.rcS -DISTFILES += gem5_fs/parsec/simmedium/fluidanimate/config.ini -DISTFILES += gem5_fs/parsec/simmedium/ferret/config.ini -DISTFILES += gem5_fs/parsec/simmedium/ferret/ferret_simmedium_2.rcS -DISTFILES += gem5_fs/parsec/simmedium/blackscholes/blackscholes_simmedium_2.rcS -DISTFILES += gem5_fs/parsec/simmedium/blackscholes/config.ini -DISTFILES += gem5_fs/parsec/simlarge/streamcluster/config.ini -DISTFILES += gem5_fs/parsec/simlarge/streamcluster/streamcluster_simlarge_2.rcS -DISTFILES += gem5_fs/parsec/simsmall/fluidanimate/fluidanimate_simsmall_2.rcS -DISTFILES += gem5_fs/parsec/simsmall/fluidanimate/config.ini -DISTFILES += gem5_fs/parsec/simsmall/bodytrack/bodytrack_simsmall_2.rcS -DISTFILES += gem5_fs/parsec/simsmall/bodytrack/config.ini -DISTFILES += gem5_fs/parsec/simsmall/ferret/config.ini -DISTFILES += gem5_fs/parsec/simsmall/ferret/ferret_simsmall_2.rcS -DISTFILES += gem5_fs/parsec/simsmall/blackscholes/config.ini -DISTFILES += gem5_fs/parsec/simsmall/blackscholes/blackscholes_simsmall_2.rcS -DISTFILES += gem5_fs/parsec/simdev/fluidanimate/config.ini -DISTFILES += gem5_fs/parsec/simdev/fluidanimate/fluidanimate_simdev_2.rcS -DISTFILES += gem5_fs/parsec/simdev/blackscholes/blackscholes_simdev_2.rcS -DISTFILES += gem5_fs/parsec/simdev/blackscholes/config.ini -DISTFILES += examples/tlm_elastic_slave.py -DISTFILES += examples/tlm_elastic_slave_mc_direct.py -DISTFILES += examples/tlm_elastic_slave_with_l2.py -DISTFILES += gem5_se/almabench/config.ini -DISTFILES += gem5_se/fldry/config.ini -DISTFILES += gem5_se/Queens/config.ini -DISTFILES += gem5_se/chomp/config.ini -DISTFILES += gem5_se/l1_cache/Queens/config.ini -DISTFILES += gem5_se/l1_cache/chomp/config.ini -DISTFILES += gem5_se/l1_cache/Puzzle/config.ini -DISTFILES += gem5_se/l1_cache/RealMM/config.ini -DISTFILES += gem5_se/l1_cache/Perm/config.ini -DISTFILES += gem5_se/l1_cache/Treesort/config.ini -DISTFILES += gem5_se/l1_cache/Bubblesort/config.ini -DISTFILES += gem5_se/l1_cache/misr/config.ini -DISTFILES += gem5_se/l1_cache/exptree/config.ini -DISTFILES += gem5_se/l1_cache/Quicksort/config.ini -DISTFILES += gem5_se/l1_cache/IntMM/config.ini -DISTFILES += gem5_se/l1_cache/Oscar/config.ini -DISTFILES += gem5_se/l1_cache/FloatMM/config.ini -DISTFILES += gem5_se/l1_cache/Towers/config.ini -DISTFILES += gem5_se/run.sh -DISTFILES += gem5_se/Puzzle/config.ini -DISTFILES += gem5_se/RealMM/config.ini -DISTFILES += gem5_se/Perm/config.ini -DISTFILES += gem5_se/Treesort/config.ini -DISTFILES += gem5_se/Bubblesort/config.ini -DISTFILES += gem5_se/misr/config.ini -DISTFILES += gem5_se/lpbench/config.ini -DISTFILES += gem5_se/8_cores/config.ini -DISTFILES += gem5_se/exptree/config.ini -DISTFILES += gem5_se/Quicksort/config.ini -DISTFILES += gem5_se/IntMM/config.ini -DISTFILES += gem5_se/Oscar/config.ini -DISTFILES += gem5_se/FloatMM/config.ini -DISTFILES += gem5_se/Towers/config.ini diff --git a/DRAMSys/gem5/main.cpp b/DRAMSys/gem5/main.cpp index 80a5b82a..fd521ef3 100644 --- a/DRAMSys/gem5/main.cpp +++ b/DRAMSys/gem5/main.cpp @@ -51,6 +51,7 @@ #include "stats.hh" using namespace std; +using namespace tlm; class Gem5SimControlDRAMsys: public Gem5SystemC::Gem5SimControl { diff --git a/DRAMSys/library/resources/configs/amconfigs/congen_extended.xml b/DRAMSys/library/resources/configs/amconfigs/congen_extended.xml index 42617f4a..a1a0204a 100644 --- a/DRAMSys/library/resources/configs/amconfigs/congen_extended.xml +++ b/DRAMSys/library/resources/configs/amconfigs/congen_extended.xml @@ -1,24 +1,22 @@ - - - 0 + 0 1 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 14 15 - 16 + 16 17 18 19 diff --git a/DRAMSys/library/resources/simulations/ddr3-example.xml b/DRAMSys/library/resources/simulations/ddr3-example.xml index 2c948758..7434a66c 100644 --- a/DRAMSys/library/resources/simulations/ddr3-example.xml +++ b/DRAMSys/library/resources/simulations/ddr3-example.xml @@ -8,7 +8,7 @@ - + - + - + - - - - - - - - - + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + + \ No newline at end of file diff --git a/DRAMSys/tests/DDR3/configs/mcconfigs/fifoStrict.xml b/DRAMSys/tests/DDR3/configs/mcconfigs/fifoStrict.xml index ed869b57..44bf294e 100644 --- a/DRAMSys/tests/DDR3/configs/mcconfigs/fifoStrict.xml +++ b/DRAMSys/tests/DDR3/configs/mcconfigs/fifoStrict.xml @@ -1,50 +1,20 @@ - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/DRAMSys/tests/DDR3/configs/mcconfigs/fr_fcfs.xml b/DRAMSys/tests/DDR3/configs/mcconfigs/fr_fcfs.xml index 20db08cd..7240485d 100644 --- a/DRAMSys/tests/DDR3/configs/mcconfigs/fr_fcfs.xml +++ b/DRAMSys/tests/DDR3/configs/mcconfigs/fr_fcfs.xml @@ -1,50 +1,20 @@ - - + + + - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 9f12c525efc57f93aa9247e8c0eb5aff5f6d1a66 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Mon, 27 Apr 2020 16:34:29 +0200 Subject: [PATCH 11/22] Updated sql script in test folder. --- DRAMSys/tests/DDR3/scripts/createTraceDB.sql | 23 ++++++++++++++++++- .../tests/WIDEIO/scripts/createTraceDB.sql | 23 ++++++++++++++++++- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/DRAMSys/tests/DDR3/scripts/createTraceDB.sql b/DRAMSys/tests/DDR3/scripts/createTraceDB.sql index 1ba6c3aa..7a127fac 100644 --- a/DRAMSys/tests/DDR3/scripts/createTraceDB.sql +++ b/DRAMSys/tests/DDR3/scripts/createTraceDB.sql @@ -1,5 +1,6 @@ DROP TABLE IF EXISTS Phases; DROP TABLE IF EXISTS GeneralInfo; +DROP TABLE IF EXISTS CommandLengths; DROP TABLE IF EXISTS Comments; DROP TABLE IF EXISTS ranges; DROP TABLE IF EXISTS Transactions; @@ -17,6 +18,7 @@ CREATE TABLE Phases( CREATE TABLE GeneralInfo( NumberOfTransactions INTEGER, TraceEnd INTEGER, + NumberOfRanks INTEGER, NumberOfBanks INTEGER, clk INTEGER, UnitOfTime TEXT, @@ -29,6 +31,24 @@ CREATE TABLE GeneralInfo( ControllerThread INTEGER ); +CREATE TABLE CommandLengths( + ACT INTEGER, + PRE INTEGER, + PREA INTEGER, + RD INTEGER, + RDA INTEGER, + WR INTEGER, + WRA INTEGER, + REFA INTEGER, + REFB INTEGER, + PDEA INTEGER, + PDXA INTEGER, + PDEP INTEGER, + PDXP INTEGER, + SREFEN INTEGER, + SREFEX INTEGER +); + CREATE TABLE Power( time DOUBLE, AveragePower DOUBLE @@ -58,8 +78,9 @@ CREATE TABLE Transactions( Burstlength INTEGER, TThread INTEGER, TChannel INTEGER, - TBank INTEGER, + TRank INTEGER, TBankgroup INTEGER, + TBank INTEGER, TRow INTEGER, TColumn INTEGER, DataStrobeBegin INTEGER, diff --git a/DRAMSys/tests/WIDEIO/scripts/createTraceDB.sql b/DRAMSys/tests/WIDEIO/scripts/createTraceDB.sql index 1ba6c3aa..7a127fac 100644 --- a/DRAMSys/tests/WIDEIO/scripts/createTraceDB.sql +++ b/DRAMSys/tests/WIDEIO/scripts/createTraceDB.sql @@ -1,5 +1,6 @@ DROP TABLE IF EXISTS Phases; DROP TABLE IF EXISTS GeneralInfo; +DROP TABLE IF EXISTS CommandLengths; DROP TABLE IF EXISTS Comments; DROP TABLE IF EXISTS ranges; DROP TABLE IF EXISTS Transactions; @@ -17,6 +18,7 @@ CREATE TABLE Phases( CREATE TABLE GeneralInfo( NumberOfTransactions INTEGER, TraceEnd INTEGER, + NumberOfRanks INTEGER, NumberOfBanks INTEGER, clk INTEGER, UnitOfTime TEXT, @@ -29,6 +31,24 @@ CREATE TABLE GeneralInfo( ControllerThread INTEGER ); +CREATE TABLE CommandLengths( + ACT INTEGER, + PRE INTEGER, + PREA INTEGER, + RD INTEGER, + RDA INTEGER, + WR INTEGER, + WRA INTEGER, + REFA INTEGER, + REFB INTEGER, + PDEA INTEGER, + PDXA INTEGER, + PDEP INTEGER, + PDXP INTEGER, + SREFEN INTEGER, + SREFEX INTEGER +); + CREATE TABLE Power( time DOUBLE, AveragePower DOUBLE @@ -58,8 +78,9 @@ CREATE TABLE Transactions( Burstlength INTEGER, TThread INTEGER, TChannel INTEGER, - TBank INTEGER, + TRank INTEGER, TBankgroup INTEGER, + TBank INTEGER, TRow INTEGER, TColumn INTEGER, DataStrobeBegin INTEGER, From 6db1b75dd97c7044b66ab3ef0c92a636874e5ce9 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Mon, 27 Apr 2020 17:28:05 +0200 Subject: [PATCH 12/22] Renaming of explicit content. --- DRAMSys/traceAnalyzer/CMakeLists.txt | 2 +- DRAMSys/traceAnalyzer/mainwindow.cpp | 2 +- ...rnotracescroller.cpp => tracescroller.cpp} | 34 +++++++++---------- .../{pornotracescroller.h => tracescroller.h} | 10 +++--- DRAMSys/traceAnalyzer/tracefiletab.cpp | 4 +-- DRAMSys/traceAnalyzer/tracefiletab.h | 2 +- DRAMSys/traceAnalyzer/tracefiletab.ui | 6 ++-- 7 files changed, 30 insertions(+), 30 deletions(-) rename DRAMSys/traceAnalyzer/presentation/{pornotracescroller.cpp => tracescroller.cpp} (91%) rename DRAMSys/traceAnalyzer/presentation/{pornotracescroller.h => tracescroller.h} (93%) diff --git a/DRAMSys/traceAnalyzer/CMakeLists.txt b/DRAMSys/traceAnalyzer/CMakeLists.txt index ef03cc71..37da1e4a 100644 --- a/DRAMSys/traceAnalyzer/CMakeLists.txt +++ b/DRAMSys/traceAnalyzer/CMakeLists.txt @@ -84,7 +84,7 @@ add_executable(TraceAnalyzer gototimedialog.cpp presentation/traceplot.cpp tracefiletab.cpp - presentation/pornotracescroller.cpp + presentation/tracescroller.cpp traceanalyzer.cpp presentation/transactiontreewidget.cpp presentation/commenttreewidget.cpp diff --git a/DRAMSys/traceAnalyzer/mainwindow.cpp b/DRAMSys/traceAnalyzer/mainwindow.cpp index 9bdc2565..0e911285 100644 --- a/DRAMSys/traceAnalyzer/mainwindow.cpp +++ b/DRAMSys/traceAnalyzer/mainwindow.cpp @@ -52,7 +52,7 @@ MainWindow::MainWindow(QWidget *parent) : db = new TraceDB("tpr.tdb", true); traceNavigator = new TraceNavigator(db->getGeneralInfo(), this); ui->tracePlot->init(traceNavigator, db); - ui->pornoTraceScroller->init(traceNavigator, db, ui->tracePlot); + ui->traceScroller->init(traceNavigator, db, ui->tracePlot); phases = db->getPhasesInTimespan( traceNavigator->GeneralTraceInfo().TraceSpan()); transactions = db->getTransactionsInTimespan( diff --git a/DRAMSys/traceAnalyzer/presentation/pornotracescroller.cpp b/DRAMSys/traceAnalyzer/presentation/tracescroller.cpp similarity index 91% rename from DRAMSys/traceAnalyzer/presentation/pornotracescroller.cpp rename to DRAMSys/traceAnalyzer/presentation/tracescroller.cpp index 8b66efd2..64506edf 100644 --- a/DRAMSys/traceAnalyzer/presentation/pornotracescroller.cpp +++ b/DRAMSys/traceAnalyzer/presentation/tracescroller.cpp @@ -38,11 +38,11 @@ #include #include #include -#include "pornotracescroller.h" +#include "tracescroller.h" #include "traceplotitem.h" #include "util/engineeringScaleDraw.h" -PornoTraceScroller::PornoTraceScroller(QWidget *parent): +TraceScroller::TraceScroller(QWidget *parent): QwtPlot(parent), isInitialized(false), drawingProperties(false, false, ColorGrouping::PhaseType) { @@ -53,7 +53,7 @@ PornoTraceScroller::PornoTraceScroller(QWidget *parent): canvasClip->attach(this); } -void PornoTraceScroller::init(TraceNavigator *navigator, TracePlot *tracePlot) +void TraceScroller::init(TraceNavigator *navigator, TracePlot *tracePlot) { Q_ASSERT(isInitialized == false); isInitialized = true; @@ -76,7 +76,7 @@ void PornoTraceScroller::init(TraceNavigator *navigator, TracePlot *tracePlot) } -void PornoTraceScroller::setUpTracePlotItem() +void TraceScroller::setUpTracePlotItem() { TracePlotItem *tracePlotItem = new TracePlotItem(transactions, *navigator, drawingProperties); @@ -84,7 +84,7 @@ void PornoTraceScroller::setUpTracePlotItem() tracePlotItem->attach(this); } -void PornoTraceScroller::setUpDrawingProperties() +void TraceScroller::setUpDrawingProperties() { drawingProperties.numberOfRanks = navigator->GeneralTraceInfo().numberOfRanks; drawingProperties.numberOfBanks = navigator->GeneralTraceInfo().numberOfBanks; @@ -96,14 +96,14 @@ void PornoTraceScroller::setUpDrawingProperties() } -void PornoTraceScroller::setUpAxis() +void TraceScroller::setUpAxis() { setAxisScale(yLeft, -1, navigator->GeneralTraceInfo().numberOfBanks + 2, 1.0); axisScaleDraw(yLeft)->enableComponent(QwtAbstractScaleDraw::Labels, false ); axisScaleDraw(yLeft)->enableComponent(QwtAbstractScaleDraw::Ticks, false ); } -void PornoTraceScroller::connectNavigatorQ_SIGNALS() +void TraceScroller::connectNavigatorQ_SIGNALS() { QObject::connect(navigator, SIGNAL(currentTraceTimeChanged()), this, SLOT(currentTraceTimeChanged())); @@ -113,15 +113,15 @@ void PornoTraceScroller::connectNavigatorQ_SIGNALS() SLOT(selectedTransactionsChanged())); } -Timespan PornoTraceScroller::GetCurrentTimespan() +Timespan TraceScroller::GetCurrentTimespan() { traceTime deltaOnTracePlot = navigator->GeneralTraceInfo().span.End() - tracePlot->ZoomLevel(); - traceTime deltaOnPornoTraceScroller = navigator->GeneralTraceInfo().span.End() - + traceTime deltaOnTraceScroller = navigator->GeneralTraceInfo().span.End() - zoomLevel; traceTime newBegin = static_cast - (tracePlot->GetCurrentTimespan().Begin() * (1.0 * deltaOnPornoTraceScroller) / + (tracePlot->GetCurrentTimespan().Begin() * (1.0 * deltaOnTraceScroller) / deltaOnTracePlot); Timespan span(newBegin, newBegin + zoomLevel); @@ -133,7 +133,7 @@ Timespan PornoTraceScroller::GetCurrentTimespan() } -void PornoTraceScroller::getAndDrawComments() +void TraceScroller::getAndDrawComments() { for (const auto &pair : navigator->getComments()) { const Comment &comment = pair.second; @@ -151,18 +151,18 @@ void PornoTraceScroller::getAndDrawComments() * */ -void PornoTraceScroller::selectedTransactionsChanged() +void TraceScroller::selectedTransactionsChanged() { replot(); } -void PornoTraceScroller::colorGroupingChanged(ColorGrouping colorGrouping) +void TraceScroller::colorGroupingChanged(ColorGrouping colorGrouping) { drawingProperties.colorGrouping = colorGrouping; replot(); } -void PornoTraceScroller::currentTraceTimeChanged() +void TraceScroller::currentTraceTimeChanged() { Timespan spanOnTracePlot = tracePlot->GetCurrentTimespan(); canvasClip->setInterval(spanOnTracePlot.Begin(), spanOnTracePlot.End()); @@ -172,21 +172,21 @@ void PornoTraceScroller::currentTraceTimeChanged() replot(); } -void PornoTraceScroller::commentsChanged() +void TraceScroller::commentsChanged() { detachItems(QwtPlotItem::Rtti_PlotMarker); getAndDrawComments(); replot(); } -void PornoTraceScroller::tracePlotZoomChanged() +void TraceScroller::tracePlotZoomChanged() { zoomLevel = tracePlot->ZoomLevel() * tracePlotEnlargementFactor; if (zoomLevel > navigator->GeneralTraceInfo().span.timeCovered()) zoomLevel = navigator->GeneralTraceInfo().span.timeCovered(); } -bool PornoTraceScroller::eventFilter( QObject *object, QEvent *event ) +bool TraceScroller::eventFilter( QObject *object, QEvent *event ) { if (object == canvas()) { static bool clipDragged = false; diff --git a/DRAMSys/traceAnalyzer/presentation/pornotracescroller.h b/DRAMSys/traceAnalyzer/presentation/tracescroller.h similarity index 93% rename from DRAMSys/traceAnalyzer/presentation/pornotracescroller.h rename to DRAMSys/traceAnalyzer/presentation/tracescroller.h index 98f5a97b..b9166f2e 100644 --- a/DRAMSys/traceAnalyzer/presentation/pornotracescroller.h +++ b/DRAMSys/traceAnalyzer/presentation/tracescroller.h @@ -35,8 +35,8 @@ * Matthias Jung */ -#ifndef PORNOTRACESCROLLER_H -#define PORNOTRACESCROLLER_H +#ifndef TRACESCROLLER_H +#define TRACESCROLLER_H #include #include @@ -45,7 +45,7 @@ #include "traceplot.h" -class PornoTraceScroller : public QwtPlot +class TraceScroller : public QwtPlot { Q_OBJECT private: @@ -67,7 +67,7 @@ private: TraceDrawingProperties drawingProperties; public: - PornoTraceScroller(QWidget *parent = NULL); + TraceScroller(QWidget *parent = NULL); void init(TraceNavigator *navigator, TracePlot *tracePlot); Timespan GetCurrentTimespan(); @@ -80,4 +80,4 @@ public Q_SLOTS: }; -#endif // PORNOTRACESCROLLER_H +#endif // TraceScroller_H diff --git a/DRAMSys/traceAnalyzer/tracefiletab.cpp b/DRAMSys/traceAnalyzer/tracefiletab.cpp index bf0ff6ef..a0d638f5 100644 --- a/DRAMSys/traceAnalyzer/tracefiletab.cpp +++ b/DRAMSys/traceAnalyzer/tracefiletab.cpp @@ -75,9 +75,9 @@ void TraceFileTab::initNavigatorAndItsDependentWidgets(QString path) ui->traceplot->init(navigator); - ui->pornoTraceScroller->init(navigator, ui->traceplot); + ui->traceScroller->init(navigator, ui->traceplot); connect(this, SIGNAL(colorGroupingChanged(ColorGrouping)), - ui->pornoTraceScroller, SLOT(colorGroupingChanged(ColorGrouping))); + ui->traceScroller, SLOT(colorGroupingChanged(ColorGrouping))); ui->selectedTransactionTree->init(navigator); //ui->debugMessages->init(navigator,ui->traceplot); diff --git a/DRAMSys/traceAnalyzer/tracefiletab.h b/DRAMSys/traceAnalyzer/tracefiletab.h index 3bef247c..5629a6c5 100644 --- a/DRAMSys/traceAnalyzer/tracefiletab.h +++ b/DRAMSys/traceAnalyzer/tracefiletab.h @@ -43,7 +43,7 @@ #include #include "presentation/tracenavigator.h" #include "presentation/traceplot.h" -#include "presentation/pornotracescroller.h" +#include "presentation/tracescroller.h" namespace Ui { class TraceFileTab; diff --git a/DRAMSys/traceAnalyzer/tracefiletab.ui b/DRAMSys/traceAnalyzer/tracefiletab.ui index e3d18d6f..d6951f1b 100644 --- a/DRAMSys/traceAnalyzer/tracefiletab.ui +++ b/DRAMSys/traceAnalyzer/tracefiletab.ui @@ -38,7 +38,7 @@ - + 4 @@ -162,9 +162,9 @@
presentation/traceplot.h
- PornoTraceScroller + TraceScroller QListView -
presentation/pornotracescroller.h
+
presentation/tracescroller.h
CommentTreeWidget From f8b4e5b43200489223e4fadbb2f5ec23af7d111a Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Wed, 29 Apr 2020 11:45:17 +0200 Subject: [PATCH 13/22] Fixed tbb linking error. --- DRAMSys/pct/createPlatform.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DRAMSys/pct/createPlatform.tcl b/DRAMSys/pct/createPlatform.tcl index 8796e97c..ead365f8 100644 --- a/DRAMSys/pct/createPlatform.tcl +++ b/DRAMSys/pct/createPlatform.tcl @@ -48,7 +48,7 @@ # Add DRAMSys Library // ../[glob -type d ../../build*]/simulator/ ::pct::set_simulation_build_project_setting Debug Libraries "sqlite3 DRAMSysLibrary DRAMPower" -::pct::set_simulation_build_project_setting Debug {Library Search Paths} [concat ../../../build/ /usr/lib64/ ../../../build/src/common/third_party/DRAMPower] +::pct::set_simulation_build_project_setting Debug {Library Search Paths} [concat ../../../build/ ../../../build/src/common/third_party/DRAMPower] ::pct::set_simulation_build_project_setting Debug {Defined Symbols} SC_INCLUDE_DYNAMIC_PROCESSES=1 ::pct::set_simulation_build_project_setting Debug {Compiler Flags} {-std=c++11} From eb265f4bdd18581a20e580bca5ba1ce8d3e45f54 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Thu, 30 Apr 2020 11:30:47 +0200 Subject: [PATCH 14/22] Removed arbiter's send methods to implement early completion. --- DRAMSys/library/src/controller/Controller.cpp | 4 +- DRAMSys/library/src/simulation/Arbiter.cpp | 89 ++++++++++--------- DRAMSys/library/src/simulation/Arbiter.h | 8 +- 3 files changed, 51 insertions(+), 50 deletions(-) diff --git a/DRAMSys/library/src/controller/Controller.cpp b/DRAMSys/library/src/controller/Controller.cpp index 8a80ca9d..dfaf36fc 100644 --- a/DRAMSys/library/src/controller/Controller.cpp +++ b/DRAMSys/library/src/controller/Controller.cpp @@ -333,18 +333,16 @@ void Controller::controllerMethod() tlm_sync_enum Controller::nb_transport_fw(tlm_generic_payload &trans, tlm_phase &phase, sc_time &delay) { - sc_time notificationDelay = delay; + sc_time notificationDelay = delay + Configuration::getInstance().memSpec->tCK; if (phase == BEGIN_REQ) { - notificationDelay += Configuration::getInstance().memSpec->tCK; payloadToAcquire = &trans; timeToAcquire = sc_time_stamp() + notificationDelay; beginReqEvent.notify(notificationDelay); } else if (phase = END_RESP) { - notificationDelay += Configuration::getInstance().memSpec->tCK; timeToRelease = sc_time_stamp() + notificationDelay; endRespEvent.notify(notificationDelay); } diff --git a/DRAMSys/library/src/simulation/Arbiter.cpp b/DRAMSys/library/src/simulation/Arbiter.cpp index 73810df7..01234602 100644 --- a/DRAMSys/library/src/simulation/Arbiter.cpp +++ b/DRAMSys/library/src/simulation/Arbiter.cpp @@ -76,6 +76,7 @@ tlm_sync_enum Arbiter::nb_transport_fw(int id, tlm_generic_payload &payload, if (phase == BEGIN_REQ) { + // TODO: do not adjust address permanently // adjust address offset: payload.set_address(payload.get_address() - Configuration::getInstance().addressOffset); @@ -103,8 +104,7 @@ tlm_sync_enum Arbiter::nb_transport_bw(int channelId, tlm_generic_payload &paylo tlm_phase &phase, sc_time &bwDelay) { // Check channel ID - if ((unsigned int)channelId != DramExtension::getExtension(payload).getChannel().ID()) - SC_REPORT_FATAL("Arbiter", "Payload extension was corrupted"); + assert((unsigned int)channelId == DramExtension::getExtension(payload).getChannel().ID()); PRINTDEBUGMESSAGE(name(), "[bw] " + phaseNameToString(phase) + " notification in " + bwDelay.to_string()); @@ -124,39 +124,51 @@ unsigned int Arbiter::transport_dbg(int /*id*/, tlm::tlm_generic_payload &trans) void Arbiter::peqCallback(tlm_generic_payload &payload, const tlm_phase &phase) { - unsigned int initiatorSocket = DramExtension::getExtension( - payload).getThread().ID(); + unsigned int threadId = DramExtension::getExtension(payload).getThread().ID(); unsigned int channelId = DramExtension::getExtension(payload).getChannel().ID(); - // Check the valid range of initiatorSocket ID and channel Id - // TODO: initiatorSocket ID not checked + // Check the valid range of thread ID and channel Id + // TODO: thread ID not checked assert(channelId < Configuration::getInstance().numberOfMemChannels); // Phases initiated by the intiator side from arbiter's point of view (devices performing memory requests to the arbiter) if (phase == BEGIN_REQ) { - if (channelIsFree[channelId]) { + if (channelIsFree[channelId]) + { // This channel was available. Forward the new transaction to the memory controller. channelIsFree[channelId] = false; - sendToChannel(channelId, payload, phase, SC_ZERO_TIME); - } else { + tlm_phase tPhase = phase; + sc_time tDelay = SC_ZERO_TIME; + iSocket[channelId]->nb_transport_fw(payload, tPhase, tDelay); + // TODO: early completion of channel controller!!! + } + else + { // This channel is busy. Enqueue the new transaction which phase is BEGIN_REQ. pendingRequests[channelId].push(&payload); } } // Phases initiated by the target side from arbiter's point of view (memory side) - else if (phase == END_REQ) { + else if (phase == END_REQ) + { channelIsFree[channelId] = true; // The arbiter receives a transaction which phase is END_REQ from memory controller and forwards it to the requester device. - sendToInitiator(initiatorSocket, payload, phase, SC_ZERO_TIME); + tlm_phase tPhase = phase; + sc_time tDelay = SC_ZERO_TIME; + tSocket[threadId]->nb_transport_bw(payload, tPhase, tDelay); // This channel is now free! Dispatch a new transaction (phase is BEGIN_REQ) from the queue, if any. Send it to the memory controller. - if (!pendingRequests[channelId].empty()) { - tlm_generic_payload *payloadToSend = pendingRequests[channelId].front(); - pendingRequests[channelId].pop(); + if (!pendingRequests[channelId].empty()) + { // Send ONE of the enqueued new transactions (phase is BEGIN_REQ) through this channel. - sendToChannel(channelId, *payloadToSend, BEGIN_REQ, SC_ZERO_TIME); + tlm_generic_payload &payloadToSend = *pendingRequests[channelId].front(); + pendingRequests[channelId].pop(); + tlm_phase tPhase = BEGIN_REQ; + sc_time tDelay = SC_ZERO_TIME; + iSocket[channelId]->nb_transport_fw(payloadToSend, tPhase, tDelay); + // TODO: early completion of channel controller // Mark the channel as busy again. channelIsFree[channelId] = false; } @@ -166,26 +178,39 @@ void Arbiter::peqCallback(tlm_generic_payload &payload, const tlm_phase &phase) // The arbiter receives a transaction in BEGIN_RESP phase // (that came from the memory side) and forwards it to the requester // device - if (receivedResponses[initiatorSocket].empty()) { - sendToInitiator(initiatorSocket, payload, phase, SC_ZERO_TIME); + if (pendingResponses[threadId].empty()) + { + tlm_phase tPhase = phase; + sc_time tDelay = SC_ZERO_TIME; + tSocket[threadId]->nb_transport_bw(payload, tPhase, tDelay); + // TODO: early completion of initiator!!! } + // Enqueue the transaction in BEGIN_RESP phase until the initiator - // device acknowledge it (phase changes to END_RESP). - receivedResponses[initiatorSocket].push(&payload); + // device acknowledges it (phase changes to END_RESP). + pendingResponses[threadId].push(&payload); } else if (phase == END_RESP) { // Send the END_RESP message to the memory - sendToChannel(channelId, payload, phase, SC_ZERO_TIME); + { + tlm_phase tPhase = phase; + sc_time tDelay = SC_ZERO_TIME; + iSocket[channelId]->nb_transport_fw(payload, tPhase, tDelay); + } // Drop one element of the queue of BEGIN_RESP from memory to this device - receivedResponses[initiatorSocket].pop(); + pendingResponses[threadId].pop(); // Check if there are queued transactoins with phase BEGIN_RESP from memory to this device - if (!receivedResponses[initiatorSocket].empty()) { + if (!pendingResponses[threadId].empty()) + { // The queue is not empty. - tlm_generic_payload *payloadToSend = receivedResponses[initiatorSocket].front(); + tlm_generic_payload &payloadToSend = *pendingResponses[threadId].front(); // Send ONE extra BEGIN_RESP to the device - sendToInitiator(initiatorSocket, *payloadToSend, BEGIN_RESP, SC_ZERO_TIME); + tlm_phase tPhase = BEGIN_RESP; + sc_time tDelay = SC_ZERO_TIME; + tSocket[threadId]->nb_transport_bw(payloadToSend, tPhase, tDelay); + // TODO: early completion of initiator!!! } } else @@ -193,22 +218,6 @@ void Arbiter::peqCallback(tlm_generic_payload &payload, const tlm_phase &phase) "Payload event queue in arbiter was triggered with unknown phase"); } -void Arbiter::sendToChannel(unsigned int channelId, tlm_generic_payload &payload, - const tlm_phase &phase, const sc_time &delay) -{ - tlm_phase TPhase = phase; - sc_time TDelay = delay; - iSocket[channelId]->nb_transport_fw(payload, TPhase, TDelay); -} - -void Arbiter::sendToInitiator(unsigned int id, tlm_generic_payload &payload, - const tlm_phase &phase, const sc_time &delay) -{ - tlm_phase TPhase = phase; - sc_time TDelay = delay; - tSocket[id]->nb_transport_bw(payload, TPhase, TDelay); -} - void Arbiter::appendDramExtension(int socketId, tlm_generic_payload &payload) { // Append Generation Extension diff --git a/DRAMSys/library/src/simulation/Arbiter.h b/DRAMSys/library/src/simulation/Arbiter.h index 2e0ab39d..1bb12de7 100644 --- a/DRAMSys/library/src/simulation/Arbiter.h +++ b/DRAMSys/library/src/simulation/Arbiter.h @@ -71,7 +71,7 @@ private: std::vector> pendingRequests; // used to account for the response_accept_delay in the initiators (traceplayer, core etc.) // This is a queue of responses comming from the memory side. The phase of these transactions is BEGIN_RESP. - std::map> receivedResponses; + std::map> pendingResponses; // Initiated by initiator side // This function is called when an arbiter's target socket receives a transaction from a device @@ -87,12 +87,6 @@ private: void peqCallback(tlm::tlm_generic_payload &payload, const tlm::tlm_phase &phase); - void sendToChannel(unsigned int channelId, tlm::tlm_generic_payload &payload, - const tlm::tlm_phase &phase, const sc_time &delay); - - void sendToInitiator(unsigned int id, tlm::tlm_generic_payload &payload, - const tlm::tlm_phase &phase, const sc_time &delay); - void appendDramExtension(int socketId, tlm::tlm_generic_payload &payload); std::vector nextPayloadID; }; From 3598bdf09027b2ef3e8c206fac4076266129a285 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Thu, 30 Apr 2020 13:37:08 +0200 Subject: [PATCH 15/22] Added support for early completion on initiator side (BEGIN_RESP). --- DRAMSys/library/src/simulation/Arbiter.cpp | 27 ++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/DRAMSys/library/src/simulation/Arbiter.cpp b/DRAMSys/library/src/simulation/Arbiter.cpp index 01234602..b273485d 100644 --- a/DRAMSys/library/src/simulation/Arbiter.cpp +++ b/DRAMSys/library/src/simulation/Arbiter.cpp @@ -88,8 +88,8 @@ tlm_sync_enum Arbiter::nb_transport_fw(int id, tlm_generic_payload &payload, } else if (phase == END_RESP) { + // TODO: why one additional cycle??? notDelay += Configuration::getInstance().memSpec->tCK; - payload.release(); } PRINTDEBUGMESSAGE(name(), "[fw] " + phaseNameToString(phase) + " notification in " + @@ -138,7 +138,7 @@ void Arbiter::peqCallback(tlm_generic_payload &payload, const tlm_phase &phase) { // This channel was available. Forward the new transaction to the memory controller. channelIsFree[channelId] = false; - tlm_phase tPhase = phase; + tlm_phase tPhase = BEGIN_REQ; sc_time tDelay = SC_ZERO_TIME; iSocket[channelId]->nb_transport_fw(payload, tPhase, tDelay); // TODO: early completion of channel controller!!! @@ -155,7 +155,7 @@ void Arbiter::peqCallback(tlm_generic_payload &payload, const tlm_phase &phase) channelIsFree[channelId] = true; // The arbiter receives a transaction which phase is END_REQ from memory controller and forwards it to the requester device. - tlm_phase tPhase = phase; + tlm_phase tPhase = END_REQ; sc_time tDelay = SC_ZERO_TIME; tSocket[threadId]->nb_transport_bw(payload, tPhase, tDelay); @@ -180,10 +180,14 @@ void Arbiter::peqCallback(tlm_generic_payload &payload, const tlm_phase &phase) // device if (pendingResponses[threadId].empty()) { - tlm_phase tPhase = phase; + tlm_phase tPhase = BEGIN_RESP; sc_time tDelay = SC_ZERO_TIME; - tSocket[threadId]->nb_transport_bw(payload, tPhase, tDelay); - // TODO: early completion of initiator!!! + tlm_sync_enum returnValue = tSocket[threadId]->nb_transport_bw(payload, tPhase, tDelay); + if (returnValue != TLM_ACCEPTED) + { + tPhase = END_RESP; + payloadEventQueue.notify(payload, tPhase, tDelay); + } } // Enqueue the transaction in BEGIN_RESP phase until the initiator @@ -194,12 +198,13 @@ void Arbiter::peqCallback(tlm_generic_payload &payload, const tlm_phase &phase) { // Send the END_RESP message to the memory { - tlm_phase tPhase = phase; + tlm_phase tPhase = END_RESP; sc_time tDelay = SC_ZERO_TIME; iSocket[channelId]->nb_transport_fw(payload, tPhase, tDelay); } // Drop one element of the queue of BEGIN_RESP from memory to this device pendingResponses[threadId].pop(); + payload.release(); // Check if there are queued transactoins with phase BEGIN_RESP from memory to this device if (!pendingResponses[threadId].empty()) @@ -209,8 +214,12 @@ void Arbiter::peqCallback(tlm_generic_payload &payload, const tlm_phase &phase) // Send ONE extra BEGIN_RESP to the device tlm_phase tPhase = BEGIN_RESP; sc_time tDelay = SC_ZERO_TIME; - tSocket[threadId]->nb_transport_bw(payloadToSend, tPhase, tDelay); - // TODO: early completion of initiator!!! + tlm_sync_enum returnValue = tSocket[threadId]->nb_transport_bw(payloadToSend, tPhase, tDelay); + if (returnValue != TLM_ACCEPTED) + { + tPhase = END_RESP; + payloadEventQueue.notify(payloadToSend, tPhase, tDelay); + } } } else From 01d7beee10275d0da7e2476dbc1f17d118394103 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Thu, 30 Apr 2020 15:45:02 +0200 Subject: [PATCH 16/22] Updated minimum cmake version for Trace Analyzer to cmake 3.12. --- DRAMSys/traceAnalyzer/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DRAMSys/traceAnalyzer/CMakeLists.txt b/DRAMSys/traceAnalyzer/CMakeLists.txt index 37da1e4a..9bfac594 100644 --- a/DRAMSys/traceAnalyzer/CMakeLists.txt +++ b/DRAMSys/traceAnalyzer/CMakeLists.txt @@ -30,7 +30,7 @@ # # Author: Matthias Jung -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.12) # Project Name: project(TraceAnalyzer) From 83f93f36208699f02e3c3bdf4833f4eb94b97511 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Mon, 4 May 2020 11:25:08 +0200 Subject: [PATCH 17/22] Fixes phase conversions if more extended phases are declared outside of DRAMSys. --- DRAMSys/library/src/controller/Command.cpp | 32 +++++++++---------- .../src/controller/ControllerRecordable.cpp | 8 ++--- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/DRAMSys/library/src/controller/Command.cpp b/DRAMSys/library/src/controller/Command.cpp index 88e64544..9b43125c 100644 --- a/DRAMSys/library/src/controller/Command.cpp +++ b/DRAMSys/library/src/controller/Command.cpp @@ -43,7 +43,7 @@ using namespace DRAMPower; std::string commandToString(Command command) { - assert(command >= 0 && command <= 15); + assert(command >= Command::NOP && command <= Command::SREFEX); static std::array stringOfCommand = {"NOP", "RD", @@ -71,7 +71,7 @@ unsigned numberOfCommands() tlm_phase commandToPhase(Command command) { - assert(command >= 0 && command <= 15); + assert(command >= Command::NOP && command <= Command::SREFEX); static std::array phaseOfCommand = {UNINITIALIZED_PHASE, BEGIN_RD, @@ -94,7 +94,7 @@ tlm_phase commandToPhase(Command command) Command phaseToCommand(tlm_phase phase) { - assert(phase >= 5 && phase <= 19); + assert(phase >= BEGIN_RD && phase <= END_SREF); static std::array commandOfPhase = {Command::RD, Command::WR, @@ -111,12 +111,12 @@ Command phaseToCommand(tlm_phase phase) Command::PDXP, Command::SREFEN, Command::SREFEX}; - return commandOfPhase[phase - 5]; + return commandOfPhase[phase - BEGIN_RD]; } MemCommand::cmds phaseToDRAMPowerCommand(tlm_phase phase) { - assert(phase >= 5 && phase <= 19); + assert(phase >= BEGIN_RD && phase <= END_SREF); static std::array phaseOfCommand = {MemCommand::RD, MemCommand::WR, @@ -133,40 +133,40 @@ MemCommand::cmds phaseToDRAMPowerCommand(tlm_phase phase) MemCommand::PUP_PRE, MemCommand::SREN, MemCommand::SREX}; - return phaseOfCommand[phase - 5]; + return phaseOfCommand[phase - BEGIN_RD]; } bool phaseNeedsEnd(tlm_phase phase) { - return (phase >= 5 && phase <= 13); + return (phase >= BEGIN_RD && phase <= BEGIN_REFA); } tlm_phase getEndPhase(tlm_phase phase) { - assert(phase >= 5 && phase <= 13); + assert(phase >= BEGIN_RD && phase <= BEGIN_REFA); return (phase + 15); } bool isBankCommand(Command command) { - assert(command >= 0 && command <= 15); - return (command <= 7); + assert(command >= Command::NOP && command <= Command::SREFEX); + return (command <= Command::REFB); } bool isRankCommand(Command command) { - assert(command >= 0 && command <= 15); - return (command >= 8); + assert(command >= Command::NOP && command <= Command::SREFEX); + return (command >= Command::PREA); } bool isCasCommand(Command command) { - assert(command >= 0 && command <= 15); - return (command <= 4); + assert(command >= Command::NOP && command <= Command::SREFEX); + return (command <= Command::WRA); } bool isRasCommand(Command command) { - assert(command >= 0 && command <= 15); - return (command >= 5); + assert(command >= Command::NOP && command <= Command::SREFEX); + return (command >= Command::PRE); } diff --git a/DRAMSys/library/src/controller/ControllerRecordable.cpp b/DRAMSys/library/src/controller/ControllerRecordable.cpp index bcfbc836..638803fa 100644 --- a/DRAMSys/library/src/controller/ControllerRecordable.cpp +++ b/DRAMSys/library/src/controller/ControllerRecordable.cpp @@ -44,11 +44,11 @@ tlm_sync_enum ControllerRecordable::nb_transport_fw(tlm_generic_payload &trans, return Controller::nb_transport_fw(trans, phase, delay); } -tlm_sync_enum ControllerRecordable::nb_transport_bw(tlm_generic_payload &trans, - tlm_phase &phase, sc_time &delay) +tlm_sync_enum ControllerRecordable::nb_transport_bw(tlm_generic_payload &, + tlm_phase &, sc_time &) { - recordPhase(trans, phase, delay); - return Controller::nb_transport_bw(trans, phase, delay); + SC_REPORT_FATAL("Controller", "nb_transport_bw of controller must not be called"); + return TLM_ACCEPTED; } void ControllerRecordable::sendToFrontend(tlm_generic_payload *payload, tlm_phase phase) From cc5b5af099531be708a4b170febf4b553cfa0eab Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Mon, 4 May 2020 17:24:50 +0200 Subject: [PATCH 18/22] Improved cmake file for easier building process. --- DRAMSys/library/CMakeLists.txt | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/DRAMSys/library/CMakeLists.txt b/DRAMSys/library/CMakeLists.txt index e33fd633..30b76609 100644 --- a/DRAMSys/library/CMakeLists.txt +++ b/DRAMSys/library/CMakeLists.txt @@ -48,12 +48,12 @@ add_subdirectory(src/common/third_party/sqlite-amalgamation) add_subdirectory(src/common/third_party/DRAMPower) # Add SystemC: -if(DEFINED ENV{DRAMSYS_PCT}) - find_library(SYSTEMC_LIBRARY vsi_systemc_dynamic PATH "/software/Synopsys_CoWare/N-2017.12/VPProducts/SLS/linux/common/libso-gcc-5.2.0-64") - message("Building with PCT SystemC") -elseif(DEFINED ENV{SYSTEMC_HOME} AND DEFINED ENV{SYSTEMC_TARGET_ARCH}) - find_library(SYSTEMC_LIBRARY systemc PATH $ENV{SYSTEMC_HOME}/lib-$ENV{SYSTEMC_TARGET_ARCH}/) - message("Building with existing SystemC") +if(DEFINED ENV{SYSTEMC_HOME}) + find_library(SYSTEMC_LIBRARY + NAMES systemc vsi_systemc_dynamic + PATHS $ENV{SYSTEMC_HOME}/lib-$ENV{SYSTEMC_TARGET_ARCH}/ $ENV{SYSTEMC_HOME}/lib-linux64/ $ENV{SYSTEMC_HOME}/libso-gcc-5.2.0-64/ + ) + message("Building with external SystemC") else() set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libs") add_subdirectory(src/common/third_party/systemc) @@ -178,21 +178,12 @@ add_library(DRAMSysLibrary # Build: target_include_directories(DRAMSysLibrary - PUBLIC src/common/third_party/DRAMPower/src + PUBLIC src/common/third_party/DRAMPower/src/ PUBLIC src/common/third_party/sqlite-amalgamation/ + PUBLIC $ENV{SYSTEMC_HOME}/include/ + PUBLIC $ENV{SYSTEMC_HOME}/include/tlm/ ) -if(DEFINED ENV{DRAMSYS_PCT}) - target_include_directories(DRAMSysLibrary - PUBLIC /software/Synopsys_CoWare/N-2017.12/VPProducts/SLS/linux/common/include - PUBLIC /software/Synopsys_CoWare/N-2017.12/VPProducts/SLS/linux/common/include/tlm - ) -elseif(DEFINED ENV{SYSTEMC_HOME} AND DEFINED ENV{SYSTEMC_TARGET_ARCH}) - target_include_directories(DRAMSysLibrary - PUBLIC $ENV{SYSTEMC_HOME}/include - ) -endif() - target_link_libraries(DRAMSysLibrary ${SYSTEMC_LIBRARY} sqlite3::sqlite3 From 64fdfbe84f610e666e51ec4c60ad2fc3c480e052 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Tue, 5 May 2020 11:52:36 +0200 Subject: [PATCH 19/22] Selected PCT SystemC library that includes all symbols. --- DRAMSys/library/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DRAMSys/library/CMakeLists.txt b/DRAMSys/library/CMakeLists.txt index 30b76609..bca9472a 100644 --- a/DRAMSys/library/CMakeLists.txt +++ b/DRAMSys/library/CMakeLists.txt @@ -50,7 +50,7 @@ add_subdirectory(src/common/third_party/DRAMPower) # Add SystemC: if(DEFINED ENV{SYSTEMC_HOME}) find_library(SYSTEMC_LIBRARY - NAMES systemc vsi_systemc_dynamic + NAMES systemc SnpsVP PATHS $ENV{SYSTEMC_HOME}/lib-$ENV{SYSTEMC_TARGET_ARCH}/ $ENV{SYSTEMC_HOME}/lib-linux64/ $ENV{SYSTEMC_HOME}/libso-gcc-5.2.0-64/ ) message("Building with external SystemC") From 59207c6a8d36b214cb1797bce137166e17fe251e Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Fri, 8 May 2020 11:35:09 +0200 Subject: [PATCH 20/22] Changed path of DRAMSys library for PCT. --- DRAMSys/library/CMakeLists.txt | 4 ++-- DRAMSys/pct/buildDRAMSys.sh | 9 --------- DRAMSys/pct/createPlatform.tcl | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) delete mode 100755 DRAMSys/pct/buildDRAMSys.sh diff --git a/DRAMSys/library/CMakeLists.txt b/DRAMSys/library/CMakeLists.txt index bca9472a..7966b995 100644 --- a/DRAMSys/library/CMakeLists.txt +++ b/DRAMSys/library/CMakeLists.txt @@ -51,9 +51,9 @@ add_subdirectory(src/common/third_party/DRAMPower) if(DEFINED ENV{SYSTEMC_HOME}) find_library(SYSTEMC_LIBRARY NAMES systemc SnpsVP - PATHS $ENV{SYSTEMC_HOME}/lib-$ENV{SYSTEMC_TARGET_ARCH}/ $ENV{SYSTEMC_HOME}/lib-linux64/ $ENV{SYSTEMC_HOME}/libso-gcc-5.2.0-64/ + PATHS $ENV{SYSTEMC_HOME}/lib-$ENV{SYSTEMC_TARGET_ARCH}/ $ENV{SYSTEMC_HOME}/lib-linux64/ $ENV{SYSTEMC_HOME}/libso-$ENV{COWARE_CXX_COMPILER}/ ) - message("Building with external SystemC") + message("Building with external SystemC located in $ENV{SYSTEMC_HOME}") else() set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libs") add_subdirectory(src/common/third_party/systemc) diff --git a/DRAMSys/pct/buildDRAMSys.sh b/DRAMSys/pct/buildDRAMSys.sh deleted file mode 100755 index 7b578cc9..00000000 --- a/DRAMSys/pct/buildDRAMSys.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -JOBS=$(nproc --all) - -rm -rf lib -mkdir lib -cd lib -DRAMSYS_PCT=true qmake ../../simulator/library.pro -DRAMSYS_PCT=true make -j$JOBS diff --git a/DRAMSys/pct/createPlatform.tcl b/DRAMSys/pct/createPlatform.tcl index ead365f8..d6a1c661 100644 --- a/DRAMSys/pct/createPlatform.tcl +++ b/DRAMSys/pct/createPlatform.tcl @@ -48,7 +48,7 @@ # Add DRAMSys Library // ../[glob -type d ../../build*]/simulator/ ::pct::set_simulation_build_project_setting Debug Libraries "sqlite3 DRAMSysLibrary DRAMPower" -::pct::set_simulation_build_project_setting Debug {Library Search Paths} [concat ../../../build/ ../../../build/src/common/third_party/DRAMPower] +::pct::set_simulation_build_project_setting Debug {Library Search Paths} [concat ../../../build/library/ ../../../build/library/src/common/third_party/DRAMPower] ::pct::set_simulation_build_project_setting Debug {Defined Symbols} SC_INCLUDE_DYNAMIC_PROCESSES=1 ::pct::set_simulation_build_project_setting Debug {Compiler Flags} {-std=c++11} From bdbf6ca7b39594f897d640b961c9538ee372cbb2 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Fri, 8 May 2020 14:26:54 +0200 Subject: [PATCH 21/22] Updated QWT path. --- DRAMSys/traceAnalyzer/CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/DRAMSys/traceAnalyzer/CMakeLists.txt b/DRAMSys/traceAnalyzer/CMakeLists.txt index 9bfac594..474c2c0f 100644 --- a/DRAMSys/traceAnalyzer/CMakeLists.txt +++ b/DRAMSys/traceAnalyzer/CMakeLists.txt @@ -39,14 +39,11 @@ project(TraceAnalyzer) find_package(Python3 COMPONENTS Development) # Add QWT Dependency: -find_library(QWT_LIBRARY NAMES "qwt-qt5" "qwt" PATHS $ENV{LIBQWT_HOME}) +find_library(QWT_LIBRARY NAMES "qwt-qt5" "qwt" PATHS "$ENV{QWT_HOME}/lib") find_path(QWT_INCLUDE_DIRS NAMES "qwt_plot.h" PATHS "/usr/include/qwt-qt5" "/usr/include/qwt" - "C:\\Qwt\\" - "C:\\Qwt-6.1.4\\" - "C:\\Users\\jung\\Zeugs\\qwt\\qwt-614-install\\include" - $ENV{LIBQWT_HEADERS} + "$ENV{QWT_HOME}/include" ) # Add QT Library: From 86ecc103c1113cd2b016152cc73e07ebd45591b6 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Fri, 8 May 2020 16:14:18 +0200 Subject: [PATCH 22/22] Fix to calculate metrics with new config files. --- DRAMSys/traceAnalyzer/scripts/metrics.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/DRAMSys/traceAnalyzer/scripts/metrics.py b/DRAMSys/traceAnalyzer/scripts/metrics.py index d3fc044d..cc4e8e5e 100644 --- a/DRAMSys/traceAnalyzer/scripts/metrics.py +++ b/DRAMSys/traceAnalyzer/scripts/metrics.py @@ -462,7 +462,9 @@ def time_in_SREFB_percent(connection): @metric def time_in_power_down_states_in_ns(connection): mcconfig = MCConfig(connection) - bankwiseLogic = mcconfig.getValue("BankwiseLogic") + #bankwiseLogic = mcconfig.getValue("BankwiseLogic") + bankwiseLogic = "0" + if bankwiseLogic == "0": totalTimeInPDNA = time_in_PDNA_in_ns(connection) totalTimeInPDNP = time_in_PDNP_in_ns(connection) @@ -480,7 +482,9 @@ def time_in_power_down_states_in_ns(connection): @metric def time_in_power_down_states_percent(connection): mcconfig = MCConfig(connection) - bankwiseLogic = mcconfig.getValue("BankwiseLogic") + #bankwiseLogic = mcconfig.getValue("BankwiseLogic") + bankwiseLogic = "0" + if bankwiseLogic == "0": totalTimeAllBanks = trace_length_in_ns(connection) else: @@ -538,7 +542,8 @@ def getMetrics(pathToTrace): connection = sqlite3.connect(pathToTrace) mcconfig = MCConfig(connection) - bankwiseLogic = mcconfig.getValue("BankwiseLogic") + #bankwiseLogic = mcconfig.getValue("BankwiseLogic") + bankwiseLogic = "0" if bankwiseLogic == "0": pdnMetrics = [time_in_PDNA_in_ns, time_in_PDNA_percent, time_in_PDNP_in_ns, time_in_PDNP_percent, time_in_SREF_in_ns, time_in_SREF_percent] @@ -572,7 +577,8 @@ def calculateMetrics(pathToTrace, selectedMetrics=[]): connection = sqlite3.connect(pathToTrace) mcconfig = MCConfig(connection) - bankwiseLogic = mcconfig.getValue("BankwiseLogic") + #bankwiseLogic = mcconfig.getValue("BankwiseLogic") + bankwiseLogic = "0" if bankwiseLogic == "0": pdnMetrics = [time_in_PDNA_in_ns, time_in_PDNA_percent,