diff --git a/dram/dramSys/dramSys.pro b/dram/dramSys/dramSys.pro index b99145ed..8672da99 100644 --- a/dram/dramSys/dramSys.pro +++ b/dram/dramSys/dramSys.pro @@ -56,7 +56,8 @@ SOURCES += \ ../src/simulation/MemoryManager.cpp \ ../src/simulation/main.cpp \ ../src/common/libDRAMPower.cpp \ - ../src/controller/core/RowBufferStates.cpp + ../src/controller/core/RowBufferStates.cpp \ + ../src/controller/scheduler/Scheduler.cpp HEADERS += \ ../src/common/third_party/tinyxml2.h \ diff --git a/dram/resources/simulations/sim-batch.xml b/dram/resources/simulations/sim-batch.xml index 7dff121d..9d86048f 100644 --- a/dram/resources/simulations/sim-batch.xml +++ b/dram/resources/simulations/sim-batch.xml @@ -8,24 +8,22 @@ am_wideio.xml - par_bs.xml - + + par_bs.xml - + - mediabench-fractal_32.stl - mediabench-epic_32.stl + mediabench-epic_32.stl diff --git a/dram/src/common/DebugManager.h b/dram/src/common/DebugManager.h index 86c10258..38a0d442 100644 --- a/dram/src/common/DebugManager.h +++ b/dram/src/common/DebugManager.h @@ -25,7 +25,7 @@ public: bool writeToConsole; bool writeToFile; - void printDebugMessage(std::string message, std::string sender); + void printDebugMessage(std::string sender, std::string message); void openDebugFile(std::string filename) { if(debugFile) diff --git a/dram/src/controller/scheduler/PARBS.cpp b/dram/src/controller/scheduler/PARBS.cpp index 70e9e98e..b570ff93 100644 --- a/dram/src/controller/scheduler/PARBS.cpp +++ b/dram/src/controller/scheduler/PARBS.cpp @@ -44,15 +44,18 @@ bool PAR_BS::hasPayloads() void PAR_BS::schedule(gp* payload) { + printDebugMessage("hello!"); buffer->schedule(payload); } gp* PAR_BS::getNextPayload() { + printDebugMessage("hello!"); + if (!batch->hasPayloads()) { formBatch(); - cout << "Formed new batch at: " << sc_time_stamp() << std::endl; + printDebugMessage("Formed new batch"); sc_assert(batch->hasPayloads()); } diff --git a/dram/src/controller/scheduler/Scheduler.cpp b/dram/src/controller/scheduler/Scheduler.cpp new file mode 100644 index 00000000..b7bbbbb4 --- /dev/null +++ b/dram/src/controller/scheduler/Scheduler.cpp @@ -0,0 +1,12 @@ +#include "Scheduler.h" +#include "../../common/DebugManager.h" + +using namespace scheduler; + +std::string Scheduler::sendername = "scheduler"; + +void Scheduler::printDebugMessage(std::string message) +{ + DebugManager::getInstance().printDebugMessage(Scheduler::sendername, message); +} + diff --git a/dram/src/controller/scheduler/Scheduler.h b/dram/src/controller/scheduler/Scheduler.h index abb5b1d4..f0d86668 100644 --- a/dram/src/controller/scheduler/Scheduler.h +++ b/dram/src/controller/scheduler/Scheduler.h @@ -18,6 +18,10 @@ public: virtual bool hasPayloads() = 0; virtual gp* getNextPayload() = 0; virtual void removePayload(gp* payload) = 0; + static std::string sendername; + +protected: + void printDebugMessage(std::string message); }; } diff --git a/dram/src/simulation/Simulation.cpp b/dram/src/simulation/Simulation.cpp index 9121b9bf..ee0937ed 100644 --- a/dram/src/simulation/Simulation.cpp +++ b/dram/src/simulation/Simulation.cpp @@ -48,6 +48,7 @@ void Simulation::setupDebugManager(const string& traceName) dbg.addToWhiteList(player2->name()); dbg.addToWhiteList(player1->name()); dbg.addToWhiteList(this->name()); + dbg.addToWhiteList(Scheduler::sendername); dbg.addToWhiteList(TlmRecorder::senderName); dbg.addToWhiteList(ControllerCore::senderName); dbg.addToWhiteList(PowerDownManagerBankwise::senderName);