Removed unused files in folder scheduler.
This commit is contained in:
@@ -1,149 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015, University of Kaiserslautern
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
|
||||
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors:
|
||||
* Janik Schlemminger
|
||||
* Robert Gernhardt
|
||||
* Matthias Jung
|
||||
*/
|
||||
|
||||
|
||||
//// * PARBS.cpp
|
||||
//// *
|
||||
//// * Created on: Apr 9, 2014
|
||||
//// * Author: robert
|
||||
//// */
|
||||
|
||||
//#include "PARBS.h"
|
||||
//#include "../core/configuration/Configuration.h"
|
||||
//#include "../../common/dramExtension.h"
|
||||
//#include "map"
|
||||
//#include "ThreadLoad.h"
|
||||
//#include <algorithm>
|
||||
|
||||
//namespace scheduler {
|
||||
|
||||
//using namespace std;
|
||||
|
||||
//PAR_BS::PAR_BS(ControllerCore& controllerCore, bool useExternalBankstates, unsigned int capsize) :
|
||||
// controllerCore(controllerCore), useExternalBankstates(useExternalBankstates), capsize(capsize)
|
||||
//{
|
||||
// if (useExternalBankstates)
|
||||
// {
|
||||
// batch = new FR_FCFS(controllerCore, true, false);
|
||||
// buffer = new FR_FCFS(controllerCore, true, false);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// batch = new FR_FCFS(controllerCore, true, false);
|
||||
// buffer = new FR_FCFS(controllerCore, true, false);
|
||||
// }
|
||||
//}
|
||||
|
||||
//PAR_BS::~PAR_BS()
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
//bool PAR_BS::hasPayloads()
|
||||
//{
|
||||
// return batch->hasPayloads() || buffer->hasPayloads();
|
||||
//}
|
||||
|
||||
//void PAR_BS::schedule(gp* payload)
|
||||
//{
|
||||
// printDebugMessage("hello!");
|
||||
// buffer->schedule(payload);
|
||||
//}
|
||||
|
||||
//gp* PAR_BS::getNextPayload()
|
||||
//{
|
||||
// if (!batch->hasPayloads())
|
||||
// {
|
||||
// stringstream s;
|
||||
// s << "In batch: " << batch->getNumberOfQueuedPayloads() << "\t" << "in buffer: " << buffer->getNumberOfQueuedPayloads() << endl;
|
||||
// formBatch();
|
||||
// s<< "Formed new batch" << endl;
|
||||
// s << "In batch: " << batch->getNumberOfQueuedPayloads() << "\t" << "in buffer: " << buffer->getNumberOfQueuedPayloads() << endl;
|
||||
// printDebugMessage(s.str());
|
||||
// sc_assert(batch->hasPayloads());
|
||||
// }
|
||||
|
||||
// gp* result = batch->getNextPayload();
|
||||
// if(result == NULL)
|
||||
// result = buffer->getNextPayload();
|
||||
// return result;
|
||||
//}
|
||||
|
||||
//void PAR_BS::removePayload(gp* payload)
|
||||
//{
|
||||
// buffer->removePayload(payload);
|
||||
// batch->removePayload(payload);
|
||||
|
||||
// if (!useExternalBankstates)
|
||||
// {
|
||||
// DramExtension& extension = DramExtension::getExtension(payload);
|
||||
// internalBankstates.openRowInRowBuffer(extension.getBank(), extension.getRow());
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
//void PAR_BS::formBatch()
|
||||
//{
|
||||
// map<Thread, ThreadLoad> loads;
|
||||
|
||||
// for (Bank bank : controllerCore.getBanks())
|
||||
// {
|
||||
// for (unsigned int i = 0; i < capsize; i++)
|
||||
// {
|
||||
// gp* payload = buffer->popOldest(bank);
|
||||
// if(payload == NULL)
|
||||
// break;
|
||||
// loads[DramExtension::getExtension(payload).getThread()].addTransaction(payload);
|
||||
// }
|
||||
// }
|
||||
|
||||
// vector<ThreadLoad*> sortedLoads;
|
||||
// for (auto& threadLoadPair : loads)
|
||||
// {
|
||||
// sortedLoads.push_back(&threadLoadPair.second);
|
||||
// }
|
||||
|
||||
// sort(sortedLoads.begin(), sortedLoads.end(), LoadPointerComparer());
|
||||
|
||||
// for (auto& load : sortedLoads)
|
||||
// {
|
||||
// batch->schedule(load->getTransactions());
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
//}
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015, University of Kaiserslautern
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
|
||||
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors:
|
||||
* Janik Schlemminger
|
||||
* Robert Gernhardt
|
||||
* Matthias Jung
|
||||
*/
|
||||
|
||||
|
||||
//// * PARBS.h
|
||||
//// *
|
||||
//// * Created on: Apr 9, 2014
|
||||
//// * Author: robert
|
||||
//// *
|
||||
|
||||
//#ifndef PARBS_H_
|
||||
//#define PARBS_H_
|
||||
//#include "Scheduler.h"
|
||||
//#include "../core/ControllerCore.h"
|
||||
//#include "Fr_Fcfs.h"
|
||||
|
||||
//namespace scheduler {
|
||||
|
||||
//class PAR_BS : public Scheduler
|
||||
//{
|
||||
//public:
|
||||
// PAR_BS(ControllerCore& controllerCore, bool useExternalBankstates, unsigned int capsize);
|
||||
// virtual ~PAR_BS();
|
||||
|
||||
// virtual bool hasPayloads() override;
|
||||
// virtual void schedule(gp* payload) override;
|
||||
// virtual gp* getNextPayload() override;
|
||||
// virtual void removePayload(gp* payload) override;
|
||||
|
||||
//private:
|
||||
// void formBatch();
|
||||
|
||||
// ControllerCore& controllerCore;
|
||||
// bool useExternalBankstates;
|
||||
// RowBufferState internalBankstates;
|
||||
// FR_FCFS *batch;
|
||||
// FR_FCFS *buffer;
|
||||
// unsigned int capsize;
|
||||
//};
|
||||
|
||||
//} /* scheduler core */
|
||||
|
||||
//#endif
|
||||
@@ -1,108 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015, University of Kaiserslautern
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
|
||||
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors:
|
||||
* Janik Schlemminger
|
||||
* Robert Gernhardt
|
||||
* Matthias Jung
|
||||
*/
|
||||
|
||||
|
||||
// * ThreadLoad.cpp
|
||||
// *
|
||||
// * Created on: Apr 9, 2014
|
||||
// * Author: robert
|
||||
// */
|
||||
|
||||
//#include "ThreadLoad.h"
|
||||
|
||||
//namespace scheduler {
|
||||
|
||||
//using namespace std;
|
||||
|
||||
//ThreadLoad::ThreadLoad()
|
||||
//{
|
||||
// // TODO Auto-generated constructor stub
|
||||
|
||||
//}
|
||||
|
||||
//ThreadLoad::~ThreadLoad()
|
||||
//{
|
||||
// // TODO Auto-generated destructor stub
|
||||
//}
|
||||
|
||||
//unsigned int ThreadLoad::getMaxBankLoad() const
|
||||
//{
|
||||
// unsigned int maxLoad = 0;
|
||||
// for (auto& bankVectorPair : load)
|
||||
// {
|
||||
// if (bankVectorPair.second.size() > maxLoad)
|
||||
// maxLoad = bankVectorPair.second.size();
|
||||
// }
|
||||
// return maxLoad;
|
||||
//}
|
||||
|
||||
//unsigned int ThreadLoad::getTotalLoad() const
|
||||
//{
|
||||
// unsigned int totalLoad = 0;
|
||||
// for (auto& bankVectorPair : load)
|
||||
// {
|
||||
// totalLoad += bankVectorPair.second.size();
|
||||
// }
|
||||
// return totalLoad;
|
||||
//}
|
||||
|
||||
//void ThreadLoad::addTransaction(gp* payload)
|
||||
//{
|
||||
// load[DramExtension::getExtension(payload).getBank()].push_back(payload);
|
||||
//}
|
||||
|
||||
//bool operator<(const ThreadLoad& lhs, const ThreadLoad& rhs)
|
||||
//{
|
||||
// if (lhs.getMaxBankLoad() < rhs.getMaxBankLoad())
|
||||
// return true;
|
||||
// else if (lhs.getMaxBankLoad() == rhs.getMaxBankLoad())
|
||||
// return lhs.getTotalLoad() < rhs.getTotalLoad();
|
||||
// else
|
||||
// return false;
|
||||
//}
|
||||
|
||||
//vector<gp*> ThreadLoad::getTransactions()
|
||||
//{
|
||||
// vector<gp*> result;
|
||||
// for (auto& bankVectorPair : load)
|
||||
// {
|
||||
// result.insert(result.end(), bankVectorPair.second.begin(), bankVectorPair.second.end());
|
||||
// }
|
||||
// return result;
|
||||
//}
|
||||
|
||||
//} /* namespace scheduler
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015, University of Kaiserslautern
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
|
||||
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors:
|
||||
* Janik Schlemminger
|
||||
* Robert Gernhardt
|
||||
* Matthias Jung
|
||||
*/
|
||||
|
||||
|
||||
//// * ThreadLoad.h
|
||||
//// *
|
||||
//// * Created on: Apr 9, 2014
|
||||
//// * Author: robert
|
||||
//// */
|
||||
|
||||
//#ifndef THREADLOAD_H_
|
||||
//#define THREADLOAD_H_
|
||||
//#include <map>
|
||||
//#include <tlm.h>
|
||||
//#include "../../common/dramExtension.h"
|
||||
|
||||
//namespace scheduler {
|
||||
|
||||
//typedef tlm::tlm_generic_payload gp;
|
||||
|
||||
//class ThreadLoad
|
||||
//{
|
||||
//public:
|
||||
// ThreadLoad();d
|
||||
// virtual ~ThreadLoad();
|
||||
|
||||
// unsigned int getMaxBankLoad() const;
|
||||
// unsigned int getTotalLoad() const;
|
||||
|
||||
// void addTransaction(gp* payload);
|
||||
// std::vector<gp*> getTransactions();
|
||||
|
||||
//private:
|
||||
// std::map<Bank,std::vector<gp*>> load;
|
||||
//};
|
||||
|
||||
//bool operator< (const ThreadLoad &lhs, const ThreadLoad &rhs);
|
||||
|
||||
//struct LoadPointerComparer {
|
||||
// bool operator()(const ThreadLoad* l, const ThreadLoad* r) {
|
||||
// return *l < *r;
|
||||
// }
|
||||
//};
|
||||
|
||||
//} /* namespace scheduler */
|
||||
|
||||
//#endif /* THREADLOAD_H_
|
||||
@@ -1,191 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015, University of Kaiserslautern
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
|
||||
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors:
|
||||
* Janik Schlemminger
|
||||
* Robert Gernhardt
|
||||
* Matthias Jung
|
||||
*/
|
||||
|
||||
//#include "readwritegrouper.h"
|
||||
//#include "../../common/DebugManager.h"
|
||||
|
||||
//namespace scheduler{
|
||||
|
||||
//using namespace tlm;
|
||||
//using namespace std;
|
||||
|
||||
//ReadWriteGrouper::ReadWriteGrouper(ControllerCore& controllerCore): controllerCore(controllerCore)
|
||||
//{
|
||||
// batches.push_back(shared_ptr<FR_FCFS>(new FR_FCFS(controllerCore,true,false)));
|
||||
// batches.push_back(shared_ptr<FR_FCFS>(new FR_FCFS(controllerCore,true,false)));
|
||||
//}
|
||||
|
||||
//ReadWriteGrouper::~ReadWriteGrouper()
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
//void ReadWriteGrouper::schedule(gp *payload)
|
||||
//{
|
||||
// tlm_command command = payload->get_command();
|
||||
|
||||
// if(batches.size() > 2)
|
||||
// {
|
||||
// if(command == TLM_READ_COMMAND)
|
||||
// {
|
||||
// //printDebugMessage("Scheduling read");
|
||||
|
||||
// if(schedulingReadCausesHazardWithQueuedWrite(payload))
|
||||
// {
|
||||
// printDebugMessage("Scheduling read causes hazard with queued write");
|
||||
// batches.push_back(shared_ptr<FR_FCFS>(new FR_FCFS(controllerCore,true,false)));
|
||||
// batches.push_back(shared_ptr<FR_FCFS>(new FR_FCFS(controllerCore,true,false)));
|
||||
// }
|
||||
|
||||
// getLatestReadBatch().schedule(payload);
|
||||
// }
|
||||
// else if(command == TLM_WRITE_COMMAND)
|
||||
// {
|
||||
// //printDebugMessage("Scheduling write");
|
||||
// getLatestWriteBatch().schedule(payload);
|
||||
// }
|
||||
// }
|
||||
// else if(batches.size() == 2)
|
||||
// {
|
||||
// if(command == TLM_READ_COMMAND)
|
||||
// {
|
||||
// //printDebugMessage("Scheduling read");
|
||||
|
||||
// if(getLatestReadBatch().hasPayloads() && schedulingReadCausesHazardWithQueuedWrite(payload))
|
||||
// {
|
||||
// printDebugMessage("Scheduling read causes hazard with queued write");
|
||||
// batches.push_back(shared_ptr<FR_FCFS>(new FR_FCFS(controllerCore,true,false)));
|
||||
// batches.push_back(shared_ptr<FR_FCFS>(new FR_FCFS(controllerCore,true,false)));
|
||||
// }
|
||||
// else if(!getLatestReadBatch().hasPayloads() && getLatestWriteBatch().hasPayloads())
|
||||
// {
|
||||
// printDebugMessage("Scheduling read, but there are writes to be processed first");
|
||||
// batches.erase(batches.begin());
|
||||
// batches.push_back(shared_ptr<FR_FCFS>(new FR_FCFS(controllerCore,true,false)));
|
||||
// batches.push_back(shared_ptr<FR_FCFS>(new FR_FCFS(controllerCore,true,false)));
|
||||
// }
|
||||
// getLatestReadBatch().schedule(payload);
|
||||
|
||||
// }
|
||||
// else if(command == TLM_WRITE_COMMAND)
|
||||
// {
|
||||
// //printDebugMessage("Scheduling write");
|
||||
// getLatestWriteBatch().schedule(payload);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// sc_assert(false);
|
||||
// }
|
||||
//}
|
||||
|
||||
//gp *ReadWriteGrouper::getNextPayload()
|
||||
//{
|
||||
// if(batches.size() > 2)
|
||||
// {
|
||||
// return batches.front()->getNextPayload();
|
||||
// }
|
||||
// else if(batches.size() == 2)
|
||||
// {
|
||||
// if(getLatestReadBatch().hasPayloads())
|
||||
// return getLatestReadBatch().getNextPayload();
|
||||
// else if(getLatestWriteBatch().hasPayloads())
|
||||
// return getLatestWriteBatch().getNextPayload();
|
||||
// else
|
||||
// return NULL;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// sc_assert(false);
|
||||
// return NULL;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//void ReadWriteGrouper::removePayload(gp *payload)
|
||||
//{
|
||||
// if(batches.size() > 2)
|
||||
// {
|
||||
// batches.front()->removePayload(payload);
|
||||
// if(!batches.front()->hasPayloads())
|
||||
// batches.erase(batches.begin());
|
||||
// }
|
||||
// else if(batches.size() == 2)
|
||||
// {
|
||||
// if(payload->is_read())
|
||||
// getLatestReadBatch().removePayload(payload);
|
||||
// else
|
||||
// getLatestWriteBatch().removePayload(payload);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// sc_assert(false);
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//bool ReadWriteGrouper::hasPayloads()
|
||||
//{
|
||||
// if(batches.size() > 2)
|
||||
// return true;
|
||||
// else if(batches.size() == 2)
|
||||
// return (getLatestReadBatch().hasPayloads() || getLatestWriteBatch().hasPayloads());
|
||||
// else
|
||||
// {
|
||||
// sc_assert(false);
|
||||
// return NULL;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//bool ReadWriteGrouper::schedulingReadCausesHazardWithQueuedWrite(gp *payload)
|
||||
//{
|
||||
// sc_assert(payload->is_read());
|
||||
// return getLatestWriteBatch().containsPayloadTragetingSameAddress(payload);
|
||||
//}
|
||||
|
||||
//FR_FCFS &ReadWriteGrouper::getLatestWriteBatch()
|
||||
//{
|
||||
// return *batches[batches.size()-1];
|
||||
//}
|
||||
|
||||
//FR_FCFS &ReadWriteGrouper::getLatestReadBatch()
|
||||
//{
|
||||
// return *batches[batches.size()-2];
|
||||
//}
|
||||
|
||||
//}
|
||||
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015, University of Kaiserslautern
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
|
||||
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors:
|
||||
* Janik Schlemminger
|
||||
* Robert Gernhardt
|
||||
* Matthias Jung
|
||||
*/
|
||||
|
||||
//#ifndef READWRITEGROUPER_H
|
||||
//#define READWRITEGROUPER_H
|
||||
//#include "Scheduler.h"
|
||||
//#include "Fr_Fcfs.h"
|
||||
//#include "../core/ControllerCore.h"
|
||||
//#include <memory>
|
||||
//#include <vector>
|
||||
|
||||
|
||||
//namespace scheduler{
|
||||
|
||||
//class ReadWriteGrouper : public Scheduler
|
||||
//{
|
||||
//public:
|
||||
// ReadWriteGrouper(ControllerCore& controllerCore);
|
||||
// ~ReadWriteGrouper();
|
||||
// virtual void schedule(gp* payload) override;
|
||||
// virtual bool hasPayloads() override;
|
||||
// virtual gp* getNextPayload() override;
|
||||
// virtual void removePayload(gp* payload) override;
|
||||
|
||||
//private:
|
||||
// // contains batches of requests
|
||||
// // last element always contains writes
|
||||
// // next-to-last element always contains reads
|
||||
// // there are always at least two batches
|
||||
// // if there are more than two batches, batches[0] is never empty and
|
||||
// // getNextPayload and removePayload are forwarded to batches[0]
|
||||
// std::vector<std::shared_ptr<FR_FCFS>> batches;
|
||||
// ControllerCore& controllerCore;
|
||||
|
||||
// bool schedulingReadCausesHazardWithQueuedWrite(gp* payload);
|
||||
// FR_FCFS& getLatestWriteBatch();
|
||||
// FR_FCFS& getLatestReadBatch();
|
||||
|
||||
//};
|
||||
|
||||
|
||||
//}
|
||||
|
||||
//#endif // READWRITEGROUPER_H
|
||||
Reference in New Issue
Block a user