39 lines
753 B
C++
39 lines
753 B
C++
/*
|
|
* BankStates.h
|
|
*
|
|
* Created on: Feb 24, 2014
|
|
* Author: robert
|
|
*/
|
|
|
|
#ifndef BANKSTATES_H_
|
|
#define BANKSTATES_H_
|
|
#include <vector>
|
|
#include "../common/dramExtension.h"
|
|
|
|
namespace core
|
|
{
|
|
|
|
class BankStates {
|
|
public:
|
|
BankStates(unsigned int numberOfBanks);
|
|
virtual ~BankStates();
|
|
|
|
unsigned int getNumberOfBanks() const {return rowsInRowBuffers.size();}
|
|
const std::vector<Bank>& getBanks() const {return banks;}
|
|
|
|
bool rowBufferIsOpen(const Bank &bank) const;
|
|
Row getRowInRowBuffer(const Bank &bank) const;
|
|
|
|
void openRowInRowBuffer(const Bank &bank, const Row &row);
|
|
void closeRowBuffer(const Bank &bank);
|
|
void closeAllRowBuffers();
|
|
|
|
private:
|
|
std::vector<Bank> banks;
|
|
std::vector<Row> rowsInRowBuffers;
|
|
};
|
|
|
|
}
|
|
|
|
#endif /* BANKSTATES_H_ */
|