Issue#12 - removal of BUSWIDTH from some modules

Other changes:
Empty file Controller.cpp removed.
This commit is contained in:
Éder F. Zulian
2016-06-29 14:47:56 +02:00
parent 9646c0e93b
commit d30062db68
7 changed files with 9 additions and 50 deletions

View File

@@ -99,7 +99,6 @@ SOURCES += \
src/controller/core/configuration/ConfigurationLoader.cpp \
src/controller/core/powerdown/NoPowerDown.cpp \
src/controller/Command.cpp \
src/controller/Controller.cpp \
src/controller/ControllerState.cpp \
src/controller/RowBufferStates.cpp \
src/controller/scheduler/IScheduler.cpp \

View File

@@ -1,40 +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 "Controller.h"

View File

@@ -54,7 +54,6 @@
using namespace std;
using namespace tlm;
template<unsigned int BUSWIDTH = 128>
struct Arbiter: public sc_module {
public:
tlm_utils::multi_passthrough_initiator_socket<Arbiter> iSocket;

View File

@@ -61,9 +61,11 @@ using namespace std;
using namespace tlm;
using namespace Data;
template<unsigned int BUSWIDTH = 128>
struct Dram : sc_module
{
// FIXME: remove this define and use the value from config
const static unsigned int BUSWIDTH = 128;
// TLM Related:
tlm_utils::simple_target_socket<Dram> tSocket;

View File

@@ -45,7 +45,6 @@
using namespace std;
using namespace tlm;
template<unsigned int BUSWIDTH = 128>
struct ReorderBuffer: public sc_module
{
public:

View File

@@ -143,7 +143,7 @@ void Simulation::instantiateModules(const string &traceName, const string &pathT
// Create and properly initialize TLM recorders. They need to be ready before creating some modules.
setupTlmRecorders(traceName, pathToResources, devices);
arbiter = new Arbiter<128>("arbiter");
arbiter = new Arbiter("arbiter");
arbiter->setTlmRecorders(tlmRecorders);
for (size_t i = 0; i < Configuration::getInstance().NumberOfMemChannels; i++) {
@@ -152,7 +152,7 @@ void Simulation::instantiateModules(const string &traceName, const string &pathT
controllers.push_back(controller);
str = "dram" + std::to_string(i);
Dram<> *dram = new Dram<>(str.c_str());
Dram *dram = new Dram(str.c_str());
dram->setTlmRecorder(tlmRecorders[i]);
dram->setDramController(controllers[i]);
drams.push_back(dram);

View File

@@ -98,13 +98,13 @@ private:
// and initiate transactions targeting the memory)
std::vector<TracePlayer<>*> players;
// All transactions pass through the same arbiter
Arbiter<> *arbiter;
Arbiter *arbiter;
// Each DRAM unit has a controller
std::vector<Controller<>*> controllers;
std::vector<Controller<> *> controllers;
// TODO: Each DRAM has a reorder buffer (check this!)
ReorderBuffer<> *reorder;
ReorderBuffer *reorder;
// DRAM units
std::vector<Dram<>*> drams;
std::vector<Dram *> drams;
// Transaction Recorders (one per channel). They generate the output databases.
std::vector<TlmRecorder*> tlmRecorders;