47 lines
1.0 KiB
C++
47 lines
1.0 KiB
C++
/*
|
|
* RefreshManager.h
|
|
*
|
|
* Created on: Mar 29, 2014
|
|
* Author: robert
|
|
*/
|
|
|
|
#ifndef REFRESHMANAGER_H_
|
|
#define REFRESHMANAGER_H_
|
|
|
|
#include "IRefreshManager.h"
|
|
#include "../configuration/TimingConfiguration.h"
|
|
|
|
namespace core {
|
|
|
|
class ControllerCore;
|
|
|
|
class RefreshManager : public IRefreshManager
|
|
{
|
|
public:
|
|
RefreshManager(ControllerCore& controller);
|
|
virtual ~RefreshManager();
|
|
|
|
bool hasCollision(const CommandSchedule& schedule) override;
|
|
bool hasCollision(const ScheduledCommand& command) override;
|
|
void scheduleRefresh(tlm::tlm_generic_payload& payload, sc_time time) override;
|
|
|
|
void reInitialize(Bank bank, sc_time time) override;
|
|
|
|
bool isInvalidated(tlm::tlm_generic_payload& payload, sc_time time) override;
|
|
|
|
private:
|
|
ControllerCore& controller;
|
|
RefreshTiming& timing;
|
|
sc_time nextPlannedRefresh;
|
|
std::map<Bank, tlm::tlm_generic_payload> refreshPayloads;
|
|
|
|
void planNextRefresh();
|
|
|
|
void sendToAllBanks(ScheduledCommand& command);
|
|
void setupTransactions();
|
|
};
|
|
|
|
} /* namespace core */
|
|
|
|
#endif /* REFRESHMANAGER_H_ */
|