Remove file globs from CMakeLists

Fix build
This commit is contained in:
2024-11-06 16:45:35 +01:00
parent 5825eb8c58
commit a37171c6fd
23 changed files with 207 additions and 25105 deletions

View File

@@ -51,7 +51,6 @@ message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
### CMake settings ###
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
include(build_source_group)
include(diagnostics_print)
include(enable_extensions)
include(FetchContent)
@@ -107,7 +106,8 @@ option(DRAMSYS_USE_EXTERNAL_SYSTEMC "Use an external SystemC installation." OFF)
find_package(Threads)
### nlohmann_json ###
add_subdirectory(${DRAMSYS_LIBRARY_DIR}/nlohmann_json)
FetchContent_Declare(nlohmann_json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz)
FetchContent_MakeAvailable(nlohmann_json)
### sqlite3 ###
add_subdirectory(${DRAMSYS_LIBRARY_DIR}/sqlite3)
@@ -159,10 +159,6 @@ if (NOT TARGET SystemC::systemc)
# Set include directories to SYSTEM to suppress warnings
set_target_properties(systemc PROPERTIES SYSTEM TRUE)
else()
# TODO: Fix gem5 build (see Issue 57)
# Set include directories to SYSTEM to suppress warnings
# set_target_properties(SystemC::systemc PROPERTIES SYSTEM TRUE)
endif()
@@ -181,7 +177,6 @@ endif ()
### Source Directory ###
###############################################
add_subdirectory(src/util)
add_subdirectory(src/configuration)
add_subdirectory(src/libdramsys)

View File

