Daniel Carvalho has uploaded this change for review. (
https://gem5-review.googlesource.com/10141
Change subject: mem-cache: Remove findBlockBySetAndWay
......................................................................
mem-cache: Remove findBlockBySetAndWay
With a sector cache you can't find a block using only its set
and way, as there is the sector offset to take into account.
As it is not used anywhere in the code, I've opted to remove it,
but I could make it return a SectorBlk instead.
Change-Id: I4730a2b4ebb5738f7fc118201e208a1b9c3ba8e8
---
M src/mem/cache/tags/base.hh
M src/mem/cache/tags/base_set_assoc.cc
M src/mem/cache/tags/base_set_assoc.hh
M src/mem/cache/tags/fa_lru.cc
M src/mem/cache/tags/fa_lru.hh
5 files changed, 0 insertions(+), 37 deletions(-)
diff --git a/src/mem/cache/tags/base.hh b/src/mem/cache/tags/base.hh
index 4cf6774..29b9606 100644
--- a/src/mem/cache/tags/base.hh
+++ b/src/mem/cache/tags/base.hh
@@ -214,14 +214,6 @@
}
/**
- * Find the cache block given set and way
- * @param set The set of the block.
- * @param way The way of the block.
- * @return The cache block.
- */
- virtual CacheBlk *findBlockBySetAndWay(int set, int way) const = 0;
-
- /**
* Limit the allocation for the cache ways.
* @param ways The maximum number of ways available for replacement.
*/
diff --git a/src/mem/cache/tags/base_set_assoc.cc
b/src/mem/cache/tags/base_set_assoc.cc
index 49a6e9d..1761109 100644
--- a/src/mem/cache/tags/base_set_assoc.cc
+++ b/src/mem/cache/tags/base_set_assoc.cc
@@ -116,12 +116,6 @@
return blk;
}
-CacheBlk*
-BaseSetAssoc::findBlockBySetAndWay(int set, int way) const
-{
- return sets[set].blks[way];
-}
-
std::string
BaseSetAssoc::print() const {
std::string cache_state;
diff --git a/src/mem/cache/tags/base_set_assoc.hh
b/src/mem/cache/tags/base_set_assoc.hh
index 06e9583..ad04f0b 100644
--- a/src/mem/cache/tags/base_set_assoc.hh
+++ b/src/mem/cache/tags/base_set_assoc.hh
@@ -119,14 +119,6 @@
virtual ~BaseSetAssoc() {};
/**
- * Find the cache block given set and way
- * @param set The set of the block.
- * @param way The way of the block.
- * @return The cache block.
- */
- CacheBlk *findBlockBySetAndWay(int set, int way) const override;
-
- /**
* Access block and update replacement data. May not succeed, in which
case
* nullptr is returned. This has all the implications of a cache
* access and should only be used as such. Returns the access latency
as a
diff --git a/src/mem/cache/tags/fa_lru.cc b/src/mem/cache/tags/fa_lru.cc
index 43d3498..2a1c9b9 100644
--- a/src/mem/cache/tags/fa_lru.cc
+++ b/src/mem/cache/tags/fa_lru.cc
@@ -190,13 +190,6 @@
}
CacheBlk*
-FALRU::findBlockBySetAndWay(int set, int way) const
-{
- assert(set == 0);
- return &blks[way];
-}
-
-CacheBlk*
FALRU::findVictim(Addr addr)
{
return tail;
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index d3f8662..98369df 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -197,14 +197,6 @@
void insertBlock(PacketPtr pkt, CacheBlk *blk) override;
/**
- * Find the cache block given set and way
- * @param set The set of the block.
- * @param way The way of the block.
- * @return The cache block.
- */
- CacheBlk* findBlockBySetAndWay(int set, int way) const override;
-
- /**
* Generate the tag from the addres. For fully associative this is
just the
* block address.
* @param addr The address to get the tag from.
--
To view, visit https://gem5-review.googlesource.com/10141
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I4730a2b4ebb5738f7fc118201e208a1b9c3ba8e8
Gerrit-Change-Number: 10141
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <oda...@yahoo.com.br>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev