Fixed error in refresh manager and in backpressure release codepath

This commit is contained in:
Robert Gernhardt
2015-03-23 08:43:18 +01:00
parent fe8ff6242d
commit 5fcd57a4e2
6 changed files with 14 additions and 27 deletions

2
.gitignore vendored
View File

@@ -2,6 +2,8 @@
/release
/dram/debug
/dram/release
/dram/build
*pro.user*
*.tdb
*.tdb-journal
*.out

View File

@@ -108,11 +108,7 @@ private:
DebugManager& debugManager;
};
// --- IMPLEMENTATION -----
template<unsigned int BUSWIDTH>
void Controller<BUSWIDTH>::buildScheduler()
{
@@ -293,7 +289,7 @@ void Controller<BUSWIDTH>::controllerCorePEQCallback(tlm_generic_payload &payloa
{
// special case for the Fifo_strict scheduler, because it may have to unblock
// the current front element
dynamic_cast<FifoStrict*>(scheduler)->NotifyBeginRD();
dynamic_cast<FifoStrict*>(scheduler)->NotifyBeginRDWR();
}
else
{
@@ -355,12 +351,7 @@ void Controller<BUSWIDTH>::frontendPEQCallback(tlm_generic_payload &payload, con
sendToFrontend(payload, END_REQ, SC_ZERO_TIME);
scheduler->schedule(&payload);
// Since we are triggering the scheduling of the next action on the bank
// because of an incoming transaction, we have to check if the bank
// is still busy. If it is, we let the end of the command which is currently in
// progress trigger the next scheduling
scheduleNextFromScheduler(DramExtension::getExtension(payload).getBank());
scheduleNextFromScheduler(DramExtension::getExtension(payload).getBank());
}
else if (phase == END_RESP)
{
@@ -371,14 +362,7 @@ void Controller<BUSWIDTH>::frontendPEQCallback(tlm_generic_payload &payload, con
sendToFrontend(*backpressure, END_REQ, SC_ZERO_TIME);
scheduler->schedule(backpressure);
// Since we are triggering the scheduling of the next action on the bank
// because of an incoming transaction, we have to check if the bank
// is still busy. If it is, we let the end of the command which is currently in
// progress trigger the next scheduling
if(!controllerCore->bankIsBusy(DramExtension::getBank(payload)))
{
scheduleNextFromScheduler(DramExtension::getExtension(backpressure).getBank());
}
scheduleNextFromScheduler(DramExtension::getExtension(backpressure).getBank());
backpressure = NULL;
}
@@ -426,6 +410,7 @@ unsigned int Controller<BUSWIDTH>::getTotalNumberOfPayloadsInSystem()
template<unsigned int BUSWIDTH>
void Controller<BUSWIDTH>::scheduleNextFromScheduler(Bank bank)
{
if(controllerCore->bankIsBusy(bank))
{
return;
@@ -473,7 +458,6 @@ void Controller<BUSWIDTH>::dramPEQCallback(tlm_generic_payload &payload, const t
else if (phase == END_REFA)
{
printDebugMessage("Finished auto refresh on all banks ");
for(Bank bank : controllerCore->getBanks())
{
if(numberOfPayloadsInSystem[bank] == 0)

View File

@@ -51,14 +51,15 @@ void RefreshManager::scheduleRefresh(tlm::tlm_generic_payload& payload, sc_time
}
}
ScheduledCommand refreshAllMaster(Command::AutoRefresh, time, getExecutionTime(Command::AutoRefresh, refreshPayloads[Bank(0)]),
DramExtension::getExtension(refreshPayloads[Bank(0)]));
controllerCore.getCommandChecker(Command::AutoRefresh).delayToSatisfyConstraints(refreshAllMaster);
for (Bank bank : controllerCore.getBanks())
{
ScheduledCommand refresh(Command::AutoRefresh, time, getExecutionTime(Command::AutoRefresh, refreshPayloads[bank]),
DramExtension::getExtension(refreshPayloads[bank]));
controllerCore.getCommandChecker(Command::AutoRefresh).delayToSatisfyConstraints(refresh);
ScheduledCommand refresh(Command::AutoRefresh, refreshAllMaster.getStart(), refreshAllMaster.getExecutionTime(),refreshPayloads[bank]);
controllerCore.state.change(refresh);
controllerCore.controller.send(refresh, refreshPayloads[bank]);
DramExtension::getExtension(refreshPayloads[bank]).incrementRow();
}

View File

@@ -19,7 +19,7 @@ void FifoStrict::printFrontElementState()
}
}
void FifoStrict::NotifyBeginRD()
void FifoStrict::NotifyBeginRDWR()
{
buffer.erase(buffer.begin());
printDebugMessage("Front element finished. New front Element: ");

View File

@@ -26,7 +26,6 @@
using namespace std;
using namespace tlm;
;
using namespace Data;

View File

@@ -39,7 +39,8 @@ int sc_main(int argc, char **argv)
if(argc > 1)
simulationToRun = argv[1];
else
simulationToRun = resources + "/simulations/sim-batch.xml";
//simulationToRun = resources + "/simulations/sim-batch.xml";
simulationToRun = "/home/jungma/projects/dram.vp.system/dram/resources/simulations/sim-batch.xml";
SimulationManager manager(resources);
manager.loadSimulationsFromXML(simulationToRun);