@@ -1,13 +0,0 @@
###############################################
### build_source_group ###
###############################################
###
### Builds a source group from a set of files
### for nicer display in IDEs
###
function( build_source_group )
file(GLOB_RECURSE files ${CMAKE_CURRENT_SOURCE_DIR}/*.* )
list(REMOVE_ITEM files "CMakeLists.txt")
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "[src]" FILES ${files})
endfunction()

View File

@@ -1,14 +1,44 @@
option(DRAMSYS_EXTENSION_TRACE_ANALYZER_ENABLE "Enable Trace Analyzer extension" ON)
if(DRAMSYS_EXTENSION_TRACE_ANALYZER_ENABLE AND TARGET TraceAnalyzer)
message(STATUS " * Trace Analyzer")
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS *.cpp)
file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS *.h;*.hpp)
target_sources(TraceAnalyzer PRIVATE ${SOURCE_FILES} ${HEADER_FILES})
target_include_directories(TraceAnalyzer PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(TraceAnalyzer PRIVATE EXTENSION_ENABLED)
build_source_group()
if(NOT DRAMSYS_EXTENSION_TRACE_ANALYZER_ENABLE OR NOT TARGET TraceAnalyzer)
return()
endif()
message(STATUS " * Trace Analyzer")
target_sources(TraceAnalyzer PRIVATE
businessObjects/dependencymodels.cpp
businessObjects/dramTimeDependencies/common/QStringComparator.cpp
businessObjects/dramTimeDependencies/common/StringMapper.cpp
businessObjects/dramTimeDependencies/configurations/configurationBase.cpp
businessObjects/dramTimeDependencies/configurations/configurationfactory.cpp
businessObjects/dramTimeDependencies/configurations/specialized/DDR3Configuration.cpp
businessObjects/dramTimeDependencies/configurations/specialized/DDR4Configuration.cpp
businessObjects/dramTimeDependencies/configurations/specialized/DDR5Configuration.cpp
businessObjects/dramTimeDependencies/configurations/specialized/HBM2Configuration.cpp
businessObjects/dramTimeDependencies/configurations/specialized/LPDDR4Configuration.cpp
businessObjects/dramTimeDependencies/configurations/specialized/LPDDR5Configuration.cpp
businessObjects/dramTimeDependencies/dbEntries/specialized/DDR3dbphaseentry.cpp
businessObjects/dramTimeDependencies/dbEntries/specialized/DDR4dbphaseentry.cpp
businessObjects/dramTimeDependencies/dbEntries/specialized/DDR5dbphaseentry.cpp
businessObjects/dramTimeDependencies/dbEntries/specialized/HBM2dbphaseentry.cpp
businessObjects/dramTimeDependencies/dbEntries/specialized/LPDDR4dbphaseentry.cpp
businessObjects/dramTimeDependencies/dbEntries/specialized/LPDDR5dbphaseentry.cpp
businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.cpp
businessObjects/dramTimeDependencies/deviceDependencies/poolcontroller.cpp
businessObjects/dramTimeDependencies/deviceDependencies/poolcontrollermap.cpp
businessObjects/dramTimeDependencies/deviceDependencies/specialized/DDR3TimeDependencies.cpp
businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoDDR3.cpp
businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoDDR4.cpp
businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoDDR5.cpp
businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoHBM2.cpp
businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoLPDDR4.cpp
businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoLPDDR5.cpp
businessObjects/dramTimeDependencies/phasedependenciestracker.cpp
businessObjects/phases/dependencyinfos.cpp
businessObjects/phases/phasedependency.cpp
tracefiletab.cpp
)
target_include_directories(TraceAnalyzer PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(TraceAnalyzer PRIVATE EXTENSION_ENABLED)

View File

@@ -1,14 +1,15 @@
option(DRAMSYS_EXTENSION_DDR5_ENABLE "Enable DRAMSys DDR5 Support" ON)
if(DRAMSYS_EXTENSION_DDR5_ENABLE)
message(STATUS " * DDR5")
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS *.cpp)
file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS *.h;*.hpp)
target_sources(DRAMSys_libdramsys PRIVATE ${SOURCE_FILES} ${HEADER_FILES})
target_include_directories(DRAMSys_libdramsys PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(DRAMSys_libdramsys PUBLIC DDR5_SIM)
build_source_group()
if(NOT DRAMSYS_EXTENSION_DDR5_ENABLE)
return()
endif()
message(STATUS " * DDR5")
target_sources(DRAMSys_libdramsys PRIVATE
DRAMSys/configuration/memspec/MemSpecDDR5.cpp
DRAMSys/controller/checker/CheckerDDR5.cpp
)
target_include_directories(DRAMSys_libdramsys PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(DRAMSys_libdramsys PUBLIC DDR5_SIM)

View File

@@ -1,14 +1,15 @@
option(DRAMSYS_EXTENSION_HBM3_ENABLE "Enable DRAMSys HBM3 Support" ON)
if(DRAMSYS_EXTENSION_HBM3_ENABLE)
message(STATUS " * HBM3")
if(NOT DRAMSYS_EXTENSION_HBM3_ENABLE)
return()
endif()
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS *.cpp)
file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS *.h;*.hpp)
message(STATUS " * HBM3")
target_sources(DRAMSys_libdramsys PRIVATE ${SOURCE_FILES} ${HEADER_FILES})
target_include_directories(DRAMSys_libdramsys PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(DRAMSys_libdramsys PUBLIC HBM3_SIM)
target_sources(DRAMSys_libdramsys PRIVATE
DRAMSys/configuration/memspec/MemSpecHBM3.cpp
DRAMSys/controller/checker/CheckerHBM3.cpp
)
build_source_group()
endif()
target_include_directories(DRAMSys_libdramsys PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(DRAMSys_libdramsys PUBLIC HBM3_SIM)

View File

@@ -1,14 +1,15 @@
option(DRAMSYS_EXTENSION_LPDDR5_ENABLE "Enable DRAMSys LPDDR5 Support" ON)
if(DRAMSYS_EXTENSION_LPDDR5_ENABLE)
message(STATUS " * LPDDR5")
if(NOT DRAMSYS_EXTENSION_LPDDR5_ENABLE)
return()
endif()
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS *.cpp)
file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS *.h;*.hpp)
message(STATUS " * LPDDR5")
target_sources(DRAMSys_libdramsys PRIVATE ${SOURCE_FILES} ${HEADER_FILES})
target_include_directories(DRAMSys_libdramsys PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(DRAMSys_libdramsys PUBLIC LPDDR5_SIM)
target_sources(DRAMSys_libdramsys PRIVATE
DRAMSys/configuration/memspec/MemSpecLPDDR5.cpp
DRAMSys/controller/checker/CheckerLPDDR5.cpp
)
build_source_group()
endif()
target_include_directories(DRAMSys_libdramsys PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(DRAMSys_libdramsys PUBLIC LPDDR5_SIM)

View File

@@ -1,10 +0,0 @@
########################################
### nlohmann_json ###
########################################
project(nlohmann_json VERSION 3.11.2)
add_library(${PROJECT_NAME} INTERFACE)
target_include_directories(${PROJECT_NAME} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})

File diff suppressed because it is too large Load Diff

View File

@@ -1,176 +0,0 @@
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
// | | |__ | | | | | | version 3.11.2
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_
#define INCLUDE_NLOHMANN_JSON_FWD_HPP_
#include <cstdint> // int64_t, uint64_t
#include <map> // map
#include <memory> // allocator
#include <string> // string
#include <vector> // vector
// #include <nlohmann/detail/abi_macros.hpp>
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
// | | |__ | | | | | | version 3.11.2
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
// This file contains all macro definitions affecting or depending on the ABI
#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK
#if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH)
#if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 2
#warning "Already included a different version of the library!"
#endif
#endif
#endif
#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum)
#define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum)
#define NLOHMANN_JSON_VERSION_PATCH 2 // NOLINT(modernize-macro-to-enum)
#ifndef JSON_DIAGNOSTICS
#define JSON_DIAGNOSTICS 0
#endif
#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
#define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0
#endif
#if JSON_DIAGNOSTICS
#define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag
#else
#define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS
#endif
#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
#define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp
#else
#define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON
#endif
#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION
#define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0
#endif
// Construct the namespace ABI tags component
#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b
#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \
NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b)
#define NLOHMANN_JSON_ABI_TAGS \
NLOHMANN_JSON_ABI_TAGS_CONCAT( \
NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \
NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON)
// Construct the namespace version component
#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \
_v ## major ## _ ## minor ## _ ## patch
#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \
NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch)
#if NLOHMANN_JSON_NAMESPACE_NO_VERSION
#define NLOHMANN_JSON_NAMESPACE_VERSION
#else
#define NLOHMANN_JSON_NAMESPACE_VERSION \
NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \
NLOHMANN_JSON_VERSION_MINOR, \
NLOHMANN_JSON_VERSION_PATCH)
#endif
// Combine namespace components
#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b
#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \
NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b)
#ifndef NLOHMANN_JSON_NAMESPACE
#define NLOHMANN_JSON_NAMESPACE \
nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \
NLOHMANN_JSON_ABI_TAGS, \
NLOHMANN_JSON_NAMESPACE_VERSION)
#endif
#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN
#define NLOHMANN_JSON_NAMESPACE_BEGIN \
namespace nlohmann \
{ \
inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \
NLOHMANN_JSON_ABI_TAGS, \
NLOHMANN_JSON_NAMESPACE_VERSION) \
{
#endif
#ifndef NLOHMANN_JSON_NAMESPACE_END
#define NLOHMANN_JSON_NAMESPACE_END \
} /* namespace (inline namespace) NOLINT(readability/namespace) */ \
} // namespace nlohmann
#endif
/*!
@brief namespace for Niels Lohmann
@see https://github.com/nlohmann
@since version 1.0.0
*/
NLOHMANN_JSON_NAMESPACE_BEGIN
/*!
@brief default JSONSerializer template argument
This serializer ignores the template arguments and uses ADL
([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl))
for serialization.
*/
template<typename T = void, typename SFINAE = void>
struct adl_serializer;
/// a class to store JSON values
/// @sa https://json.nlohmann.me/api/basic_json/
template<template<typename U, typename V, typename... Args> class ObjectType =
std::map,
template<typename U, typename... Args> class ArrayType = std::vector,
class StringType = std::string, class BooleanType = bool,
class NumberIntegerType = std::int64_t,
class NumberUnsignedType = std::uint64_t,
class NumberFloatType = double,
template<typename U> class AllocatorType = std::allocator,
template<typename T, typename SFINAE = void> class JSONSerializer =
adl_serializer,
class BinaryType = std::vector<std::uint8_t>, // cppcheck-suppress syntaxError
class CustomBaseClass = void>
class basic_json;
/// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document
/// @sa https://json.nlohmann.me/api/json_pointer/
template<typename RefStringType>
class json_pointer;
/*!
@brief default specialization
@sa https://json.nlohmann.me/api/json/
*/
using json = basic_json<>;
/// @brief a minimal map-like container that preserves insertion order
/// @sa https://json.nlohmann.me/api/ordered_map/
template<class Key, class T, class IgnoredLess, class Allocator>
struct ordered_map;
/// @brief specialization that maintains the insertion order of object keys
/// @sa https://json.nlohmann.me/api/ordered_json/
using ordered_json = basic_json<nlohmann::ordered_map>;
NLOHMANN_JSON_NAMESPACE_END
#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_

