From 9d8601d691e2f2154bb8e3d9c8137fef85ac3c03 Mon Sep 17 00:00:00 2001 From: Derek Christ Date: Fri, 17 Jun 2022 17:26:41 +0200 Subject: [PATCH] Forward declare DRAMPower Forward declare DRAMPower so that it is no longer part of the public API and programs that use DRAMSys do not need to depend on it. --- DRAMSys/library/CMakeLists.txt | 2 +- DRAMSys/library/src/simulation/dram/Dram.cpp | 1 + DRAMSys/library/src/simulation/dram/Dram.h | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DRAMSys/library/CMakeLists.txt b/DRAMSys/library/CMakeLists.txt index 3b8eace5..f79f1787 100644 --- a/DRAMSys/library/CMakeLists.txt +++ b/DRAMSys/library/CMakeLists.txt @@ -240,7 +240,7 @@ endif() # Build: target_include_directories(DRAMSysLibrary - PUBLIC src/common/third_party/DRAMPower/src/ + PRIVATE src/common/third_party/DRAMPower/src/ PUBLIC $ENV{SYSTEMC_HOME}/include/ ) diff --git a/DRAMSys/library/src/simulation/dram/Dram.cpp b/DRAMSys/library/src/simulation/dram/Dram.cpp index e75096d8..004c39c0 100644 --- a/DRAMSys/library/src/simulation/dram/Dram.cpp +++ b/DRAMSys/library/src/simulation/dram/Dram.cpp @@ -56,6 +56,7 @@ #include "../../common/dramExtensions.h" #include "../../common/utils.h" #include "../../common/third_party/DRAMPower/src/MemCommand.h" +#include "../../common/third_party/DRAMPower/src/libdrampower/LibDRAMPower.h" #include "../../controller/Command.h" using namespace sc_core; diff --git a/DRAMSys/library/src/simulation/dram/Dram.h b/DRAMSys/library/src/simulation/dram/Dram.h index c5f06991..49a5ddfb 100644 --- a/DRAMSys/library/src/simulation/dram/Dram.h +++ b/DRAMSys/library/src/simulation/dram/Dram.h @@ -47,7 +47,8 @@ #include #include "../../configuration/Configuration.h" #include "../../configuration/memspec/MemSpec.h" -#include "../../common/third_party/DRAMPower/src/libdrampower/LibDRAMPower.h" + +class libDRAMPower; class Dram : public sc_core::sc_module {