Added extension mechanism and ported DDR5, LPDDR5, HBM3, TraceAnalyzer

This commit is contained in:
Thomas Psota
2023-02-09 14:22:34 +01:00
parent f4bc3867fc
commit f434026ccd
204 changed files with 1685 additions and 246 deletions

View File

@@ -45,8 +45,13 @@ project(${PROJECT_NAME} VERSION "5.0")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
include(build_source_group)
include(diagnostics_print)
include(enable_extensions)
include(FetchContent)
if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()
# Check if standalone build or being included as submodule
get_directory_property(DRAMSYS_IS_SUBMODULE PARENT_DIRECTORY)
@@ -69,6 +74,7 @@ set(DRAMSYS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
set(DRAMSYS_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib")
set(DRAMSYS_TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests")
set(DRAMSYS_RESOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/resources")
set(DRAMSYS_EXTENSIONS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extensions")
### Build options ###
option(DRAMSYS_BUILD_TESTS "Build DRAMSys unit tests" OFF)
@@ -77,9 +83,10 @@ option(DRAMSYS_BUILD_CLI "Build DRAMSys Command Line Tool" OFF)
option(DRAMSYS_COVERAGE_CHECK "Coverage check of DRAMSys" OFF)
option(DRAMSYS_WITH_GEM5 "Build DRAMSys with gem5 coupling" OFF)
option(DRAMSYS_WITH_DRAMPOWER "Build with DRAMPower support enabled." OFF)
option(DRAMSYS_ENABLE_EXTENSIONS "Enable proprietary DRAMSys extensions." OFF)
### Compiler settings ###
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 23)
if(DRAMSYS_COVERAGE_CHECK)
message("== Coverage check enabled")
@@ -100,6 +107,9 @@ find_package(Threads)
### nlohmann_json ###
add_subdirectory(${DRAMSYS_LIBRARY_DIR}/nlohmann_json)
### sqlite3 ###
add_subdirectory(${DRAMSYS_LIBRARY_DIR}/sqlite3)
### GoogleTest ###
if(DRAMSYS_BUILD_TESTS)
FetchContent_Declare(
@@ -117,14 +127,15 @@ if(DRAMSYS_BUILD_TESTS)
endif()
### sqlite-amalgamation ###
FetchContent_Declare(
sqlite-amalgamation
GIT_REPOSITORY https://github.com/azadkuh/sqlite-amalgamation.git
GIT_TAG 3.38.2)
set(BUILD_ENABLE_RTREE ON)
FetchContent_MakeAvailable(sqlite-amalgamation)
set_target_properties(SQLite3 PROPERTIES FOLDER lib)
# FetchContent_Declare(
# sqlite-amalgamation
# GIT_REPOSITORY https://github.com/azadkuh/sqlite-amalgamation.git
# GIT_TAG 3.38.2)
#
# set(SQLITE_ENABLE_RTREE ON CACHE BOOL "Enable R-Tree Feature")
# FetchContent_MakeAvailable(sqlite-amalgamation)
# set_target_properties(SQLite3 PROPERTIES FOLDER lib)
# add_library(sqlite::sqlite3 ALIAS SQLite3)
### SystemC ###
FetchContent_Declare(
@@ -147,6 +158,10 @@ if(DRAMSYS_BUILD_CLI)
add_subdirectory(src/simulator)
endif()
if(DRAMSYS_ENABLE_EXTENSIONS)
dramsys_enable_extensions()
endif()
###############################################
### Test Directory ###
###############################################