View File

@@ -38,16 +38,18 @@
project(DRAMSys_Configuration)
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS *.cpp)
file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS *.h;*.hpp)
add_library(${PROJECT_NAME} ${SOURCE_FILES} ${HEADER_FILES})
add_library(${PROJECT_NAME}
DRAMSys/config/DRAMSysConfiguration.cpp
DRAMSys/config/memspec/MemArchitectureSpec.cpp
DRAMSys/config/memspec/MemPowerSpec.cpp
DRAMSys/config/memspec/MemTimingSpec.cpp
)
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(${PROJECT_NAME}
PUBLIC
DRAMSys::util
nlohmann_json::nlohmann_json
)
target_compile_definitions(${PROJECT_NAME}
@@ -56,5 +58,3 @@ target_compile_definitions(${PROJECT_NAME}
)
add_library(DRAMSys::config ALIAS ${PROJECT_NAME})
build_source_group()

View File

@@ -34,18 +34,17 @@
* Derek Christ
*/
#ifndef DRAMSYS_UTIL_JSON_H
#define DRAMSYS_UTIL_JSON_H
#ifndef DRAMSYSCONFIGURATION_JSON_H
#define DRAMSYSCONFIGURATION_JSON_H
#include "nlohmann/json.hpp"
#include <nlohmann/json.hpp>
#include <optional>
#include <string>
#include <variant>
using json_t = nlohmann::json;
namespace DRAMSys::util
namespace DRAMSys::Config
{
// See https://www.kdab.com/jsonify-with-nlohmann-json/
// Try to set the value of type T into the variant data if it fails, do nothing
@@ -98,7 +97,7 @@ template <typename T> void extended_from_json(const char* key, const nlohmann::j
j.at(key).get_to(value);
}
} // namespace DRAMSys::util
} // namespace DRAMSys::Config
NLOHMANN_JSON_NAMESPACE_BEGIN
@@ -112,7 +111,7 @@ template <typename... Ts> struct adl_serializer<std::variant<Ts...>>
static void from_json(const nlohmann::json& j, std::variant<Ts...>& data)
{
// Call variant_from_json for all types, only one will succeed
(DRAMSys::util::variant_from_json<Ts>(j, data), ...);
(DRAMSys::Config::variant_from_json<Ts>(j, data), ...);
}
};
@@ -148,9 +147,9 @@ NLOHMANN_JSON_NAMESPACE_END
// NOLINTBEGIN(cppcoreguidelines-macro-usage)
#define EXTEND_JSON_TO(v1) \
DRAMSys::util::extended_to_json(#v1, nlohmann_json_j, nlohmann_json_t.v1);
DRAMSys::Config::extended_to_json(#v1, nlohmann_json_j, nlohmann_json_t.v1);
#define EXTEND_JSON_FROM(v1) \
DRAMSys::util::extended_from_json(#v1, nlohmann_json_j, nlohmann_json_t.v1);
DRAMSys::Config::extended_from_json(#v1, nlohmann_json_j, nlohmann_json_t.v1);
#define NLOHMANN_JSONIFY_ALL_THINGS(Type, ...) \
inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) \
@@ -164,4 +163,4 @@ NLOHMANN_JSON_NAMESPACE_END
// NOLINTEND(cppcoreguidelines-macro-usage)
#endif // DRAMSYS_UTIL_JSON_H
#endif // DRAMSYSCONFIGURATION_JSON_H

View File

@@ -38,17 +38,69 @@
project(DRAMSys_libdramsys)
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS *.cpp)
file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS *.h;*.hpp)
add_library(${PROJECT_NAME} ${SOURCE_FILES} ${HEADER_FILES})
add_library(${PROJECT_NAME}
DRAMSys/common/DebugManager.cpp
DRAMSys/common/TlmRecorder.cpp
DRAMSys/common/dramExtensions.cpp
DRAMSys/common/utils.cpp
DRAMSys/configuration/memspec/MemSpec.cpp
DRAMSys/configuration/memspec/MemSpecDDR3.cpp
DRAMSys/configuration/memspec/MemSpecDDR4.cpp
DRAMSys/configuration/memspec/MemSpecGDDR5.cpp
DRAMSys/configuration/memspec/MemSpecGDDR5X.cpp
DRAMSys/configuration/memspec/MemSpecGDDR6.cpp
DRAMSys/configuration/memspec/MemSpecHBM2.cpp
DRAMSys/configuration/memspec/MemSpecLPDDR4.cpp
DRAMSys/configuration/memspec/MemSpecSTTMRAM.cpp
DRAMSys/configuration/memspec/MemSpecWideIO.cpp
DRAMSys/configuration/memspec/MemSpecWideIO2.cpp
DRAMSys/controller/BankMachine.cpp
DRAMSys/controller/Command.cpp
DRAMSys/controller/Controller.cpp
DRAMSys/controller/ControllerRecordable.cpp
DRAMSys/controller/McConfig.cpp
DRAMSys/controller/checker/CheckerDDR3.cpp
DRAMSys/controller/checker/CheckerDDR4.cpp
DRAMSys/controller/checker/CheckerGDDR5.cpp
DRAMSys/controller/checker/CheckerGDDR5X.cpp
DRAMSys/controller/checker/CheckerGDDR6.cpp
DRAMSys/controller/checker/CheckerHBM2.cpp
DRAMSys/controller/checker/CheckerLPDDR4.cpp
DRAMSys/controller/checker/CheckerSTTMRAM.cpp
DRAMSys/controller/checker/CheckerWideIO.cpp
DRAMSys/controller/checker/CheckerWideIO2.cpp
DRAMSys/controller/cmdmux/CmdMuxOldest.cpp
DRAMSys/controller/cmdmux/CmdMuxStrict.cpp
DRAMSys/controller/powerdown/PowerDownManagerDummy.cpp
DRAMSys/controller/powerdown/PowerDownManagerStaggered.cpp
DRAMSys/controller/refresh/RefreshManagerAllBank.cpp
DRAMSys/controller/refresh/RefreshManagerDummy.cpp
DRAMSys/controller/refresh/RefreshManagerPer2Bank.cpp
DRAMSys/controller/refresh/RefreshManagerPerBank.cpp
DRAMSys/controller/refresh/RefreshManagerSameBank.cpp
DRAMSys/controller/respqueue/RespQueueFifo.cpp
DRAMSys/controller/respqueue/RespQueueReorder.cpp
DRAMSys/controller/scheduler/BufferCounterBankwise.cpp
DRAMSys/controller/scheduler/BufferCounterReadWrite.cpp
DRAMSys/controller/scheduler/BufferCounterShared.cpp
DRAMSys/controller/scheduler/SchedulerFifo.cpp
DRAMSys/controller/scheduler/SchedulerFrFcfs.cpp
DRAMSys/controller/scheduler/SchedulerFrFcfsGrp.cpp
DRAMSys/controller/scheduler/SchedulerGrpFrFcfs.cpp
DRAMSys/controller/scheduler/SchedulerGrpFrFcfsWm.cpp
DRAMSys/simulation/AddressDecoder.cpp
DRAMSys/simulation/Arbiter.cpp
DRAMSys/simulation/DRAMSys.cpp
DRAMSys/simulation/Dram.cpp
DRAMSys/simulation/DramRecordable.cpp
DRAMSys/simulation/SimConfig.cpp
)
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(${PROJECT_NAME}
PUBLIC
SystemC::systemc
DRAMSys::util
DRAMSys::config
sqlite3::sqlite3
)
@@ -59,5 +111,3 @@ if (DRAMSYS_WITH_DRAMPOWER)
endif ()
add_library(DRAMSys::libdramsys ALIAS ${PROJECT_NAME})
build_source_group()

View File

@@ -40,12 +40,19 @@
project(DRAMSys_Simulator)
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS *.cpp)
file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS *.h;*.hpp)
list(FILTER SOURCE_FILES EXCLUDE REGEX "main.cpp")
add_library(${PROJECT_NAME} ${SOURCE_FILES} ${HEADER_FILES})
add_library(${PROJECT_NAME}
simulator/Cache.cpp
simulator/EccModule.cpp
simulator/MemoryManager.cpp
simulator/Simulator.cpp
simulator/generator/RandomProducer.cpp
simulator/generator/SequentialProducer.cpp
simulator/generator/TrafficGenerator.cpp
simulator/hammer/RowHammer.cpp
simulator/player/StlPlayer.cpp
simulator/request/RequestIssuer.cpp
simulator/util.cpp
)
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
@@ -65,5 +72,3 @@ target_link_libraries(DRAMSys
PRIVATE
DRAMSys_Simulator
)
build_source_group()

