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 <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Zhengrong Wang
2023-02-10 22:34:28 -08:00
parent 39e813374c
commit b6a591e203

View File

@@ -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,