Small updates in CMake files.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
## DRAMSys with gem5
|
||||
|
||||
Install gem5 by following the instructions in the [gem5 documentation](https://www.gem5.org/documentation/general_docs/building). In order to allow a coupling without running into problems we recommend to use **commit a470ef5**. Optionally, use the scripts from [gem5.TnT] to install gem5, build it, get some benchmark programs and learn more about gem5.
|
||||
Install gem5 by following the instructions in the [gem5 documentation](https://www.gem5.org/documentation/general_docs/building). In order to allow a coupling without running into problems we recommend to use **commit a470ef5**. Optionally, use the scripts from [gem5.TnT](https://github.com/tukl-msd/gem5.TnT) to install gem5, build it, get some benchmark programs and learn more about gem5.
|
||||
|
||||
In order to understand the SystemC coupling with gem5 it is recommended to read the documentation in the gem5 repository *util/tlm/README* and [1].
|
||||
|
||||
@@ -35,44 +35,7 @@ Change the architecture in the [CMake file](DRAMSys/gem5/CMakeLists.txt) to *X86
|
||||
|
||||
A **Hello world!** message should be printed to the standard output.
|
||||
|
||||
### DRAMSys with gem5 Elastic Traces
|
||||
|
||||
To understand elastic traces and their generation, study the [gem5 wiki](https://www.gem5.org/documentation/general_docs/cpu_models/TraceCPU) and the paper [2]. Some predefined configs are stored [here](DRAMSys/gem5/configs) and the related
|
||||
python files are stored [here](DRAMSys/gem5/examples). This is an example for running an elastic trace:
|
||||
|
||||
```bash
|
||||
./DRAMSys_gem5 ../../DRAMSys/library/resources/simulations/ddr3-example.json ../../DRAMSys/gem5/configs/singleElasticTraceReplay.ini 1
|
||||
```
|
||||
|
||||
An overview of the architecture being simulated is presented below:
|
||||
|
||||

|
||||
|
||||
Note that the address offset is usually zero for elastic traces.
|
||||
|
||||
Another example with L2 cache:
|
||||
|
||||
```bash
|
||||
./DRAMSys_gem5 ../../DRAMSys/library/resources/simulations/ddr3-example.json ../../DRAMSys/gem5/configs/singleElasticTraceReplayWithL2.ini 1
|
||||
```
|
||||
|
||||
If two elastic traces should be used run the simulation with the following example:
|
||||
|
||||
```
|
||||
./DRAMSys_gem5 ../../DRAMSys/library/resources/simulations/ddr3-example.json ../../DRAMSys/gem5/configs/dualElasticTraceReplay.ini 2
|
||||
```
|
||||
|
||||
An overview of the architcture being simulated is presented below:
|
||||
|
||||

|
||||
|
||||
For more sophisticated setups, even with L2 caches the proper *.ini* file should be created.
|
||||
|
||||
## References
|
||||
|
||||
[1] System Simulation with gem5 and SystemC: The Keystone for Full Interoperability
|
||||
C. Menard, M. Jung, J. Castrillon, N. Wehn. IEEE International Conference on Embedded Computer Systems Architectures Modeling and Simulation (SAMOS), July, 2017, Samos Island, Greece.
|
||||
|
||||
[gem5.TnT]: https://github.com/tukl-msd/gem5.TnT
|
||||
[MiBench]: http://vhosts.eecs.umich.edu/mibench/
|
||||
[PARSEC]: http://parsec.cs.princeton.edu/
|
||||
C. Menard, M. Jung, J. Castrillon, N. Wehn. IEEE International Conference on Embedded Computer Systems Architectures Modeling and Simulation (SAMOS), July, 2017, Samos Island, Greece.
|
||||
@@ -41,11 +41,14 @@ project(DRAMSysLibrary)
|
||||
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ Version")
|
||||
set(DCMAKE_SH="CMAKE_SH-NOTFOUND")
|
||||
|
||||
if(DEFINED ENV{COVERAGE} AND $ENV{COVERAGE} STREQUAL "true")
|
||||
set(GCC_COVERAGE_COMPILE_FLAGS "-g -O0 -coverage -fprofile-arcs -ftest-coverage")
|
||||
set(GCC_COVERAGE_LINK_FLAGS "-coverage -lgcov")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
|
||||
if(DEFINED ENV{COVERAGE})
|
||||
if($ENV{COVERAGE} STREQUAL "true")
|
||||
message("---- Coverage check enabled")
|
||||
set(GCC_COVERAGE_COMPILE_FLAGS "-g -O0 -coverage -fprofile-arcs -ftest-coverage")
|
||||
set(GCC_COVERAGE_LINK_FLAGS "-coverage -lgcov")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Add DRAMPower:
|
||||
@@ -60,16 +63,16 @@ if(DEFINED ENV{SYSTEMC_HOME})
|
||||
NAMES systemc SnpsVP
|
||||
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 located in $ENV{SYSTEMC_HOME}")
|
||||
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)
|
||||
set(SYSTEMC_LIBRARY systemc)
|
||||
message("-- Building with SystemC submodule")
|
||||
message("---- Building with SystemC submodule")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/src/common/third_party/sqlite-amalgamation)
|
||||
message("---- Database recording available")
|
||||
message("---- Database recording included")
|
||||
# Add sqlite3 Dependency:
|
||||
set(BUILD_ENABLE_RTREE ON CACHE BOOL "Enable R-Tree Feature")
|
||||
set(BUILD_ENABLE_RTREE ON)
|
||||
@@ -293,7 +296,7 @@ add_library(DRAMSysLibrary
|
||||
)
|
||||
|
||||
if(DEFINED ENV{LIBTHREED_ICE_HOME})
|
||||
message("-- Thermal simulation available")
|
||||
message("---- Thermal simulation available")
|
||||
add_definitions(-DTHERMALSIM)
|
||||
target_include_directories(DRAMSysLibrary
|
||||
PRIVATE $ENV{LIBTHREED_ICE_HOME}/include/
|
||||
|
||||
@@ -41,11 +41,13 @@ project(DRAMSysSimulator)
|
||||
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ Version")
|
||||
set(DCMAKE_SH="CMAKE_SH-NOTFOUND")
|
||||
|
||||
if(DEFINED ENV{COVERAGE} AND $ENV{COVERAGE} STREQUAL "true")
|
||||
set(GCC_COVERAGE_COMPILE_FLAGS "-g -O0 -coverage -fprofile-arcs -ftest-coverage")
|
||||
set(GCC_COVERAGE_LINK_FLAGS "-coverage -lgcov")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
|
||||
if(DEFINED ENV{COVERAGE})
|
||||
if($ENV{COVERAGE} STREQUAL "true")
|
||||
set(GCC_COVERAGE_COMPILE_FLAGS "-g -O0 -coverage -fprofile-arcs -ftest-coverage")
|
||||
set(GCC_COVERAGE_LINK_FLAGS "-coverage -lgcov")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/../library/src/simulation/DRAMSysRecordable.cpp)
|
||||
|
||||
Reference in New Issue
Block a user