Skip to content

Commit

Permalink
Change SimpleDL1 to SimpleCache3
Browse files Browse the repository at this point in the history
  • Loading branch information
vineethkm committed Nov 3, 2023
1 parent 82504f6 commit 459f5b7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion core/DCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace olympia {
const uint32_t l1_associativity = p->l1_associativity;
std::unique_ptr<sparta::cache::ReplacementIF> 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
Expand Down
4 changes: 2 additions & 2 deletions core/DCache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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_;
Expand Down
2 changes: 1 addition & 1 deletion core/LSU.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 6 additions & 6 deletions core/SimpleDL1.hpp → core/SimpleCache3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ namespace olympia

}; // class SimpleCacheLine

class SimpleDL1 : public sparta::cache::SimpleCache2<SimpleCacheLine>,
class SimpleCache3 : public sparta::cache::SimpleCache2<SimpleCacheLine>,
public sparta::TreeNode,
public sparta::cache::PreloadableIF,
public sparta::cache::PreloadDumpableIF

{
public:
using Handle = std::shared_ptr<SimpleDL1>;
SimpleDL1(sparta::TreeNode* parent,
using Handle = std::shared_ptr<SimpleCache3>;
SimpleCache3(sparta::TreeNode* parent,
uint64_t cache_size_kb,
uint64_t line_size,
const sparta::cache::ReplacementIF& rep) :
Expand All @@ -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:
/**
Expand Down Expand Up @@ -161,6 +161,6 @@ namespace olympia
//! the preloadPkt call to us.
sparta::cache::PreloadableNode preloadable_;

}; // class SimpleDL1
}; // class SimpleCache3

} // namespace olympia

0 comments on commit 459f5b7

Please sign in to comment.