Added extension mechanism and ported DDR5, LPDDR5, HBM3, TraceAnalyzer
This commit is contained in:
@@ -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 ###
|
||||
###############################################
|
||||
|
||||
23
cmake/enable_extensions.cmake
Normal file
23
cmake/enable_extensions.cmake
Normal 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()
|
||||
17
extensions/apps/CMakeLists.txt
Normal file
17
extensions/apps/CMakeLists.txt
Normal 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
Reference in New Issue
Block a user