From b6a591e20385f7ea2f08b1a349620cd802f30cd4 Mon Sep 17 00:00:00 2001 From: Zhengrong Wang Date: Fri, 10 Feb 2023 22:34:28 -0800 Subject: [PATCH] mem-dram: Make sure SHOW_SIM_OUTPUT is in global namespace. As stated in the comment, SHOW_SIM_OUTPUT is declared extern in the DRAMSim2 print macros. Therefore, it should be defined in the global namespace, not in gem5 namespace. Change-Id: I05245a48ac706b46085ffa8d00db3725ce16a89e Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67859 Maintainer: Jason Lowe-Power Reviewed-by: Jason Lowe-Power Tested-by: kokoro --- src/mem/dramsim2_wrapper.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mem/dramsim2_wrapper.cc b/src/mem/dramsim2_wrapper.cc index c622c1cb57..b9bcf14c08 100644 --- a/src/mem/dramsim2_wrapper.cc +++ b/src/mem/dramsim2_wrapper.cc @@ -54,12 +54,6 @@ #include "base/compiler.hh" #include "base/logging.hh" -namespace gem5 -{ - -namespace memory -{ - /** * DRAMSim2 requires SHOW_SIM_OUTPUT to be defined (declared extern in * the DRAMSim2 print macros), otherwise we get linking errors due to @@ -67,6 +61,12 @@ namespace memory */ int SHOW_SIM_OUTPUT = 0; +namespace gem5 +{ + +namespace memory +{ + DRAMSim2Wrapper::DRAMSim2Wrapper(const std::string& config_file, const std::string& system_file, const std::string& working_dir,