Added first CMAKE configuration

A first CMAKE configuration was added. Right now it was just tested
under Debian linux in the WSL context. Further tests on native Windows,
Linux and macOS have to be performed.
This commit is contained in:
Matthias Jung
2020-02-25 23:58:47 +01:00
parent cc9f436e13
commit f4a0e9fded
3 changed files with 205 additions and 0 deletions

23
DRAMSys/CMakeLists.txt Normal file
View File

@@ -0,0 +1,23 @@
cmake_minimum_required(VERSION 3.10)
# Project Name
project(DRAMSys)
# Add SystemC Dependency:
find_package(SystemCLanguage CONFIG REQUIRED PATHS "/opt/systemc/lib/cmake")
# Add sqlite3 Dependency:
FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3)
# Add DRAMSysLibrary:
add_subdirectory(library)
# Add TraceAnalyzer:
add_subdirectory(traceAnalyzer)
set (CMAKE_CXX_STANDARD 11)
add_executable(DRAMSys simulator/main.cpp)
target_include_directories(DRAMSys PUBLIC DRAMSysLibrary library/src/simulation)
target_link_libraries(DRAMSys SystemC::systemc sqlite3 DRAMSysLibrary)

View File

@@ -0,0 +1,102 @@
cmake_minimum_required(VERSION 3.10)
# Project Name
project(DRAMSysLibrary)
# Add SystemC Dependency:
find_package(SystemCLanguage CONFIG REQUIRED PATHS "/opt/systemc/lib/cmake")
set (CMAKE_CXX_STANDARD 11)
add_subdirectory(src/common/third_party/DRAMPower)
include_directories(
src/simulation
src/simulation/dram
src/controller
src/controller/checker
src/controller/cmdmux
src/controller/powerdown
src/controller/refresh
src/controller/scheduler
src/common
src/common/third_party/DRAMPower/src
src/configuration
src/configuration/memspec
src/error
src/error/ECC
)
add_library(DRAMSysLibrary
src/common/third_party/tinyxml2/tinyxml2.cpp
src/common/TlmRecorder.cpp
src/common/DebugManager.cpp
src/configuration/Configuration.cpp
src/simulation/MemoryManager.cpp
src/simulation/TemperatureController.cpp
src/configuration/ConfigurationLoader.cpp
src/controller/Command.cpp
src/error/errormodel.cpp
src/simulation/TracePlayer.cpp
src/simulation/TraceSetup.cpp
src/simulation/DRAMSys.cpp
src/simulation/Setup.cpp
src/error/ECC/Bit.cpp
src/error/ECC/ECC.cpp
src/error/ECC/Word.cpp
src/error/eccbaseclass.cpp
src/error/ecchamming.cpp
src/common/AddressDecoder.cpp
src/simulation/dram/Dram.cpp
src/simulation/Arbiter.cpp
src/common/CongenAddressDecoder.cpp
src/common/XmlAddressDecoder.cpp
src/common/timingCalculations.cpp
src/common/dramExtensions.cpp
src/common/utils.cpp
src/simulation/dram/DramDDR3.cpp
src/simulation/dram/DramDDR4.cpp
src/simulation/dram/DramRecordable.cpp
src/simulation/dram/DramWideIO.cpp
src/configuration/memspec/MemSpec.cpp
src/controller/BankMachine.cpp
src/controller/Controller.cpp
src/controller/scheduler/SchedulerFifo.cpp
src/controller/scheduler/SchedulerFrFcfs.cpp
src/controller/cmdmux/CmdMuxStrict.cpp
src/controller/cmdmux/CmdMuxOldest.cpp
src/controller/ControllerRecordable.cpp
src/controller/checker/CheckerDDR3.cpp
src/controller/refresh/RefreshManager.cpp
src/controller/refresh/RefreshManagerDummy.cpp
src/controller/refresh/RefreshManagerBankwise.cpp
src/controller/checker/CheckerWideIO.cpp
src/configuration/memspec/MemSpecDDR3.cpp
src/configuration/memspec/MemSpecDDR4.cpp
src/configuration/memspec/MemSpecWideIO.cpp
src/configuration/memspec/MemSpecLPDDR4.cpp
src/controller/checker/CheckerDDR4.cpp
src/simulation/dram/DramLPDDR4.cpp
src/controller/checker/CheckerLPDDR4.cpp
src/configuration/memspec/MemSpecWideIO2.cpp
src/simulation/dram/DramWideIO2.cpp
src/controller/checker/CheckerWideIO2.cpp
src/configuration/memspec/MemSpecHBM2.cpp
src/simulation/dram/DramHBM2.cpp
src/controller/checker/CheckerHBM2.cpp
src/configuration/memspec/MemSpecGDDR5.cpp
src/configuration/memspec/MemSpecGDDR5X.cpp
src/configuration/memspec/MemSpecGDDR6.cpp
src/controller/checker/CheckerGDDR5.cpp
src/controller/checker/CheckerGDDR5X.cpp
src/controller/checker/CheckerGDDR6.cpp
src/simulation/dram/DramGDDR5.cpp
src/simulation/dram/DramGDDR5X.cpp
src/simulation/dram/DramGDDR6.cpp
src/controller/powerdown/PowerDownManagerStaggered.cpp
src/controller/powerdown/PowerDownManagerDummy.cpp
)
target_include_directories(DRAMSysLibrary PUBLIC src/common/third_party/DRAMPower/src)
target_link_libraries(DRAMSysLibrary DRAMPower SystemC::systemc)

