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.
56 lines
1.3 KiB
C++
56 lines
1.3 KiB
C++
/*
|
|
* controller_state.h
|
|
*
|
|
* Created on: Mar 5, 2014
|
|
* Author: jonny
|
|
*/
|
|
|
|
#ifndef CONTROLLER_STATE_H_
|
|
#define CONTROLLER_STATE_H_
|
|
|
|
#include <systemc.h>
|
|
#include "RowBufferStates.h"
|
|
#include "core/Slots.h"
|
|
#include "core/configuration/Configuration.h"
|
|
#include <map>
|
|
#include <set>
|
|
#include <list>
|
|
|
|
class ControllerState
|
|
{
|
|
public:
|
|
ControllerState(Configuration* config) :
|
|
rowBufferStates(), bus(config->memSpec.clk), config(config)
|
|
{
|
|
}
|
|
virtual ~ControllerState()
|
|
{
|
|
}
|
|
|
|
const ScheduledCommand getLastCommand(Command command, Bank bank);
|
|
const ScheduledCommand getLastCommand(Command command);
|
|
const ScheduledCommand getLastScheduledCommand(Bank bank);
|
|
const ScheduledCommand getLastScheduledCommand();
|
|
|
|
void change(const ScheduledCommand& scheduledCommand);
|
|
void cleanUp(sc_time time);
|
|
|
|
RowBufferState rowBufferStates;
|
|
|
|
//used by the various checkers
|
|
std::map<Command, std::map<Bank, ScheduledCommand> > lastScheduledByCommandAndBank;
|
|
std::map<Command, ScheduledCommand> lastScheduledByCommand;
|
|
std::map<Bank, ScheduledCommand> lastScheduledByBank;
|
|
ScheduledCommand lastScheduled;
|
|
|
|
Slots bus;
|
|
std::vector<ScheduledCommand> lastDataStrobeCommands;
|
|
std::map<sc_time, ScheduledCommand> lastActivates;
|
|
|
|
private:
|
|
Configuration* config;
|
|
};
|
|
|
|
|
|
#endif /* CONTROLLER_STATE_H_ */
|