From 27fed220035e89af0a039e1e0036f9369b6df0c1 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Sat, 22 Jun 2019 20:49:57 +0200 Subject: [PATCH] Revert "Templating for DRAMs is working." This reverts commit d69cb555ac5ba564439d93ad63907f0a51485b74. --- DRAMSys/library/src/simulation/DRAMSys.cpp | 9 +---- DRAMSys/library/src/simulation/DramDDR3.cpp | 1 - DRAMSys/library/src/simulation/DramDDR3.h | 1 - DRAMSys/library/src/simulation/DramDDR4.cpp | 36 ------------------- DRAMSys/library/src/simulation/DramDDR4.h | 1 - .../library/src/simulation/DramRecordable.cpp | 8 +---- .../library/src/simulation/DramRecordable.h | 10 ++---- .../src/simulation/DramRecordablePower.cpp | 8 +---- .../src/simulation/DramRecordablePower.h | 8 ++--- 9 files changed, 7 insertions(+), 75 deletions(-) diff --git a/DRAMSys/library/src/simulation/DRAMSys.cpp b/DRAMSys/library/src/simulation/DRAMSys.cpp index 563c2a41..ee5b7c51 100644 --- a/DRAMSys/library/src/simulation/DRAMSys.cpp +++ b/DRAMSys/library/src/simulation/DRAMSys.cpp @@ -54,10 +54,6 @@ #include "../simulation/TemperatureController.h" #include "../controller/Controller.h" #include "../error/ecchamming.h" -#include "DramRecordable.h" -#include "DramRecordablePower.h" -#include "DramDDR3.h" -#include "RecordableDram.h" using namespace std; @@ -244,8 +240,6 @@ void DRAMSys::instantiateModules(const string &traceName, // Create arbiter arbiter = new Arbiter("arbiter"); - std::string testString = "test"; - //DramRecordable testDram(testString.c_str(), tlmRecorders[0]); // Create DRAM for (size_t i = 0; @@ -263,8 +257,7 @@ void DRAMSys::instantiateModules(const string &traceName, str = "dram" + std::to_string(i); Dram *dram; if (recordingEnabled) - //dram = new RecordableDram(str.c_str(), tlmRecorders[i]); - dram = new DramRecordablePower(str.c_str(), tlmRecorders[i]); + dram = new RecordableDram(str.c_str(), tlmRecorders[i]); else dram = new Dram(str.c_str()); drams.push_back(dram); diff --git a/DRAMSys/library/src/simulation/DramDDR3.cpp b/DRAMSys/library/src/simulation/DramDDR3.cpp index 416f7c63..1999d3a5 100644 --- a/DRAMSys/library/src/simulation/DramDDR3.cpp +++ b/DRAMSys/library/src/simulation/DramDDR3.cpp @@ -34,7 +34,6 @@ */ #include "DramDDR3.h" -#include "Dram.h" DramDDR3::DramDDR3(sc_module_name name) : Dram(name) { diff --git a/DRAMSys/library/src/simulation/DramDDR3.h b/DRAMSys/library/src/simulation/DramDDR3.h index c1aa87ca..a64cdeaf 100644 --- a/DRAMSys/library/src/simulation/DramDDR3.h +++ b/DRAMSys/library/src/simulation/DramDDR3.h @@ -42,7 +42,6 @@ class DramDDR3 : public Dram { public: DramDDR3(sc_module_name); - SC_HAS_PROCESS(DramDDR3); }; #endif // DRAMDDR3_H diff --git a/DRAMSys/library/src/simulation/DramDDR4.cpp b/DRAMSys/library/src/simulation/DramDDR4.cpp index 4eb6bb39..1390f29d 100644 --- a/DRAMSys/library/src/simulation/DramDDR4.cpp +++ b/DRAMSys/library/src/simulation/DramDDR4.cpp @@ -1,40 +1,4 @@ -/* - * Copyright (c) 2019, 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: - * Lukas Steiner - */ - #include "DramDDR4.h" -#include "Dram.h" DramDDR4::DramDDR4(sc_module_name name) : Dram(name) { diff --git a/DRAMSys/library/src/simulation/DramDDR4.h b/DRAMSys/library/src/simulation/DramDDR4.h index 855a3aaf..14212125 100644 --- a/DRAMSys/library/src/simulation/DramDDR4.h +++ b/DRAMSys/library/src/simulation/DramDDR4.h @@ -7,7 +7,6 @@ class DramDDR4 : public Dram { public: DramDDR4(sc_module_name); - SC_HAS_PROCESS(DramDDR4); }; #endif // DRAMDDR4_H diff --git a/DRAMSys/library/src/simulation/DramRecordable.cpp b/DRAMSys/library/src/simulation/DramRecordable.cpp index 9b1fec3c..85d9d73a 100644 --- a/DRAMSys/library/src/simulation/DramRecordable.cpp +++ b/DRAMSys/library/src/simulation/DramRecordable.cpp @@ -34,14 +34,8 @@ */ #include "DramRecordable.h" -#include "RecordableDram.h" -template -DramRecordable::DramRecordable(sc_module_name name, TlmRecorder *tlmRecorder) - : BaseDram(name, tlmRecorder) +DramRecordable::DramRecordable() { } - -template class DramRecordable; - diff --git a/DRAMSys/library/src/simulation/DramRecordable.h b/DRAMSys/library/src/simulation/DramRecordable.h index 95139b1f..cbbfea32 100644 --- a/DRAMSys/library/src/simulation/DramRecordable.h +++ b/DRAMSys/library/src/simulation/DramRecordable.h @@ -36,17 +36,11 @@ #ifndef DRAMRECORDABLE_H #define DRAMRECORDABLE_H -#include "DramDDR3.h" -#include "DramDDR4.h" -#include "RecordableDram.h" -#include "../common/TlmRecorder.h" -template -class DramRecordable : public BaseDram +class DramRecordable { public: - DramRecordable(sc_module_name name, TlmRecorder *tlmRecorder); - SC_HAS_PROCESS(DramRecordable); + DramRecordable(); }; #endif // DRAMRECORDABLE_H diff --git a/DRAMSys/library/src/simulation/DramRecordablePower.cpp b/DRAMSys/library/src/simulation/DramRecordablePower.cpp index bc855e77..c1287cd3 100644 --- a/DRAMSys/library/src/simulation/DramRecordablePower.cpp +++ b/DRAMSys/library/src/simulation/DramRecordablePower.cpp @@ -34,14 +34,8 @@ */ #include "DramRecordablePower.h" -#include "RecordableDram.h" -template -DramRecordablePower::DramRecordablePower - (sc_module_name name, TlmRecorder *tlmRecorder) - : DramRecordable(name, tlmRecorder) +DramRecordablePower::DramRecordablePower() { } - -template class DramRecordablePower; diff --git a/DRAMSys/library/src/simulation/DramRecordablePower.h b/DRAMSys/library/src/simulation/DramRecordablePower.h index b38dacb2..032022bd 100644 --- a/DRAMSys/library/src/simulation/DramRecordablePower.h +++ b/DRAMSys/library/src/simulation/DramRecordablePower.h @@ -36,15 +36,11 @@ #ifndef DRAMRECORDABLEPOWER_H #define DRAMRECORDABLEPOWER_H -#include "DramRecordable.h" -#include "../common/TlmRecorder.h" -template -class DramRecordablePower : public DramRecordable +class DramRecordablePower { public: - DramRecordablePower(sc_module_name name, TlmRecorder *tlmRecorder); - SC_HAS_PROCESS(DramRecordablePower); + DramRecordablePower(); }; #endif // DRAMRECORDABLEPOWER_H