From 459f5b73565da4f9c254a8b69720f44fad0dc17a Mon Sep 17 00:00:00 2001 From: vineethkm Date: Fri, 3 Nov 2023 13:05:04 +0530 Subject: [PATCH] Change SimpleDL1 to SimpleCache3 --- core/DCache.cpp | 2 +- core/DCache.hpp | 4 ++-- core/LSU.hpp | 2 +- core/{SimpleDL1.hpp => SimpleCache3.hpp} | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) rename core/{SimpleDL1.hpp => SimpleCache3.hpp} (93%) diff --git a/core/DCache.cpp b/core/DCache.cpp index 4b022a0a..9d2aaf4d 100644 --- a/core/DCache.cpp +++ b/core/DCache.cpp @@ -20,7 +20,7 @@ namespace olympia { const uint32_t l1_associativity = p->l1_associativity; std::unique_ptr repl(new sparta::cache::TreePLRUReplacement (l1_associativity)); - l1_cache_.reset(new SimpleDL1(getContainer(), l1_size_kb, l1_line_size, *repl)); + l1_cache_.reset(new SimpleCache3(getContainer(), l1_size_kb, l1_line_size, *repl)); } // Reload cache line diff --git a/core/DCache.hpp b/core/DCache.hpp index 949397ed..0480b8c2 100644 --- a/core/DCache.hpp +++ b/core/DCache.hpp @@ -5,7 +5,7 @@ #include "sparta/ports/SignalPort.hpp" #include "sparta/simulation/ParameterSet.hpp" #include "sparta/utils/LogUtils.hpp" -#include "SimpleDL1.hpp" +#include "SimpleCache3.hpp" #include "Inst.hpp" #include "cache/TreePLRUReplacement.hpp" #include "MemoryAccessInfo.hpp" @@ -37,7 +37,7 @@ namespace olympia { void getAckFromBIU_(const InstPtr &inst_ptr); - using L1Handle = SimpleDL1::Handle; + using L1Handle = SimpleCache3::Handle; L1Handle l1_cache_; const bool l1_always_hit_; bool busy_; diff --git a/core/LSU.hpp b/core/LSU.hpp index 81a94fa5..6126f3de 100644 --- a/core/LSU.hpp +++ b/core/LSU.hpp @@ -24,7 +24,7 @@ #include "Inst.hpp" #include "CoreTypes.hpp" #include "FlushManager.hpp" -#include "SimpleDL1.hpp" +#include "SimpleCache3.hpp" #include "MemoryAccessInfo.hpp" #include "MMU.hpp" #include "DCache.hpp" diff --git a/core/SimpleDL1.hpp b/core/SimpleCache3.hpp similarity index 93% rename from core/SimpleDL1.hpp rename to core/SimpleCache3.hpp index 338207a8..6a4dad89 100644 --- a/core/SimpleDL1.hpp +++ b/core/SimpleCache3.hpp @@ -87,15 +87,15 @@ namespace olympia }; // class SimpleCacheLine - class SimpleDL1 : public sparta::cache::SimpleCache2, + class SimpleCache3 : public sparta::cache::SimpleCache2, public sparta::TreeNode, public sparta::cache::PreloadableIF, public sparta::cache::PreloadDumpableIF { public: - using Handle = std::shared_ptr; - SimpleDL1(sparta::TreeNode* parent, + using Handle = std::shared_ptr; + SimpleCache3(sparta::TreeNode* parent, uint64_t cache_size_kb, uint64_t line_size, const sparta::cache::ReplacementIF& rep) : @@ -107,8 +107,8 @@ namespace olympia sparta::TreeNode(parent, "l1cache", "Simple L1 DCache"), sparta::cache::PreloadableIF(), sparta::cache::PreloadDumpableIF(), - preloadable_(this, std::bind(&SimpleDL1::preloadPkt_, this, _1), - std::bind(&SimpleDL1::preloadDump_, this, _1)) + preloadable_(this, std::bind(&SimpleCache3::preloadPkt_, this, _1), + std::bind(&SimpleCache3::preloadDump_, this, _1)) {} private: /** @@ -161,6 +161,6 @@ namespace olympia //! the preloadPkt call to us. sparta::cache::PreloadableNode preloadable_; - }; // class SimpleDL1 + }; // class SimpleCache3 } // namespace olympia