Fix commit for renaming issue.

This commit is contained in:
Lukas Steiner
2019-06-12 00:52:28 +02:00
parent 62c5ec720f
commit 5ac2701d2c
2 changed files with 16 additions and 21 deletions

View File

@@ -33,14 +33,14 @@
* Matthias Jung
*/
#include "grp.h"
#include "Grp.h"
// GRP just reorders w.r.t. read write grouping, however is not aware of the
// row buffer. For a row buffer aware grouper refer to FR_FCFS_GRP.
// Grp (Grouper) just reorders w.r.t. read write grouping, however is not aware of the
// row buffer. For a row buffer aware grouper refer to FrFcfsGrp.
// TODO: what is missed is a check if the buffers are full. This will only work
// if we have buffers with a fixed size (Prado's future patch).
std::pair<Command, gp *> GRP::getNextRequest(Bank bank)
std::pair<Command, gp *> Grp::getNextRequest(Bank bank)
{
// If the bank is empty we do nothing:
if (buffer[bank].empty()) {
@@ -131,12 +131,12 @@ std::pair<Command, gp *> GRP::getNextRequest(Bank bank)
readMode = !readMode;
return getNextRequest(bank);
reportFatal("GRP", "Never should go here ...");
reportFatal("Grp", "Never should go here ...");
}
// There is a hazard if a read is found which will be scheduled before a write
// to the same column and the same row of the same bank:
bool GRP::hazardDetection(Bank bank, std::deque<gp *>::iterator ext)
bool Grp::hazardDetection(Bank bank, std::deque<gp *>::iterator ext)
{
gp *read = *ext;
@@ -157,7 +157,7 @@ bool GRP::hazardDetection(Bank bank, std::deque<gp *>::iterator ext)
}
// Estimate the number of writes/reads in all bank buffers:
unsigned int GRP::getNumberOfRequest(tlm::tlm_command cmd)
unsigned int Grp::getNumberOfRequest(tlm::tlm_command cmd)
{
unsigned int numberOfRequests = 0;
for (unsigned int i = 0;
@@ -174,7 +174,7 @@ unsigned int GRP::getNumberOfRequest(tlm::tlm_command cmd)
return numberOfRequests;
}
void GRP::printDebugMessage(std::string message)
void Grp::printDebugMessage(std::string message)
{
DebugManager::getInstance().printDebugMessage("FR_FCFS_GRP", message);
DebugManager::getInstance().printDebugMessage("FrFcfsGrp", message);
}

View File

@@ -33,29 +33,24 @@
* Matthias Jung
*/
#ifndef GROUPER_H
#define GROUPER_H
#ifndef GRP_H
#define GRP_H
#include "Fr_Fcfs.h"
#include "FrFcfs.h"
#include "../Controller.h"
class Controller;
class GRP : public FR_FCFS
class Grp : public FrFcfs
{
public:
GRP(ControllerCore &controllerCore, Controller *c) :
FR_FCFS(controllerCore),
ctrl(c),
readMode(true)
{
}
Grp(ControllerCore &controllerCore, Controller *c)
: FrFcfs(controllerCore), ctrl(c), readMode(true) {}
std::pair<Command, tlm::tlm_generic_payload *>
getNextRequest(Bank bank) override;
private:
Controller *ctrl;
bool hazardDetection(Bank bank, std::deque<gp *>::iterator ext);
unsigned int getNumberOfRequest(tlm::tlm_command cmd);
@@ -63,4 +58,4 @@ private:
bool readMode;
};
#endif // GROUPER_H
#endif // GRP_H