52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
/*
|
|
* controller.h
|
|
*
|
|
* Created on: Mar 5, 2014
|
|
* Author: jonny
|
|
*/
|
|
|
|
#ifndef CONTROLLER_H_
|
|
#define CONTROLLER_H_
|
|
|
|
#include <tlm.h>
|
|
#include "scheduling/CommandSequenceGenerator.h"
|
|
#include "CommandBus.h"
|
|
#include "Configuration.h"
|
|
#include "refresh/RefreshManager.h"
|
|
#include "powerdown/PowerDownManager.h"
|
|
#include <map>
|
|
#include "scheduling/checker/ICommandChecker.h"
|
|
#include "scheduling/CommandSequenceScheduler.h"
|
|
#include "tlm/IControllerWrapper.h"
|
|
|
|
namespace core {
|
|
|
|
class DramController
|
|
{
|
|
public:
|
|
DramController(IControllerWrapper& wrapper);
|
|
virtual ~DramController() ;
|
|
|
|
void schedule(sc_time currentTime, tlm::tlm_generic_payload& externalTransaction);
|
|
void scheduleRefresh(sc_time time);
|
|
const ICommandChecker& getChecker(Command command) const;
|
|
Configuration config;
|
|
|
|
private:
|
|
ControllerState state;
|
|
CommandSequenceGenerator commandSequenceGenerator;
|
|
std::map<Command, ICommandChecker*> commandChecker;
|
|
std::vector<ICommandChecker*> allCommandChecker;
|
|
CommandSequenceScheduler commandSequenceScheduler;
|
|
//PowerDownManager powerDownManager;
|
|
CommandBus bus;
|
|
RefreshManager refreshManager;
|
|
|
|
|
|
void addCommandChecker(Command command, ICommandChecker* checker);
|
|
};
|
|
|
|
} /* namespace controller */
|
|
|
|
#endif /* CONTROLLER_H_ */
|