summaryrefslogtreecommitdiff
path: root/src/mem/ruby
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2019-05-06 00:11:08 +0200
committerDaniel Carvalho <odanrc@yahoo.com.br>2019-07-06 22:55:32 +0000
commit2d1d25f1964653aeed849cb1119feb6c6aaa5b08 (patch)
treeefad1563dc58d44ce50460597fb12db6fa85a131 /src/mem/ruby
parentd7840d8388b6f5442b4c21aae5a978f8fb957b16 (diff)
downloadgem5-2d1d25f1964653aeed849cb1119feb6c6aaa5b08.tar.xz
mem-ruby: Remove index based functions in bloom filters
Most of the index based functions were not implemented, and a user is more likely to be interested in checking the filter contents based on an address than an index. As a side effect, the Bulk's hash function became unused, and according to the paper permute() was doing more than just permuting, so it was renamed. Change-Id: I6423a2565a082fee2e7f11fa489a11f253064d99 Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18732 Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/ruby')
-rw-r--r--src/mem/ruby/filters/AbstractBloomFilter.hh4
-rw-r--r--src/mem/ruby/filters/BlockBloomFilter.cc18
-rw-r--r--src/mem/ruby/filters/BlockBloomFilter.hh3
-rw-r--r--src/mem/ruby/filters/BulkBloomFilter.cc19
-rw-r--r--src/mem/ruby/filters/BulkBloomFilter.hh3
-rw-r--r--src/mem/ruby/filters/H3BloomFilter.cc17
-rw-r--r--src/mem/ruby/filters/H3BloomFilter.hh4
-rw-r--r--src/mem/ruby/filters/LSB_CountingBloomFilter.cc19
-rw-r--r--src/mem/ruby/filters/LSB_CountingBloomFilter.hh3
-rw-r--r--src/mem/ruby/filters/MultiBitSelBloomFilter.cc17
-rw-r--r--src/mem/ruby/filters/MultiBitSelBloomFilter.hh4
-rw-r--r--src/mem/ruby/filters/MultiGrainBloomFilter.cc20
-rw-r--r--src/mem/ruby/filters/MultiGrainBloomFilter.hh3
-rw-r--r--src/mem/ruby/filters/NonCountingBloomFilter.cc18
-rw-r--r--src/mem/ruby/filters/NonCountingBloomFilter.hh4
15 files changed, 0 insertions, 156 deletions
diff --git a/src/mem/ruby/filters/AbstractBloomFilter.hh b/src/mem/ruby/filters/AbstractBloomFilter.hh
index bdf7c6323..3e90cadd9 100644
--- a/src/mem/ruby/filters/AbstractBloomFilter.hh
+++ b/src/mem/ruby/filters/AbstractBloomFilter.hh
@@ -51,10 +51,6 @@ class AbstractBloomFilter
virtual bool isSet(Addr addr) = 0;
virtual int getCount(Addr addr) = 0;
virtual int getTotalCount() = 0;
-
- virtual int getIndex(Addr addr) = 0;
- virtual int readBit(const int index) = 0;
- virtual void writeBit(const int index, const int value) = 0;
};
#endif // __MEM_RUBY_FILTERS_ABSTRACTBLOOMFILTER_HH__
diff --git a/src/mem/ruby/filters/BlockBloomFilter.cc b/src/mem/ruby/filters/BlockBloomFilter.cc
index e990497d0..351692885 100644
--- a/src/mem/ruby/filters/BlockBloomFilter.cc
+++ b/src/mem/ruby/filters/BlockBloomFilter.cc
@@ -100,24 +100,6 @@ BlockBloomFilter::getTotalCount()
}
int
-BlockBloomFilter::getIndex(Addr addr)
-{
- return get_index(addr);
-}
-
-int
-BlockBloomFilter::readBit(const int index)
-{
- return m_filter[index];
-}
-
-void
-BlockBloomFilter::writeBit(const int index, const int value)
-{
- m_filter[index] = value;
-}
-
-int
BlockBloomFilter::get_index(Addr addr)
{
// Pull out some bit field ==> B1
diff --git a/src/mem/ruby/filters/BlockBloomFilter.hh b/src/mem/ruby/filters/BlockBloomFilter.hh
index 088759c5e..5eaf6ead3 100644
--- a/src/mem/ruby/filters/BlockBloomFilter.hh
+++ b/src/mem/ruby/filters/BlockBloomFilter.hh
@@ -48,9 +48,6 @@ class BlockBloomFilter : public AbstractBloomFilter
bool isSet(Addr addr);
int getCount(Addr addr);
int getTotalCount();
- int getIndex(Addr addr);
- int readBit(const int index);
- void writeBit(const int index, const int value);
private:
int get_index(Addr addr);
diff --git a/src/mem/ruby/filters/BulkBloomFilter.cc b/src/mem/ruby/filters/BulkBloomFilter.cc
index d7fa1a388..da873f942 100644
--- a/src/mem/ruby/filters/BulkBloomFilter.cc
+++ b/src/mem/ruby/filters/BulkBloomFilter.cc
@@ -164,25 +164,6 @@ BulkBloomFilter::getTotalCount()
}
int
-BulkBloomFilter::getIndex(Addr addr)
-{
- return get_index(addr);
-}
-
-int
-BulkBloomFilter::readBit(const int index)
-{
- return 0;
- // TODO
-}
-
-void
-BulkBloomFilter::writeBit(const int index, const int value)
-{
- // TODO
-}
-
-int
BulkBloomFilter::get_index(Addr addr)
{
return bitSelect(addr, RubySystem::getBlockSizeBits(),
diff --git a/src/mem/ruby/filters/BulkBloomFilter.hh b/src/mem/ruby/filters/BulkBloomFilter.hh
index a3df10530..39cd80944 100644
--- a/src/mem/ruby/filters/BulkBloomFilter.hh
+++ b/src/mem/ruby/filters/BulkBloomFilter.hh
@@ -47,9 +47,6 @@ class BulkBloomFilter : public AbstractBloomFilter
bool isSet(Addr addr);
int getCount(Addr addr);
int getTotalCount();
- int getIndex(Addr addr);
- int readBit(const int index);
- void writeBit(const int index, const int value);
private:
int get_index(Addr addr);
diff --git a/src/mem/ruby/filters/H3BloomFilter.cc b/src/mem/ruby/filters/H3BloomFilter.cc
index 90b3546d9..7f44a2bd3 100644
--- a/src/mem/ruby/filters/H3BloomFilter.cc
+++ b/src/mem/ruby/filters/H3BloomFilter.cc
@@ -439,23 +439,6 @@ H3BloomFilter::getCount(Addr addr)
}
int
-H3BloomFilter::getIndex(Addr addr)
-{
- return 0;
-}
-
-int
-H3BloomFilter::readBit(const int index)
-{
- return 0;
-}
-
-void
-H3BloomFilter::writeBit(const int index, const int value)
-{
-}
-
-int
H3BloomFilter::getTotalCount()
{
int count = 0;
diff --git a/src/mem/ruby/filters/H3BloomFilter.hh b/src/mem/ruby/filters/H3BloomFilter.hh
index 93dc7d373..1df0d2a16 100644
--- a/src/mem/ruby/filters/H3BloomFilter.hh
+++ b/src/mem/ruby/filters/H3BloomFilter.hh
@@ -48,10 +48,6 @@ class H3BloomFilter : public AbstractBloomFilter
int getCount(Addr addr);
int getTotalCount();
- int getIndex(Addr addr);
- int readBit(const int index);
- void writeBit(const int index, const int value);
-
int
operator[](const int index) const
{
diff --git a/src/mem/ruby/filters/LSB_CountingBloomFilter.cc b/src/mem/ruby/filters/LSB_CountingBloomFilter.cc
index 98c480b4e..5d9475bed 100644
--- a/src/mem/ruby/filters/LSB_CountingBloomFilter.cc
+++ b/src/mem/ruby/filters/LSB_CountingBloomFilter.cc
@@ -102,25 +102,6 @@ LSB_CountingBloomFilter::getTotalCount()
}
int
-LSB_CountingBloomFilter::getIndex(Addr addr)
-{
- return get_index(addr);
-}
-
-int
-LSB_CountingBloomFilter::readBit(const int index)
-{
- return 0;
- // TODO
-}
-
-void
-LSB_CountingBloomFilter::writeBit(const int index, const int value)
-{
- // TODO
-}
-
-int
LSB_CountingBloomFilter::get_index(Addr addr)
{
return bitSelect(addr, RubySystem::getBlockSizeBits(),
diff --git a/src/mem/ruby/filters/LSB_CountingBloomFilter.hh b/src/mem/ruby/filters/LSB_CountingBloomFilter.hh
index 11df169dd..7c02f7726 100644
--- a/src/mem/ruby/filters/LSB_CountingBloomFilter.hh
+++ b/src/mem/ruby/filters/LSB_CountingBloomFilter.hh
@@ -48,9 +48,6 @@ class LSB_CountingBloomFilter : public AbstractBloomFilter
bool isSet(Addr addr);
int getCount(Addr addr);
int getTotalCount();
- int getIndex(Addr addr);
- int readBit(const int index);
- void writeBit(const int index, const int value);
private:
int get_index(Addr addr);
diff --git a/src/mem/ruby/filters/MultiBitSelBloomFilter.cc b/src/mem/ruby/filters/MultiBitSelBloomFilter.cc
index 206e5b07a..f64e14eab 100644
--- a/src/mem/ruby/filters/MultiBitSelBloomFilter.cc
+++ b/src/mem/ruby/filters/MultiBitSelBloomFilter.cc
@@ -94,23 +94,6 @@ MultiBitSelBloomFilter::getCount(Addr addr)
}
int
-MultiBitSelBloomFilter::getIndex(Addr addr)
-{
- return 0;
-}
-
-int
-MultiBitSelBloomFilter::readBit(const int index)
-{
- return 0;
-}
-
-void
-MultiBitSelBloomFilter::writeBit(const int index, const int value)
-{
-}
-
-int
MultiBitSelBloomFilter::getTotalCount()
{
int count = 0;
diff --git a/src/mem/ruby/filters/MultiBitSelBloomFilter.hh b/src/mem/ruby/filters/MultiBitSelBloomFilter.hh
index 94ec38d38..45952de93 100644
--- a/src/mem/ruby/filters/MultiBitSelBloomFilter.hh
+++ b/src/mem/ruby/filters/MultiBitSelBloomFilter.hh
@@ -50,10 +50,6 @@ class MultiBitSelBloomFilter : public AbstractBloomFilter
int getCount(Addr addr);
int getTotalCount();
- int getIndex(Addr addr);
- int readBit(const int index);
- void writeBit(const int index, const int value);
-
int
operator[](const int index) const
{
diff --git a/src/mem/ruby/filters/MultiGrainBloomFilter.cc b/src/mem/ruby/filters/MultiGrainBloomFilter.cc
index a4de7a7af..29af6eb1b 100644
--- a/src/mem/ruby/filters/MultiGrainBloomFilter.cc
+++ b/src/mem/ruby/filters/MultiGrainBloomFilter.cc
@@ -112,26 +112,6 @@ MultiGrainBloomFilter::getTotalCount()
}
int
-MultiGrainBloomFilter::getIndex(Addr addr)
-{
- return 0;
- // TODO
-}
-
-int
-MultiGrainBloomFilter::readBit(const int index)
-{
- return 0;
- // TODO
-}
-
-void
-MultiGrainBloomFilter::writeBit(const int index, const int value)
-{
- // TODO
-}
-
-int
MultiGrainBloomFilter::get_block_index(Addr addr)
{
// grap a chunk of bits after byte offset
diff --git a/src/mem/ruby/filters/MultiGrainBloomFilter.hh b/src/mem/ruby/filters/MultiGrainBloomFilter.hh
index 3be6ff640..6f9a58478 100644
--- a/src/mem/ruby/filters/MultiGrainBloomFilter.hh
+++ b/src/mem/ruby/filters/MultiGrainBloomFilter.hh
@@ -47,9 +47,6 @@ class MultiGrainBloomFilter : public AbstractBloomFilter
bool isSet(Addr addr);
int getCount(Addr addr);
int getTotalCount();
- int getIndex(Addr addr);
- int readBit(const int index);
- void writeBit(const int index, const int value);
private:
int get_block_index(Addr addr);
diff --git a/src/mem/ruby/filters/NonCountingBloomFilter.cc b/src/mem/ruby/filters/NonCountingBloomFilter.cc
index f012a7249..50432d7a8 100644
--- a/src/mem/ruby/filters/NonCountingBloomFilter.cc
+++ b/src/mem/ruby/filters/NonCountingBloomFilter.cc
@@ -105,24 +105,6 @@ NonCountingBloomFilter::getTotalCount()
}
int
-NonCountingBloomFilter::getIndex(Addr addr)
-{
- return get_index(addr);
-}
-
-int
-NonCountingBloomFilter::readBit(const int index)
-{
- return m_filter[index];
-}
-
-void
-NonCountingBloomFilter::writeBit(const int index, const int value)
-{
- m_filter[index] = value;
-}
-
-int
NonCountingBloomFilter::get_index(Addr addr)
{
return bitSelect(addr, RubySystem::getBlockSizeBits() + m_offset,
diff --git a/src/mem/ruby/filters/NonCountingBloomFilter.hh b/src/mem/ruby/filters/NonCountingBloomFilter.hh
index 2f1885d8d..08610606e 100644
--- a/src/mem/ruby/filters/NonCountingBloomFilter.hh
+++ b/src/mem/ruby/filters/NonCountingBloomFilter.hh
@@ -49,10 +49,6 @@ class NonCountingBloomFilter : public AbstractBloomFilter
int getCount(Addr addr);
int getTotalCount();
- int getIndex(Addr addr);
- int readBit(const int index);
- void writeBit(const int index, const int value);
-
int
operator[](const int index) const
{