43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
/*
|
|
* ActivateScheduler.h
|
|
*
|
|
* Created on: Mar 12, 2014
|
|
* Author: jonny
|
|
*/
|
|
|
|
#ifndef ACTIVATESCHEDULER_H_
|
|
#define ACTIVATESCHEDULER_H_
|
|
|
|
#include <map>
|
|
#include "core/scheduling/checker/ICommandChecker.h"
|
|
#include "core/Configuration.h"
|
|
#include "core/utils/RingBuffer.h"
|
|
#include "core/scheduling/CommandBus.h"
|
|
|
|
namespace controller {
|
|
|
|
class ActivateChecker: public controller::ICommandChecker
|
|
{
|
|
public:
|
|
ActivateChecker(Configuration& config, CommandBus& commandBus) : config(config), bus(commandBus), nActivateWindow(config.nActivate - 1){}
|
|
virtual ~ActivateChecker(){}
|
|
|
|
virtual void check(ScheduledCommand& command) const;
|
|
virtual sc_time getExecutionTime(const tlm::tlm_generic_payload& transaction, Command command) const;
|
|
virtual void cb_IInternalScheduler(const ScheduledCommand& command);
|
|
private:
|
|
const Configuration& config;
|
|
CommandBus& bus;//TODO should be const .. but fucking map access operator!!!!
|
|
|
|
void check_activateToActivate(ScheduledCommand& command) const;
|
|
void check_prechargeToActivate(ScheduledCommand& command) const;
|
|
void check_nActivateWindow(ScheduledCommand& command) const;
|
|
void check_bus(ScheduledCommand& command) const;
|
|
|
|
RingBuffer<sc_time> nActivateWindow;
|
|
};
|
|
|
|
} /* namespace controller */
|
|
|
|
#endif /* ACTIVATESCHEDULER_H_ */
|