/* * ControllerCore.h * * Created on: Mar 5, 2014 * Author: jonny */ #ifndef CONTROLLER_H_ #define CONTROLLER_H_ #include #include #include "IWrapperConnector.h" #include "configuration/Configuration.h" #include "powerdown/PowerDownManager.h" #include "refresh/IRefreshManager.h" #include "scheduling/CommandSequenceGenerator.h" #include "scheduling/checker/ICommandChecker.h" #include "scheduling/CommandSequenceScheduler.h" #include "../common/TlmRecorder.h" namespace core { class ControllerCore { public: ControllerCore(IWrapperConnector& wrapper, std::map& numberOfPayloads); virtual ~ControllerCore() ; bool isBusy(sc_time currentTime, Bank bank); bool scheduleRequest(sc_time currentTime, tlm::tlm_generic_payload& payload); void triggerRefresh(tlm::tlm_generic_payload& payload, sc_time time); void triggerWakeUp(tlm::tlm_generic_payload& payload, sc_time time); const BankStates& getBankStates(){return state.bankStates;} void saveState(); void resetState(); BankGroup getBankGroup(Bank bank) const; const std::vector& getBanks() const; void send(const CommandSchedule& schedule, tlm::tlm_generic_payload& payload) const; ICommandChecker& getCommandChecker(Command command); Configuration config; ControllerState state; IWrapperConnector& wrapper; PowerDownManager* powerDownManager; IRefreshManager* refreshManager; std::map& numberOfPayloads; static std::string senderName; static void printDebugMessage(string message); private: std::map commandChecker; ControllerState savedState; CommandSequenceGenerator commandSequenceGenerator; CommandSequenceScheduler commandSequenceScheduler; }; } /* namespace controller */ #endif /* CONTROLLER_H_ */