Merge branch 'feat/find_systemc' into 'develop'
Find preinstalled SystemC library with FetchContent. See merge request ems/astdm/modeling.dram/dram.sys.5!24
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -132,14 +131,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)
|
||||
|
||||
@@ -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)**.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user