From f6ebf440fcb96239da960a7818236b37fad0c2de Mon Sep 17 00:00:00 2001 From: Derek Christ Date: Fri, 31 May 2024 09:59:16 +0200 Subject: [PATCH] Update the Readme in regards to CMake configuration --- README.md | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index b943deda..0533c8b2 100644 --- a/README.md +++ b/README.md @@ -58,21 +58,26 @@ To use DRAMSys, first clone the repository. ### Dependencies -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. +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) and set the CMake option `DRAMSYS_USE_EXTERNAL_SYSTEMC`. 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 traffic generators, 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, first configure the project using CMake, then build the project: -```bash +```console $ cd DRAMSys -$ mkdir build -$ cd build -$ cmake .. -$ make +$ cmake -S . -B build +$ cmake --build build ``` -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 include **DRAMPower** in your build enable the CMake option `DRAMSYS_WITH_DRAMPOWER`: +```console +$ cmake -B build -D DRAMSYS_WITH_DRAMPOWER=Y +``` + +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`. + +In order to include any proprietary extensions such as the Trace Analyzer, enable the CMake option `DRAMSYS_ENABLE_EXTENSIONS`. To build DRAMSys on Windows 10 we recommend to use the **Windows Subsystem for Linux (WSL)**. @@ -80,7 +85,7 @@ To build DRAMSys on Windows 10 we recommend to use the **Windows Subsystem for L From the build directory use the commands below to execute the DRAMSys standalone. -```bash +```console $ cd bin $ ./DRAMSys ``` @@ -89,13 +94,13 @@ The default configuration file is *ddr4-example.json* located in *configs/*, the To run DRAMSys with a specific configuration file: -```bash +```console $ ./DRAMSys ../../configs/lpddr4-example.json ``` To run DRAMSys with a specific configuration file and configuration folder: -```bash +```console $ ./DRAMSys ../../tests/tests_regression/DDR3/ddr3-example.json ../../tests/tests_regression/DDR3/ ``` @@ -109,13 +114,13 @@ There are two ways to couple DRAMSys with **gem5**: ## Development Some additional development sources required for tests may be obtained using Git LFS. Make sure to have Git LFS installed through your system's package manager and set up for your user: -```bash -git lfs install +```console +$ git lfs install ``` To make the additional files available, run: -```bash -git lfs pull +```console +$ git lfs pull ``` ## Acknowledgements