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

View File

@@ -0,0 +1,23 @@
###############################################
### enable_extensions ###
###############################################
###
### Enable proprietary DRAMSys extensions
### during build generation
###
function( dramsys_enable_extensions )
file(GLOB sub_dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${DRAMSYS_EXTENSIONS_DIR}/*)
message(STATUS "Enabling DRAMSys extensions:")
message(STATUS "============================")
FOREACH(sub_dir ${sub_dirs})
IF(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${sub_dir}")
add_subdirectory(${sub_dir})
ENDIF()
ENDFOREACH()
message(STATUS "")
message(STATUS "")
endfunction()

View File

@@ -0,0 +1,17 @@
##############################################
##############################################
### ###
### DRAMSys Extensions - Apps ###
### ###
##############################################
##############################################
##############################################
### TraceAnalyzer ###
##############################################
option(DRAMSYS_EXTENSION_TRACE_ANALYZER_ENABLE "Enable DRAMSys Trace Analyzer" OFF)
if(DRAMSYS_EXTENSION_TRACE_ANALYZER_ENABLE)
message(STATUS " * Trace Analyzer")
add_subdirectory(traceAnalyzer)
endif()

Some files were not shown because too many files have changed in this diff Show More