Revert "Templating for DRAMs is working."

This reverts commit d69cb555ac.
This commit is contained in:
Lukas Steiner
2019-06-22 20:49:57 +02:00
parent d69cb555ac
commit 27fed22003
9 changed files with 7 additions and 75 deletions

View File

@@ -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<RecordableDram> 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<RecordableDram>(str.c_str(), tlmRecorders[i]);
dram = new RecordableDram(str.c_str(), tlmRecorders[i]);
else
dram = new Dram(str.c_str());
drams.push_back(dram);

View File

@@ -34,7 +34,6 @@
*/
#include "DramDDR3.h"
#include "Dram.h"
DramDDR3::DramDDR3(sc_module_name name) : Dram(name)
{

View File

@@ -42,7 +42,6 @@ class DramDDR3 : public Dram
{
public:
DramDDR3(sc_module_name);
SC_HAS_PROCESS(DramDDR3);
};
#endif // DRAMDDR3_H

View File

@@ -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)
{

View File

@@ -7,7 +7,6 @@ class DramDDR4 : public Dram
{
public:
DramDDR4(sc_module_name);
SC_HAS_PROCESS(DramDDR4);
};
#endif // DRAMDDR4_H

View File

@@ -34,14 +34,8 @@
*/
#include "DramRecordable.h"
#include "RecordableDram.h"
template<class BaseDram>
DramRecordable<BaseDram>::DramRecordable(sc_module_name name, TlmRecorder *tlmRecorder)
: BaseDram(name, tlmRecorder)
DramRecordable::DramRecordable()
{
}
template class DramRecordable<RecordableDram>;

View File

@@ -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 BaseDram>
class DramRecordable : public BaseDram
class DramRecordable
{
public:
DramRecordable(sc_module_name name, TlmRecorder *tlmRecorder);
SC_HAS_PROCESS(DramRecordable);
DramRecordable();
};
#endif // DRAMRECORDABLE_H

View File

@@ -34,14 +34,8 @@
*/
#include "DramRecordablePower.h"
#include "RecordableDram.h"
template<class BaseDram>
DramRecordablePower<BaseDram>::DramRecordablePower
(sc_module_name name, TlmRecorder *tlmRecorder)
: DramRecordable<BaseDram>(name, tlmRecorder)
DramRecordablePower::DramRecordablePower()
{
}
template class DramRecordablePower<RecordableDram>;

View File

@@ -36,15 +36,11 @@
#ifndef DRAMRECORDABLEPOWER_H
#define DRAMRECORDABLEPOWER_H
#include "DramRecordable.h"
#include "../common/TlmRecorder.h"
template<class BaseDram>
class DramRecordablePower : public DramRecordable<BaseDram>
class DramRecordablePower
{
public:
DramRecordablePower(sc_module_name name, TlmRecorder *tlmRecorder);
SC_HAS_PROCESS(DramRecordablePower);
DramRecordablePower();
};
#endif // DRAMRECORDABLEPOWER_H