From a09a97423b105b29d42790890e789e753fd839e9 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Mon, 22 May 2023 11:44:20 +0200 Subject: [PATCH 1/3] Search for existing SystemC library in FetchContent. --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cdf6184..c495f257 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,14 +132,15 @@ endif() # add_library(sqlite::sqlite3 ALIAS SQLite3) ### SystemC ### +list(APPEND CMAKE_PREFIX_PATH $ENV{SYSTEMC_HOME} /opt/systemc/) FetchContent_Declare( systemc GIT_REPOSITORY https://github.com/accellera-official/systemc.git - GIT_TAG 2.3.4) + GIT_TAG 2.3.4 + FIND_PACKAGE_ARGS NAMES SystemCLanguage) set(DISABLE_COPYRIGHT_MESSAGE True) FetchContent_MakeAvailable(systemc) -set_target_properties(systemc PROPERTIES FOLDER lib) ### DRAMPower ### if (DRAMSYS_WITH_DRAMPOWER) From 0419bf3905d8b3e031b2124b513bac428fa907cb Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Tue, 23 May 2023 13:37:09 +0200 Subject: [PATCH 2/3] Update minimum CMake version. --- CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c495f257..662b8426 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Technische Universität Kaiserslautern +# Copyright (c) 2023, Technische Universität Kaiserslautern # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -34,10 +34,9 @@ ############################################### ### DRAMSys ### ############################################### -cmake_minimum_required(VERSION 3.13.0) +cmake_minimum_required(VERSION 3.24.0) -set(PROJECT_NAME "DRAMSys 5.0") -set(PROJECT_SHORTNAME "DRAMSys") +set(PROJECT_NAME "DRAMSys") project(${PROJECT_NAME} VERSION "5.0") From 0da9b6d14ac86794f3cbfdb3e4d8e62e4ca3ca55 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Tue, 23 May 2023 13:53:51 +0200 Subject: [PATCH 3/3] Update readme. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1fcd24b0..73f16bcd 100644 --- a/README.md +++ b/README.md @@ -51,11 +51,11 @@ Start using DRAMSys by cloning the repository. ### Dependencies -DRAMSys requires a **C++17** compiler. The build process is based on **CMake** (minimum version **3.13**). Furthermore, the simulator is based on **SystemC**. SystemC is included as a submodule and will be build automatically with the project. If you want to use an external SystemC version, export the environment variables `SYSTEMC_HOME` (SystemC root directory) and `SYSTEMC_TARGET_ARCH` (e.g., linux64). +DRAMSys requires a **C++17** compiler. The build process is based on **CMake** (minimum version **3.24**). Furthermore, the simulator is based on **SystemC**. SystemC is included with FetchContent and will be build automatically with the project. If you want to use a preinstalled SystemC version, export the environment variable `SYSTEMC_HOME` (SystemC installation directory). Also make sure that the SystemC library was built with the same C++ version. ### Building DRAMSys -To build the standalone simulator for running memory trace files or a traffic generator, create a build folder in the project root directory, then run CMake and make: +To build the standalone simulator for running memory trace files or traffic generators, create a build folder in the project root directory, then run CMake and make: ```bash $ cd DRAMSys @@ -65,7 +65,7 @@ $ cmake .. $ make ``` -To include **DRAMPower** in your build enable the CMake option `DRAMSYS_WITH_DRAMPOWER`. If you plan to integrate DRAMSys into your own SystemC TLM-2.0 project you can build the DRAMSys library only by disabling the CMake option `DRAMSYS_BUILD_CLI`. +To include **DRAMPower** in your build enable the CMake option `DRAMSYS_WITH_DRAMPOWER`. If you plan to integrate DRAMSys into your own SystemC TLM-2.0 project you can build only the DRAMSys library by disabling the CMake option `DRAMSYS_BUILD_CLI`. To build DRAMSys on Windows 10 we recommend to use the **Windows Subsystem for Linux (WSL)**.