diff --git a/DRAMSys/simulator/simulator.pro b/DRAMSys/simulator/simulator.pro index bc65a145..7eed4ce4 100644 --- a/DRAMSys/simulator/simulator.pro +++ b/DRAMSys/simulator/simulator.pro @@ -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 \ diff --git a/DRAMSys/simulator/src/controller/Controller.cpp b/DRAMSys/simulator/src/controller/Controller.cpp deleted file mode 100644 index a6422469..00000000 --- a/DRAMSys/simulator/src/controller/Controller.cpp +++ /dev/null @@ -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" - - diff --git a/DRAMSys/simulator/src/simulation/Arbiter.h b/DRAMSys/simulator/src/simulation/Arbiter.h index 86016cc9..eea6a3cc 100644 --- a/DRAMSys/simulator/src/simulation/Arbiter.h +++ b/DRAMSys/simulator/src/simulation/Arbiter.h @@ -54,7 +54,6 @@ using namespace std; using namespace tlm; -template struct Arbiter: public sc_module { public: tlm_utils::multi_passthrough_initiator_socket iSocket; diff --git a/DRAMSys/simulator/src/simulation/Dram.h b/DRAMSys/simulator/src/simulation/Dram.h index 7258e090..59ac2513 100644 --- a/DRAMSys/simulator/src/simulation/Dram.h +++ b/DRAMSys/simulator/src/simulation/Dram.h @@ -61,9 +61,11 @@ using namespace std; using namespace tlm; using namespace Data; -template 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 tSocket; diff --git a/DRAMSys/simulator/src/simulation/ReorderBuffer.h b/DRAMSys/simulator/src/simulation/ReorderBuffer.h index 7f20577d..bbc1bc14 100644 --- a/DRAMSys/simulator/src/simulation/ReorderBuffer.h +++ b/DRAMSys/simulator/src/simulation/ReorderBuffer.h @@ -45,7 +45,6 @@ using namespace std; using namespace tlm; -template struct ReorderBuffer: public sc_module { public: diff --git a/DRAMSys/simulator/src/simulation/Simulation.cpp b/DRAMSys/simulator/src/simulation/Simulation.cpp index 5105c29c..dae8d5dc 100644 --- a/DRAMSys/simulator/src/simulation/Simulation.cpp +++ b/DRAMSys/simulator/src/simulation/Simulation.cpp @@ -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); diff --git a/DRAMSys/simulator/src/simulation/Simulation.h b/DRAMSys/simulator/src/simulation/Simulation.h index 3b5d24fb..29d4ae09 100644 --- a/DRAMSys/simulator/src/simulation/Simulation.h +++ b/DRAMSys/simulator/src/simulation/Simulation.h @@ -98,13 +98,13 @@ private: // and initiate transactions targeting the memory) std::vector*> players; // All transactions pass through the same arbiter - Arbiter<> *arbiter; + Arbiter *arbiter; // Each DRAM unit has a controller - std::vector*> controllers; + std::vector *> controllers; // TODO: Each DRAM has a reorder buffer (check this!) - ReorderBuffer<> *reorder; + ReorderBuffer *reorder; // DRAM units - std::vector*> drams; + std::vector drams; // Transaction Recorders (one per channel). They generate the output databases. std::vector tlmRecorders;