added no powerdown option

This commit is contained in:
Janik Schlemminger
2014-09-06 16:59:46 +02:00
parent e110d45e0e
commit 30b1fbbd0c
6 changed files with 83 additions and 7 deletions

View File

@@ -71,7 +71,8 @@ SOURCES += \
../src/controller/core/RowBufferStates.cpp \
../src/controller/scheduler/Scheduler.cpp \
../src/controller/scheduler/readwritegrouper.cpp \
../src/controller/core/configuration/ConfigurationLoader.cpp
../src/controller/core/configuration/ConfigurationLoader.cpp \
../src/controller/core/powerdown/NoPowerDown.cpp
HEADERS += \
../src/common/third_party/tinyxml2.h \
@@ -127,6 +128,7 @@ HEADERS += \
../src/controller/core/configuration/MemSpec.h \
../src/simulation/StlPlayer.h \
../src/simulation/TracePlayerListener.h \
../src/simulation/TraceGenerator.h
../src/simulation/TraceGenerator.h \
../src/controller/core/powerdown/NoPowerDown.h
../src/controller/core/configuration/ConfigurationLoader.h

View File

@@ -6,7 +6,7 @@
<MaxNrOfTransactions value="50" />
<Scheduler value="FR_FCFS" />
<Capsize value="5" />
<PowerDownMode value="Staggered" />
<PowerDownMode value="NoPowerDown" />
<PowerDownTimeout value="100" />
<!--
<Buswidth value="128" />

View File

@@ -3,15 +3,15 @@
<Debug value="1" />
</simconfig>
<memspecs>
<memspec src="/home/jonny/git/dram.vp.system/dram/resources/configs/memspecs/WideIO.xml"></memspec>
<memspec src="/home/schlemmi/dram/dram/resources/configs/memspecs/WideIO.xml"></memspec>
</memspecs>
<addressmappings>
<addressmapping src="/home/jonny/git/dram.vp.system/dram/resources/configs/amconfigs/am_wideio.xml"></addressmapping>
<addressmapping src="/home/schlemmi/dram/dram/resources/configs/amconfigs/am_wideio.xml"></addressmapping>
</addressmappings>
<memconfigs>
<!-- <memconfig>fr_fcfs.xml</memconfig>
-->
<memconfig src="/home/jonny/git/dram.vp.system/dram/resources/configs/memconfigs/fifo.xml">
<memconfig src="/home/schlemmi/dram/dram/resources/configs/memconfigs/fr_fcfs.xml">
<!-- <Debug value="1"></Debug>-->
</memconfig>
</memconfigs>

View File

@@ -23,8 +23,10 @@
#include "powerdown/PowerDownManager.h"
#include "powerdown/PowerDownManagerTimeout.h"
#include "powerdown/PowerDownManagerBankwise.h"
#include "powerdown/NoPowerDown.h"
#include "../../common/DebugManager.h"
namespace core {
std::string ControllerCore::senderName = "Controller Core";
@@ -58,14 +60,23 @@ ControllerCore::ControllerCore(IWrapperConnector& wrapperConnector, std::map<Ban
else
{
refreshManager = new RefreshManager(*this);
if(config.PowerDownMode == EPowerDownMode::Staggered)
{
powerDownManager = new PowerDownManager(*this);
}
else // TimeoutPDN or TimeoutSREF
else if(config.PowerDownMode == EPowerDownMode::TimeoutPDN || config.PowerDownMode == EPowerDownMode::TimeoutSREF)
{
powerDownManager = new PowerDownManagerTimeout(*this);
}
else if(config.PowerDownMode == EPowerDownMode::NoPowerDown)
{
powerDownManager = new NoPowerDown();
}
else
{
SC_REPORT_FATAL(0, "Unsupported powerdown mode in constructor of controller core");
}
}
}

View File

@@ -0,0 +1,26 @@
#include "NoPowerDown.h"
void core::NoPowerDown::triggerSleep(Bank /*bank*/, sc_time /*time*/)
{
return;
}
void core::NoPowerDown::sleep(Bank /*bank*/, sc_time /*time*/)
{
return;
}
void core::NoPowerDown::wakeUp(Bank /*bank*/, sc_time /*time*/)
{
return;
}
void core::NoPowerDown::wakeUpForRefresh(Bank /*bank*/, sc_time /*time*/)
{
return;
}
bool core::NoPowerDown::isInSelfRefresh(Bank /*bank*/)
{
return false;
}

View File

@@ -0,0 +1,37 @@
#ifndef NOPOWERDOWN_H
#define NOPOWERDOWN_H
/*
* PowerDownManagerTimeout.h
*
* Created on: May 5, 2014
* Author: jungma
*/
#include "PowerDownManager.h"
#include <systemc.h>
#include "../../../common/dramExtension.h"
#include "../scheduling/ScheduledCommand.h"
namespace core {
class NoPowerDown: public IPowerDownManager
{
public:
NoPowerDown(){}
virtual ~NoPowerDown(){}
virtual void triggerSleep(Bank bank, sc_time time) override;
virtual void sleep(Bank bank, sc_time time) override;
virtual void wakeUp(Bank bank, sc_time time) override;
virtual void wakeUpForRefresh(Bank bank, sc_time time) override;
virtual bool isInSelfRefresh(Bank bank) override;
};
}
#endif // NOPOWERDOWN_H