View File

@@ -0,0 +1,80 @@
cmake_minimum_required(VERSION 3.10)
# Project Name
project(TraceAnalyzer)
# Add SystemC Dependency:
find_package(SystemCLanguage CONFIG REQUIRED PATHS "/opt/systemc/lib/cmake")
# Add Python Dependency:
find_library(PYTHON3_LIBRARY NAMES Python3)
# Add sqlite3 Dependency:
find_package(PythonLibs REQUIRED)
# Add QWT Dependency:
find_library(QWT_LIBRARY NAMES "qwt-qt5" "qwt")
find_path (QWT_INCLUDE_DIRS NAMES "qwt_plot.h" PATHS "/usr/include/qwt-qt5" "/usr/include/qwt")
message(${QWT_LIBRARY})
# Add QT Library
find_package(Qt5 COMPONENTS Core Gui Widgets Sql REQUIRED)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set (CMAKE_CXX_STANDARD 11)
include_directories(
${QWT_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
./
businessObjects/
businessObjects/phases/
data/
presentation/
presentation/util/
)
add_executable(TraceAnalyzer
main.cpp
businessObjects/transaction.cpp
businessObjects/timespan.cpp
data/tracedb.cpp
presentation/tracenavigator.cpp
presentation/util/colorgenerator.cpp
presentation/tracedrawing.cpp
presentation/traceplotitem.cpp
gototimedialog.cpp
presentation/traceplot.cpp
tracefiletab.cpp
presentation/pornotracescroller.cpp
traceanalyzer.cpp
presentation/transactiontreewidget.cpp
presentation/commenttreewidget.cpp
presentation/util/clkgrid.cpp
queryeditor.cpp
presentation/selectedtransactiontreewidget.cpp
businessObjects/phases/phasefactory.cpp
presentation/debugmessagetreewidget.cpp
presentation/tracePlotMouseLabel.cpp
evaluationtool.cpp
selectmetrics.cpp
presentation/util/testlight.cpp
presentation/tracetesttreewidget.cpp
businessObjects/pythoncaller.cpp
businessObjects/tracetestresults.cpp
presentation/tracemetrictreewidget.cpp
businessObjects/phases/phase.cpp
)
#target_include_directories(TraceAnalyzer PUBLIC qwt-qt5)
target_link_libraries(TraceAnalyzer
${PYTHON_LIBRARIES}
${QWT_LIBRARY}
)
qt5_use_modules(TraceAnalyzer Widgets Sql)