Skip to content

Commit ee8b39a

Browse files
committed
Update to v5.0 (new repo structure).
1 parent c5b827c commit ee8b39a

File tree

429 files changed

+34139
-2245758
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

429 files changed

+34139
-2245758
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.stl filter=lfs diff=lfs merge=lfs -text
2+
*.data.gz filter=lfs diff=lfs merge=lfs -text
3+
*.inst.gz filter=lfs diff=lfs merge=lfs -text
4+
*.tdb filter=lfs diff=lfs merge=lfs -text
5+
*.png filter=lfs diff=lfs merge=lfs -text

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/dram/build
66
*.user
77
*.tdb
8-
!/DRAMSys/tests/*/expected/*.tdb
8+
!tests/tests_regression/*/expected/*.tdb
99
*.tdb-journal
1010
*.out
1111
/build-simulation
@@ -26,3 +26,4 @@ DRAMSys/docs/doxygen
2626
.vscode
2727
cmake-build*
2828
.idea
29+
.cache

.gitmodules

Whitespace-only changes.

CMakeLists.txt

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
# Copyright (c) 2023, RPTU Kaiserslautern-Landau
2+
# All rights reserved.
3+
#
4+
# Redistribution and use in source and binary forms, with or without
5+
# modification, are permitted provided that the following conditions are
6+
# met:
7+
#
8+
# 1. Redistributions of source code must retain the above copyright notice,
9+
# this list of conditions and the following disclaimer.
10+
#
11+
# 2. Redistributions in binary form must reproduce the above copyright
12+
# notice, this list of conditions and the following disclaimer in the
13+
# documentation and/or other materials provided with the distribution.
14+
#
15+
# 3. Neither the name of the copyright holder nor the names of its
16+
# contributors may be used to endorse or promote products derived from
17+
# this software without specific prior written permission.
18+
#
19+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21+
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22+
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
23+
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25+
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26+
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27+
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28+
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
#
31+
# Authors:
32+
# Thomas Psota
33+
# Lukas Steiner
34+
35+
###############################################
36+
### DRAMSys ###
37+
###############################################
38+
cmake_minimum_required(VERSION 3.24.0)
39+
40+
set(PROJECT_NAME "DRAMSys")
41+
42+
project(${PROJECT_NAME} VERSION "5.0")
43+
44+
### Compiler settings ###
45+
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ Standard")
46+
message(STATUS "CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD}")
47+
if(NOT CMAKE_BUILD_TYPE)
48+
set(CMAKE_BUILD_TYPE Release)
49+
endif()
50+
message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
51+
52+
### CMake settings ###
53+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
54+
include(build_source_group)
55+
include(diagnostics_print)
56+
include(enable_extensions)
57+
include(FetchContent)
58+
59+
if(ENABLE_COVERAGE)
60+
include(coverage)
61+
endif()
62+
63+
if(POLICY CMP0135)
64+
cmake_policy(SET CMP0135 NEW)
65+
endif()
66+
67+
# Check if standalone build or being included as submodule
68+
get_directory_property(DRAMSYS_IS_SUBMODULE PARENT_DIRECTORY)
69+
70+
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
71+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
72+
73+
### Project settings ###
74+
message(STATUS "CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}")
75+
message(STATUS "CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}")
76+
message(STATUS "" )
77+
78+
if(NOT DRAMSYS_IS_SUBMODULE)
79+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
80+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
81+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
82+
endif()
83+
84+
### DRAMSys directories ###
85+
set(DRAMSYS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
86+
set(DRAMSYS_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib")
87+
set(DRAMSYS_TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests")
88+
set(DRAMSYS_RESOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/configs")
89+
set(DRAMSYS_EXTENSIONS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extensions")
90+
91+
### Build options ###
92+
option(DRAMSYS_BUILD_TESTS "Build DRAMSys unit tests" OFF)
93+
option(DRAMSYS_VERBOSE_CMAKE_OUTPUT "Show detailed CMake output" OFF)
94+
option(DRAMSYS_BUILD_CLI "Build DRAMSys Command Line Tool" ON)
95+
option(DRAMSYS_WITH_DRAMPOWER "Build with DRAMPower support enabled." OFF)
96+
option(DRAMSYS_ENABLE_EXTENSIONS "Enable proprietary DRAMSys extensions." OFF)
97+
98+
###############################################
99+
### Library Settings ###
100+
###############################################
101+
102+
### Detect OS threading library ###
103+
find_package(Threads)
104+
105+
### nlohmann_json ###
106+
add_subdirectory(${DRAMSYS_LIBRARY_DIR}/nlohmann_json)
107+
108+
### sqlite3 ###
109+
add_subdirectory(${DRAMSYS_LIBRARY_DIR}/sqlite3)
110+
111+
### GoogleTest ###
112+
if(DRAMSYS_BUILD_TESTS)
113+
FetchContent_Declare(
114+
googletest
115+
GIT_REPOSITORY https://github.com/google/googletest
116+
GIT_TAG release-1.12.1)
117+
118+
# For Windows: Prevent overriding the parent project's compiler/linker settings
119+
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
120+
FetchContent_MakeAvailable(googletest)
121+
set_target_properties(gmock PROPERTIES FOLDER lib/gtest)
122+
set_target_properties(gmock_main PROPERTIES FOLDER lib/gtest)
123+
set_target_properties(gtest PROPERTIES FOLDER lib/gtest)
124+
set_target_properties(gtest_main PROPERTIES FOLDER lib/gtest)
125+
endif()
126+
127+
### SystemC ###
128+
list(APPEND CMAKE_PREFIX_PATH $ENV{SYSTEMC_HOME} /opt/systemc/)
129+
FetchContent_Declare(
130+
systemc
131+
GIT_REPOSITORY https://github.com/accellera-official/systemc.git
132+
GIT_TAG 2.3.4
133+
FIND_PACKAGE_ARGS NAMES SystemCLanguage)
134+
135+
set(DISABLE_COPYRIGHT_MESSAGE True)
136+
FetchContent_MakeAvailable(systemc)
137+
138+
### DRAMPower ###
139+
if (DRAMSYS_WITH_DRAMPOWER)
140+
FetchContent_Declare(
141+
DRAMPower
142+
GIT_REPOSITORY https://github.com/tukl-msd/DRAMPower
143+
GIT_TAG 9e64a1b)
144+
145+
FetchContent_MakeAvailable(DRAMPower)
146+
set_target_properties(DRAMPower PROPERTIES FOLDER lib)
147+
endif ()
148+
149+
###############################################
150+
### Source Directory ###
151+
###############################################
152+
153+
add_subdirectory(src/util)
154+
add_subdirectory(src/configuration)
155+
add_subdirectory(src/libdramsys)
156+
157+
if(DRAMSYS_BUILD_CLI)
158+
add_subdirectory(src/simulator)
159+
endif()
160+
161+
if(DRAMSYS_ENABLE_EXTENSIONS)
162+
dramsys_enable_extensions()
163+
endif()
164+
165+
###############################################
166+
### Test Directory ###
167+
###############################################
168+
169+
if(DRAMSYS_BUILD_TESTS)
170+
include(GoogleTest)
171+
include(CTest)
172+
add_subdirectory(tests)
173+
endif()

CMakePresets.json

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"version": 2,
3+
"cmakeMinimumRequired": {
4+
"major": 3,
5+
"minor": 14,
6+
"patch": 0
7+
},
8+
"configurePresets": [
9+
{
10+
"name": "cmake-pedantic",
11+
"hidden": true,
12+
"warnings": {
13+
"dev": true,
14+
"deprecated": true,
15+
"unusedCli": true,
16+
"systemVars": false
17+
}
18+
},
19+
{
20+
"name": "dev-mode",
21+
"hidden": true,
22+
"inherits": "cmake-pedantic",
23+
"cacheVariables": {
24+
"DRAMSYS_BUILD_TESTS": "ON",
25+
"DRAMSYS_ENABLE_EXTENSIONS": "ON",
26+
"DRAMSYS_WITH_DRAMPOWER": "ON"
27+
}
28+
},
29+
{
30+
"name": "std",
31+
"description": "This preset makes sure the project actually builds with at least the specified standard",
32+
"hidden": true,
33+
"cacheVariables": {
34+
"CMAKE_CXX_EXTENSIONS": "OFF",
35+
"CMAKE_CXX_STANDARD": "17",
36+
"CMAKE_CXX_STANDARD_REQUIRED": "ON"
37+
}
38+
},
39+
{
40+
"name": "ci-common",
41+
"generator": "Unix Makefiles",
42+
"binaryDir": "${sourceDir}/build",
43+
"inherits": [
44+
"std",
45+
"dev-mode"
46+
],
47+
"cacheVariables": {
48+
"CMAKE_BUILD_TYPE": "Release"
49+
}
50+
},
51+
{
52+
"name": "ci-coverage",
53+
"binaryDir": "${sourceDir}/build/coverage",
54+
"inherits": "ci-common",
55+
"cacheVariables": {
56+
"ENABLE_COVERAGE": "ON",
57+
"CMAKE_BUILD_TYPE": "Coverage",
58+
"CMAKE_CXX_FLAGS_COVERAGE": "-Og -g --coverage -fkeep-static-functions",
59+
"CMAKE_EXE_LINKER_FLAGS_COVERAGE": "--coverage",
60+
"CMAKE_SHARED_LINKER_FLAGS_COVERAGE": "--coverage"
61+
}
62+
},
63+
{
64+
"name": "dev",
65+
"generator": "Unix Makefiles",
66+
"binaryDir": "${sourceDir}/build",
67+
"inherits": [
68+
"dev-mode",
69+
"std"
70+
],
71+
"cacheVariables": {
72+
"CMAKE_BUILD_TYPE": "Debug"
73+
}
74+
}
75+
]
76+
}

DRAMSys/docs/images/dramsys4_0.png

-46.3 KB
Binary file not shown.
-232 KB
Binary file not shown.
-1.61 MB
Binary file not shown.

DRAMSys/gem5/README.md

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)