View File

@@ -40,9 +40,6 @@
project(TraceAnalyzer)
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS *.cpp)
file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS *.h;*.hpp)
# Add Python3 Dependency:
find_package(Python3 COMPONENTS Development Interpreter)
@@ -76,7 +73,41 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_executable(TraceAnalyzer ${SOURCE_FILES} ${HEADER_FILES})
add_executable(TraceAnalyzer
businessObjects/commentmodel.cpp
businessObjects/configmodels.cpp
businessObjects/phases/phase.cpp
businessObjects/phases/phasefactory.cpp
businessObjects/pythoncaller.cpp
businessObjects/timespan.cpp
businessObjects/traceplotlinemodel.cpp
businessObjects/transaction.cpp
data/tracedb.cpp
evaluationtool.cpp
gototimedialog.cpp
main.cpp
presentation/debugmessagetreewidget.cpp
presentation/selectedtransactiontreewidget.cpp
presentation/tracePlotMouseLabel.cpp
presentation/tracedrawing.cpp
presentation/tracedrawingproperties.cpp
presentation/tracemetrictreewidget.cpp
presentation/tracenavigator.cpp
presentation/traceplot.cpp
presentation/traceplotitem.cpp
presentation/tracescroller.cpp
presentation/transactiontreewidget.cpp
presentation/util/clkgrid.cpp
presentation/util/colorgenerator.cpp
presentation/util/colorobject.cpp
presentation/util/customlabelscaledraw.cpp
presentation/util/testlight.cpp
presentation/util/togglecollapsedaction.cpp
queryeditor.cpp
selectmetrics.cpp
traceanalyzer.cpp
tracefiletab.cpp
)
target_include_directories(TraceAnalyzer
PRIVATE
@@ -90,7 +121,6 @@ target_link_libraries(TraceAnalyzer
${QWT_LIBRARY}
Qt5::Widgets
Qt5::Sql
DRAMSys::util
DRAMSys::config
)
@@ -100,5 +130,3 @@ target_compile_definitions(${PROJECT_NAME}
PRIVATE
DRAMSYS_TRACE_ANALYZER_EXTENSION_DIR="${DRAMSYS_TRACE_ANALYZER_EXTENSION_DIR}"
)
build_source_group()

View File

@@ -1,61 +0,0 @@
# Copyright (c) 2021, RPTU Kaiserslautern-Landau
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Authors:
# Derek Christ
# Thomas Psota
########################################
### DRAMSys::util ###
########################################
project(DRAMSys_Util)
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS *.cpp)
file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS *.h;*.hpp)
add_library(${PROJECT_NAME} ${SOURCE_FILES} ${HEADER_FILES})
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(${PROJECT_NAME}
PUBLIC
nlohmann_json::nlohmann_json
)
target_compile_definitions(${PROJECT_NAME}
PUBLIC
DRAMSYS_RESOURCE_DIR="${DRAMSYS_RESOURCE_DIR}"
)
add_library(DRAMSys::util ALIAS ${PROJECT_NAME})
build_source_group()

