added debug message capabilities to scheduler

This commit is contained in:
robert
2014-07-01 11:01:52 +02:00
parent 2b062b86ff
commit 37c147ba2f
7 changed files with 31 additions and 12 deletions

View File

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

View File

@@ -8,24 +8,22 @@
<addressmapping>am_wideio.xml</addressmapping>
<memconfigs>
<!-- <memconfig>fifo.xml</memconfig>
<memconfig>fr_fcfs.xml</memconfig>
--> <memconfig>par_bs.xml</memconfig>
<!-- <memconfig>fifo.xml</memconfig>
<memconfig>fr_fcfs.xml</memconfig> -->
<memconfig>par_bs.xml</memconfig>
</memconfigs>
<trace-setups>
<trace-setup id="aes">
<!-- <trace-setup id="aes">
<device>chstone-aes_32.stl</device>
</trace-setup>
<trace-setup id="motion">
<device>chstone-motion.stl</device>
</trace-setup>
<device>chstone-motion_32.stl</device>
</trace-setup> -->
<trace-setup id="media">
<device>mediabench-fractal_32.stl</device>
<device>mediabench-epic_32.stl</device>
<device>mediabench-epic_32.stl</device>
</trace-setup>
</trace-setups>

View File

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

View File

@@ -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());
}

View File

@@ -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);
}

View File

@@ -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);
};
}

View File

@@ -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);