Files
DRAMSys/DRAM/dram/core/Controller.h
2014-03-15 18:31:16 +01:00

50 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 "scheduling/CommandBus.h"
#include "Configuration.h"
#include "refresh/RefreshManager.h"
#include "powerdown/PowerDownManager.h"
#include <map>
#include "scheduling/checker/ICommandChecker.h"
#include "scheduling/CommandSequenceScheduler.h"
namespace controller {
class Controller
{
public:
Controller();
virtual ~Controller();
bool schedule(sc_time currentTime, tlm::tlm_generic_payload& externalTransaction); //TODO return TLM status??
const ICommandChecker& getChecker(Command command) const;
private:
Configuration config;
ControllerState state;
CommandSequenceGenerator commandSequenceGenerator;
std::map<Command, ICommandChecker*> commandChecker;
std::vector<ICommandChecker*> allCommandChecker;
CommandSequenceScheduler commandSequenceScheduler;
RefreshManager refreshManager;
//PowerDownManager powerDownManager;
CommandBus bus;
void addCommandChecker(Command command, ICommandChecker* checker);
};
} /* namespace controller */
#endif /* CONTROLLER_H_ */