From 27fed220035e89af0a039e1e0036f9369b6df0c1 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Sat, 22 Jun 2019 20:49:57 +0200 Subject: [PATCH 1/4] 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 From 882a0eaa90e78529e44eec9c86f2363b8bddc1b1 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Sat, 22 Jun 2019 20:50:07 +0200 Subject: [PATCH 2/4] Revert "Included templates for new DRAMs." This reverts commit 8f0e59c85e02a407ffb23caddc2d9244c42abc55. --- DRAMSys/library/library.pro | 12 +---- .../configuration/ConfigurationLoader.cpp | 1 - .../core/configuration/ConfigurationLoader.h | 1 - .../controller/core/configuration/MemSpec.h | 1 - DRAMSys/library/src/simulation/DramDDR3.cpp | 41 ---------------- DRAMSys/library/src/simulation/DramDDR3.h | 47 ------------------- DRAMSys/library/src/simulation/DramDDR4.cpp | 6 --- DRAMSys/library/src/simulation/DramDDR4.h | 12 ----- .../library/src/simulation/DramRecordable.cpp | 41 ---------------- .../library/src/simulation/DramRecordable.h | 46 ------------------ .../src/simulation/DramRecordablePower.cpp | 41 ---------------- .../src/simulation/DramRecordablePower.h | 46 ------------------ .../library/src/simulation/RecordableDram.cpp | 8 ++-- .../library/src/simulation/RecordableDram.h | 2 +- 14 files changed, 7 insertions(+), 298 deletions(-) delete mode 100644 DRAMSys/library/src/simulation/DramDDR3.cpp delete mode 100644 DRAMSys/library/src/simulation/DramDDR3.h delete mode 100644 DRAMSys/library/src/simulation/DramDDR4.cpp delete mode 100644 DRAMSys/library/src/simulation/DramDDR4.h delete mode 100644 DRAMSys/library/src/simulation/DramRecordable.cpp delete mode 100644 DRAMSys/library/src/simulation/DramRecordable.h delete mode 100644 DRAMSys/library/src/simulation/DramRecordablePower.cpp delete mode 100644 DRAMSys/library/src/simulation/DramRecordablePower.h diff --git a/DRAMSys/library/library.pro b/DRAMSys/library/library.pro index 6fbf6467..ab7ca602 100644 --- a/DRAMSys/library/library.pro +++ b/DRAMSys/library/library.pro @@ -143,11 +143,7 @@ SOURCES += \ src/common/XmlAddressDecoder.cpp \ src/controller/core/timingCalculations.cpp \ src/common/dramExtensions.cpp \ - src/common/utils.cpp \ - src/simulation/DramDDR3.cpp \ - src/simulation/DramDDR4.cpp \ - src/simulation/DramRecordable.cpp \ - src/simulation/DramRecordablePower.cpp + src/common/utils.cpp HEADERS += \ src/common/third_party/tinyxml2/tinyxml2.h \ @@ -224,11 +220,7 @@ HEADERS += \ src/controller/core/timingCalculations.h \ src/common/dramExtensions.h \ src/common/utils.h \ - src/controller/core/configuration/TemperatureSimConfig.h \ - src/simulation/DramDDR3.h \ - src/simulation/DramDDR4.h \ - src/simulation/DramRecordable.h \ - src/simulation/DramRecordablePower.h + src/controller/core/configuration/TemperatureSimConfig.h #src/common/third_party/json/include/nlohmann/json.hpp \ thermalsim = $$(THERMALSIM) diff --git a/DRAMSys/library/src/controller/core/configuration/ConfigurationLoader.cpp b/DRAMSys/library/src/controller/core/configuration/ConfigurationLoader.cpp index def1d129..79b9965f 100644 --- a/DRAMSys/library/src/controller/core/configuration/ConfigurationLoader.cpp +++ b/DRAMSys/library/src/controller/core/configuration/ConfigurationLoader.cpp @@ -32,7 +32,6 @@ * Authors: * Janik Schlemminger * Matthias Jung - * Lukas Steiner */ #include "ConfigurationLoader.h" diff --git a/DRAMSys/library/src/controller/core/configuration/ConfigurationLoader.h b/DRAMSys/library/src/controller/core/configuration/ConfigurationLoader.h index 7a4e0410..d7a12c57 100644 --- a/DRAMSys/library/src/controller/core/configuration/ConfigurationLoader.h +++ b/DRAMSys/library/src/controller/core/configuration/ConfigurationLoader.h @@ -32,7 +32,6 @@ * Authors: * Janik Schlemminger * Matthias Jung - * Lukas Steiner */ #ifndef CONFIGURATIONLOADER_H diff --git a/DRAMSys/library/src/controller/core/configuration/MemSpec.h b/DRAMSys/library/src/controller/core/configuration/MemSpec.h index d13f2701..fc4fb576 100644 --- a/DRAMSys/library/src/controller/core/configuration/MemSpec.h +++ b/DRAMSys/library/src/controller/core/configuration/MemSpec.h @@ -32,7 +32,6 @@ * Authors: * Janik Schlemminger * Matthias Jung - * Lukas Steiner */ #ifndef MEMSPEC_H diff --git a/DRAMSys/library/src/simulation/DramDDR3.cpp b/DRAMSys/library/src/simulation/DramDDR3.cpp deleted file mode 100644 index 1999d3a5..00000000 --- a/DRAMSys/library/src/simulation/DramDDR3.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 "DramDDR3.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 deleted file mode 100644 index a64cdeaf..00000000 --- a/DRAMSys/library/src/simulation/DramDDR3.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 - */ - -#ifndef DRAMDDR3_H -#define DRAMDDR3_H - -#include "Dram.h" - -class DramDDR3 : public Dram -{ -public: - DramDDR3(sc_module_name); -}; - -#endif // DRAMDDR3_H diff --git a/DRAMSys/library/src/simulation/DramDDR4.cpp b/DRAMSys/library/src/simulation/DramDDR4.cpp deleted file mode 100644 index 1390f29d..00000000 --- a/DRAMSys/library/src/simulation/DramDDR4.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "DramDDR4.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 deleted file mode 100644 index 14212125..00000000 --- a/DRAMSys/library/src/simulation/DramDDR4.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef DRAMDDR4_H -#define DRAMDDR4_H - -#include "Dram.h" - -class DramDDR4 : public Dram -{ -public: - DramDDR4(sc_module_name); -}; - -#endif // DRAMDDR4_H diff --git a/DRAMSys/library/src/simulation/DramRecordable.cpp b/DRAMSys/library/src/simulation/DramRecordable.cpp deleted file mode 100644 index 85d9d73a..00000000 --- a/DRAMSys/library/src/simulation/DramRecordable.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 "DramRecordable.h" - -DramRecordable::DramRecordable() -{ - -} diff --git a/DRAMSys/library/src/simulation/DramRecordable.h b/DRAMSys/library/src/simulation/DramRecordable.h deleted file mode 100644 index cbbfea32..00000000 --- a/DRAMSys/library/src/simulation/DramRecordable.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 - */ - -#ifndef DRAMRECORDABLE_H -#define DRAMRECORDABLE_H - - -class DramRecordable -{ -public: - DramRecordable(); -}; - -#endif // DRAMRECORDABLE_H diff --git a/DRAMSys/library/src/simulation/DramRecordablePower.cpp b/DRAMSys/library/src/simulation/DramRecordablePower.cpp deleted file mode 100644 index c1287cd3..00000000 --- a/DRAMSys/library/src/simulation/DramRecordablePower.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 "DramRecordablePower.h" - -DramRecordablePower::DramRecordablePower() -{ - -} diff --git a/DRAMSys/library/src/simulation/DramRecordablePower.h b/DRAMSys/library/src/simulation/DramRecordablePower.h deleted file mode 100644 index 032022bd..00000000 --- a/DRAMSys/library/src/simulation/DramRecordablePower.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 - */ - -#ifndef DRAMRECORDABLEPOWER_H -#define DRAMRECORDABLEPOWER_H - - -class DramRecordablePower -{ -public: - DramRecordablePower(); -}; - -#endif // DRAMRECORDABLEPOWER_H diff --git a/DRAMSys/library/src/simulation/RecordableDram.cpp b/DRAMSys/library/src/simulation/RecordableDram.cpp index 699f0a74..295cac31 100644 --- a/DRAMSys/library/src/simulation/RecordableDram.cpp +++ b/DRAMSys/library/src/simulation/RecordableDram.cpp @@ -98,19 +98,19 @@ tlm_sync_enum RecordableDram::nb_transport_fw(tlm_generic_payload &payload, // It estimates the current average power which will be stored in the trace database for visualization purposes. void RecordableDram::powerWindow() { - unsigned long long clkCycles = 0; + unsigned long long clk_cycles = 0; do { // At the very beginning (zero clock cycles) the energy is 0, so we wait first wait(powerWindowSize); - clkCycles = sc_time_stamp().value() / + clk_cycles = sc_time_stamp().value() / Configuration::getInstance().memSpec->clk.value(); - DRAMPower->calcWindowEnergy(clkCycles); + DRAMPower->calcWindowEnergy(clk_cycles); // During operation the energy should never be zero since the device is always consuming - assert(!isEqual(DRAMPower->getEnergy().window_energy, 0.0)); + assert(!is_equal(DRAMPower->getEnergy().window_energy, 0.0)); // Store the time (in seconds) and the current average power (in mW) into the database recordPower(); diff --git a/DRAMSys/library/src/simulation/RecordableDram.h b/DRAMSys/library/src/simulation/RecordableDram.h index 0434177a..a362f2cc 100644 --- a/DRAMSys/library/src/simulation/RecordableDram.h +++ b/DRAMSys/library/src/simulation/RecordableDram.h @@ -62,7 +62,7 @@ private: // When working with floats, we have to decide ourselves what is an // acceptable definition for "equal". Here the number is compared with a // suitable error margin (0.00001). - bool isEqual(double a, double b, const double epsilon = 1e-05) + bool is_equal(double a, double b, const double epsilon = 1e-05) { return std::fabs(a - b) < epsilon; } From c3da6912a95db4f2c548263988fbf88de279e0c4 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Sat, 22 Jun 2019 21:49:18 +0200 Subject: [PATCH 3/4] Further renaming of schedulers. --- .../library/resources/configs/mcconfigs/fifo.xml | 2 +- .../resources/configs/mcconfigs/fifoStrict.xml | 2 +- .../resources/configs/mcconfigs/fifo_ecc.xml | 2 +- .../resources/configs/mcconfigs/fr_fcfs.xml | 2 +- .../resources/configs/mcconfigs/fr_fcfs_grp.xml | 2 +- .../resources/configs/mcconfigs/fr_fcfs_rp.xml | 2 +- .../library/resources/configs/mcconfigs/grp.xml | 2 +- .../resources/configs/mcconfigs/rgrmccfg.xml | 2 +- DRAMSys/library/src/controller/Controller.cpp | 12 ++++++------ .../library/src/controller/scheduler/FrFcfs.cpp | 4 ++-- DRAMSys/traceAnalyzer/scripts/tests.py | 4 ++-- README.md | 14 +++++++++----- 12 files changed, 27 insertions(+), 23 deletions(-) diff --git a/DRAMSys/library/resources/configs/mcconfigs/fifo.xml b/DRAMSys/library/resources/configs/mcconfigs/fifo.xml index 73231bba..d01b9248 100644 --- a/DRAMSys/library/resources/configs/mcconfigs/fifo.xml +++ b/DRAMSys/library/resources/configs/mcconfigs/fifo.xml @@ -1,7 +1,7 @@ - + diff --git a/DRAMSys/library/resources/configs/mcconfigs/fifoStrict.xml b/DRAMSys/library/resources/configs/mcconfigs/fifoStrict.xml index dee4f5d4..ed869b57 100644 --- a/DRAMSys/library/resources/configs/mcconfigs/fifoStrict.xml +++ b/DRAMSys/library/resources/configs/mcconfigs/fifoStrict.xml @@ -1,7 +1,7 @@ - + diff --git a/DRAMSys/library/resources/configs/mcconfigs/fifo_ecc.xml b/DRAMSys/library/resources/configs/mcconfigs/fifo_ecc.xml index 73231bba..d01b9248 100644 --- a/DRAMSys/library/resources/configs/mcconfigs/fifo_ecc.xml +++ b/DRAMSys/library/resources/configs/mcconfigs/fifo_ecc.xml @@ -1,7 +1,7 @@ - + diff --git a/DRAMSys/library/resources/configs/mcconfigs/fr_fcfs.xml b/DRAMSys/library/resources/configs/mcconfigs/fr_fcfs.xml index e5a6579e..20db08cd 100644 --- a/DRAMSys/library/resources/configs/mcconfigs/fr_fcfs.xml +++ b/DRAMSys/library/resources/configs/mcconfigs/fr_fcfs.xml @@ -1,7 +1,7 @@ - + diff --git a/DRAMSys/library/resources/configs/mcconfigs/fr_fcfs_grp.xml b/DRAMSys/library/resources/configs/mcconfigs/fr_fcfs_grp.xml index 75570d40..dad77bf6 100644 --- a/DRAMSys/library/resources/configs/mcconfigs/fr_fcfs_grp.xml +++ b/DRAMSys/library/resources/configs/mcconfigs/fr_fcfs_grp.xml @@ -1,7 +1,7 @@ - + diff --git a/DRAMSys/library/resources/configs/mcconfigs/fr_fcfs_rp.xml b/DRAMSys/library/resources/configs/mcconfigs/fr_fcfs_rp.xml index 5a9f1c0c..3f636ba0 100644 --- a/DRAMSys/library/resources/configs/mcconfigs/fr_fcfs_rp.xml +++ b/DRAMSys/library/resources/configs/mcconfigs/fr_fcfs_rp.xml @@ -1,7 +1,7 @@ - + diff --git a/DRAMSys/library/resources/configs/mcconfigs/grp.xml b/DRAMSys/library/resources/configs/mcconfigs/grp.xml index a62969fb..753cca46 100644 --- a/DRAMSys/library/resources/configs/mcconfigs/grp.xml +++ b/DRAMSys/library/resources/configs/mcconfigs/grp.xml @@ -1,7 +1,7 @@ - + diff --git a/DRAMSys/library/resources/configs/mcconfigs/rgrmccfg.xml b/DRAMSys/library/resources/configs/mcconfigs/rgrmccfg.xml index bb8b64ae..b17e59ce 100644 --- a/DRAMSys/library/resources/configs/mcconfigs/rgrmccfg.xml +++ b/DRAMSys/library/resources/configs/mcconfigs/rgrmccfg.xml @@ -1,7 +1,7 @@ - + diff --git a/DRAMSys/library/src/controller/Controller.cpp b/DRAMSys/library/src/controller/Controller.cpp index d9bf6d89..1fac6814 100644 --- a/DRAMSys/library/src/controller/Controller.cpp +++ b/DRAMSys/library/src/controller/Controller.cpp @@ -103,17 +103,17 @@ void Controller::buildScheduler() { string selectedScheduler = Configuration::getInstance().Scheduler; - if (selectedScheduler == "FIFO") { + if (selectedScheduler == "Fifo") { scheduler = new Fifo(*controllerCore); - } else if (selectedScheduler == "FIFO_STRICT") { + } else if (selectedScheduler == "FifoStrict") { scheduler = new FifoStrict(*this, *controllerCore); - } else if (selectedScheduler == "FR_FCFS") { + } else if (selectedScheduler == "FrFcfs") { scheduler = new FrFcfs(*controllerCore); - } else if (selectedScheduler == "FR_FCFS_RP") { + } else if (selectedScheduler == "FrFcfsRp") { scheduler = new FrFcfsRp(*controllerCore); - } else if (selectedScheduler == "FR_FCFS_GRP") { + } else if (selectedScheduler == "FrFcfsGrp") { scheduler = new FrFcfsGrp(*controllerCore, this); - } else if (selectedScheduler == "GRP") { + } else if (selectedScheduler == "Grp") { scheduler = new Grp(*controllerCore, this); } else if (selectedScheduler == "SMS") { scheduler = new SMS("SMS", *controllerCore, diff --git a/DRAMSys/library/src/controller/scheduler/FrFcfs.cpp b/DRAMSys/library/src/controller/scheduler/FrFcfs.cpp index afa12aa2..c0d742af 100644 --- a/DRAMSys/library/src/controller/scheduler/FrFcfs.cpp +++ b/DRAMSys/library/src/controller/scheduler/FrFcfs.cpp @@ -73,7 +73,7 @@ std::pair FrFcfs::getNextRequest(Bank bank) if (buffer[bank].empty()) return std::pair(Command::NOP, NULL); - // In FR_FCFS row hits have always the highest priority, therefore we search + // In FrFcfs row hits have always the highest priority, therefore we search // for row hits. If we find a row hit, we remove the transaction from the // queue and send it to the DRAM. std::deque::iterator it = findRowHit(bank); @@ -84,7 +84,7 @@ std::pair FrFcfs::getNextRequest(Bank bank) return std::pair(getReadWriteCommand(payload), payload); } - // If there is no row hit, the FR_FCFS takes always the oldest transaction + // If there is no row hit, the FrFcfs takes always the oldest transaction // in the buffer, i.e. the transaction in the front. return std::pair(getNextCommand(buffer[bank].front()), buffer[bank].front()); diff --git a/DRAMSys/traceAnalyzer/scripts/tests.py b/DRAMSys/traceAnalyzer/scripts/tests.py index 260853eb..2d3becd9 100755 --- a/DRAMSys/traceAnalyzer/scripts/tests.py +++ b/DRAMSys/traceAnalyzer/scripts/tests.py @@ -713,10 +713,10 @@ def strict_transaction_order(connection): transactions += str(currentRow[0]) + "," if (transactions != ""): - if (dramconfig.scheduler == "FIFO_STRICT"): + if (dramconfig.scheduler == "FifoStrict"): return TestFailed("Transactions {0} is/are not in Order ".format(transactions)) else: - return TestResult(True, "Transactions are not in Order, however this is okay since no FIFO_STRICT was choosen") + return TestResult(True, "Transactions are not in Order, however this is okay since no FifoStrict was choosen") return TestSuceeded() # ----------- powerdown checks --------------------------------------- diff --git a/README.md b/README.md index c23d501e..42b094de 100644 --- a/README.md +++ b/README.md @@ -706,7 +706,7 @@ Below, the sub-configurations are listed and explained. - + @@ -764,9 +764,13 @@ Below, the sub-configurations are listed and explained. - *MaxNrOfTransactions* (unsigned int) - Maximum number of transactions. - *Scheduler* (string) - - "FIFO": first in, first out - - "FIFO_STRICT": out-of-order treatment of queue elements not allowed - - "FR_FCFS": first-come, first-served + - "Fifo": first in, first out + - "FifoStrict": out-of-order treatment of queue elements not allowed + - "FrFcfs": first ready first-come-first-served + - "FrFcfsRp": first ready first-come-first-served read priority + - "FrFcfsGrp": first ready first-come-first-served grouper + - "Grp": grouper + - "SMS": will be removed - *Capsize* (unsigned int) - Capacitor cell size. - *PowerDownMode* (enum EPowerDownMode) @@ -1410,7 +1414,7 @@ Enable the error model in fr_fcfs.xml. - + From cff2455be255f2042e0fd250d3fa5ded3fc1693e Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Sat, 22 Jun 2019 22:08:00 +0200 Subject: [PATCH 4/4] Bugfix for failing tests: missing renaming. --- DRAMSys/tests/DDR3/configs/mcconfigs/fifoStrict.xml | 2 +- DRAMSys/tests/DDR3/configs/mcconfigs/fr_fcfs.xml | 2 +- DRAMSys/tests/TLM_compliance/fifoStrict.xml | 2 +- DRAMSys/tests/WIDEIO/configs/mcconfigs/fifoStrict.xml | 2 +- DRAMSys/tests/error/fr_fcfs.xml | 2 +- DRAMSys/tests/simple/fifoStrict.xml | 2 +- DRAMSys/tests/timing_compliance/fifoStrict.xml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DRAMSys/tests/DDR3/configs/mcconfigs/fifoStrict.xml b/DRAMSys/tests/DDR3/configs/mcconfigs/fifoStrict.xml index dee4f5d4..ed869b57 100644 --- a/DRAMSys/tests/DDR3/configs/mcconfigs/fifoStrict.xml +++ b/DRAMSys/tests/DDR3/configs/mcconfigs/fifoStrict.xml @@ -1,7 +1,7 @@ - + diff --git a/DRAMSys/tests/DDR3/configs/mcconfigs/fr_fcfs.xml b/DRAMSys/tests/DDR3/configs/mcconfigs/fr_fcfs.xml index e5a6579e..20db08cd 100644 --- a/DRAMSys/tests/DDR3/configs/mcconfigs/fr_fcfs.xml +++ b/DRAMSys/tests/DDR3/configs/mcconfigs/fr_fcfs.xml @@ -1,7 +1,7 @@ - + diff --git a/DRAMSys/tests/TLM_compliance/fifoStrict.xml b/DRAMSys/tests/TLM_compliance/fifoStrict.xml index d5814755..440f465a 100644 --- a/DRAMSys/tests/TLM_compliance/fifoStrict.xml +++ b/DRAMSys/tests/TLM_compliance/fifoStrict.xml @@ -2,7 +2,7 @@ - + diff --git a/DRAMSys/tests/WIDEIO/configs/mcconfigs/fifoStrict.xml b/DRAMSys/tests/WIDEIO/configs/mcconfigs/fifoStrict.xml index dee4f5d4..ed869b57 100644 --- a/DRAMSys/tests/WIDEIO/configs/mcconfigs/fifoStrict.xml +++ b/DRAMSys/tests/WIDEIO/configs/mcconfigs/fifoStrict.xml @@ -1,7 +1,7 @@ - + diff --git a/DRAMSys/tests/error/fr_fcfs.xml b/DRAMSys/tests/error/fr_fcfs.xml index c2861799..9066796c 100644 --- a/DRAMSys/tests/error/fr_fcfs.xml +++ b/DRAMSys/tests/error/fr_fcfs.xml @@ -2,7 +2,7 @@ - + diff --git a/DRAMSys/tests/simple/fifoStrict.xml b/DRAMSys/tests/simple/fifoStrict.xml index 43744c7d..247c4de3 100644 --- a/DRAMSys/tests/simple/fifoStrict.xml +++ b/DRAMSys/tests/simple/fifoStrict.xml @@ -2,7 +2,7 @@ - + diff --git a/DRAMSys/tests/timing_compliance/fifoStrict.xml b/DRAMSys/tests/timing_compliance/fifoStrict.xml index 2c84267e..fc213074 100644 --- a/DRAMSys/tests/timing_compliance/fifoStrict.xml +++ b/DRAMSys/tests/timing_compliance/fifoStrict.xml @@ -2,7 +2,7 @@ - +