View File

@@ -1,41 +0,0 @@
/*
* Copyright (c) 2021, RPTU Kaiserslautern-Landau
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Authors:
* Thomas Psota
*/
#include "util.h"
namespace DRAMSys::util
{
}

View File

@@ -1,44 +0,0 @@
/*
* Copyright (c) 2021, RPTU Kaiserslautern-Landau
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Authors:
* Thomas Psota
*/
#ifndef DRAMSYS_UTIL_UTIL_H
#define DRAMSYS_UTIL_UTIL_H
namespace DRAMSys::util
{
}
#endif

View File

@@ -3,5 +3,4 @@ set(DRAMSYS_TEST_RESOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/resources")
add_subdirectory(tests_configuration)
add_subdirectory(tests_dramsys)
add_subdirectory(tests_regression)
add_subdirectory(tests_util)
add_subdirectory(tests_simulator)

View File

@@ -4,7 +4,10 @@
project(tests_configuration)
add_executable(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/test_configuration.cpp)
add_executable(${PROJECT_NAME}
test_configuration.cpp
test_json.cpp
)
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER tests/configuration)
@@ -20,5 +23,3 @@ gtest_discover_tests(${PROJECT_NAME}
add_executable(jsonconverter ${CMAKE_CURRENT_SOURCE_DIR}/jsonconverter.cpp)
target_link_libraries(jsonconverter PRIVATE DRAMSys::config)
set_target_properties(jsonconverter PROPERTIES FOLDER tests/configuration)
build_source_group()

View File

@@ -4,15 +4,17 @@
project(tests_dramsys)
file(GLOB_RECURSE SOURCE_FILES *.cpp)
file(GLOB_RECURSE HEADER_FILES *.h)
add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${HEADER_FILES})
add_executable(${PROJECT_NAME}
AddressDecoderTests.cpp
b_transport/b_transport.cpp
main.cpp
test_misc.cpp
test_utils.cpp
)
target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_SOURCE_DIR})
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER tests)
target_link_libraries(${PROJECT_NAME}
DRAMSys::util
DRAMSys::libdramsys
gtest_main
)
@@ -20,5 +22,3 @@ target_link_libraries(${PROJECT_NAME}
gtest_discover_tests(${PROJECT_NAME}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
build_source_group()

View File

@@ -21,5 +21,3 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
gtest_discover_tests(${PROJECT_NAME}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
build_source_group()

View File

@@ -1,21 +0,0 @@
###############################################
### tests_util ###
###############################################
project(tests_util)
file(GLOB_RECURSE SOURCE_FILES *.cpp)
file(GLOB_RECURSE HEADER_FILES *.h)
add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${HEADER_FILES})
target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_SOURCE_DIR})
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER tests)
target_link_libraries(${PROJECT_NAME}
DRAMSys::util
gtest_main
)
gtest_discover_tests(${PROJECT_NAME})
build_source_group()