Major change to simulation logic in dramSys: Commands in a transaction are now scheduled one at a time, instead of scheduling a whole transaction at once. Since single commands (e.g. Pre or Act) are not that long, refreshes are allowed to be delayed to allow a command to finsh. Consequently, the whole loop in the ControllerCore about trying to scheduleding a transaction and aborting it when it collides with a refresh could be ommitted. Lastly, Fifo_Strict has been added, which is a Fifo Scheduler that forces the read and write transactions, even between different banks to be executed in order. Fifo and FR_FCFS have been modified to fit into the new scheduling logic.
43 lines
982 B
C++
43 lines
982 B
C++
/*
|
|
* BankwiseRefreshManager.h
|
|
*
|
|
* Created on: Mar 9, 2014
|
|
* Author: jonny
|
|
*/
|
|
|
|
#ifndef BANKWISEREFRESHMANAGER_H_
|
|
#define BANKWISEREFRESHMANAGER_H_
|
|
|
|
#include "../../../common/dramExtension.h"
|
|
#include "../configuration/MemSpec.h"
|
|
#include "IRefreshManager.h"
|
|
|
|
|
|
class ControllerCore;
|
|
|
|
class RefreshManagerBankwise : public IRefreshManager
|
|
{
|
|
public:
|
|
RefreshManagerBankwise(ControllerCore& controllerCore);
|
|
virtual ~RefreshManagerBankwise();
|
|
|
|
virtual bool hasCollision(const ScheduledCommand& command) override;
|
|
virtual 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& controllerCore;
|
|
|
|
std::map<Bank, tlm::tlm_generic_payload> refreshPayloads;
|
|
std::map<Bank, sc_time> nextPlannedRefreshs;
|
|
|
|
void planNextRefresh(Bank bank);
|
|
};
|
|
|
|
|
|
#endif /* BANKWISEREFRESHMANAGER_H_ */
|