Go to the documentation of this file.
36 #include "params/BloomFilterMultiBitSel.hh"
41 namespace bloom_filter
45 :
Base(
p), numHashes(
p.num_hashes),
46 parFilterSize(
p.size / numHashes),
47 isParallel(
p.is_parallel), skipBits(
p.skip_bits)
50 fatal(
"Can't divide filter (%d) in %d equal portions",
p.size,
80 uint64_t value =
bits(
addr, std::numeric_limits<Addr>::digits - 1,
82 const int max_bits = std::numeric_limits<Addr>::digits -
offsetBits;
87 bit = (hash_number +
numHashes *
i) % max_bits;
88 if (value & (1 << bit)) {
96 return result %
filter.size();
int getCount(Addr addr) const override
Get the value stored in the corresponding filter entry of an address.
#define fatal(...)
This implements a cprintf based fatal() function.
const int parFilterSize
Size of the filter when doing parallel hashing.
virtual int hash(Addr addr, int hash_number) const
Apply the selected the hash functions to an address.
const int numHashes
Number of hashes.
std::vector< SatCounter8 > filter
The filter itself.
const unsigned offsetBits
Number of LSB bits to ignore from the the addresses.
const int sizeBits
Number of bits needed to represent the size of the filter.
MultiBitSel(const BloomFilterMultiBitSelParams &p)
void set(Addr addr) override
Perform the filter specific function to set the corresponding entries (can be multiple) of an address...
const int skipBits
Bit offset from block number.
const bool isParallel
Whether hashing should be performed in parallel.
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Generated on Sun Jul 30 2023 01:56:51 for gem5 by doxygen 1.8.17