Go to the documentation of this file.
36 #include "params/BloomFilterMultiBitSel.hh"
41 :
Base(
p), numHashes(
p->num_hashes),
42 parFilterSize(
p->size / numHashes),
43 isParallel(
p->is_parallel), skipBits(
p->skip_bits)
46 fatal(
"Can't divide filter (%d) in %d equal portions",
p->size,
76 uint64_t value =
bits(
addr, std::numeric_limits<Addr>::digits - 1,
78 const int max_bits = std::numeric_limits<Addr>::digits -
offsetBits;
83 bit = (hash_number +
numHashes *
i) % max_bits;
84 if (value & (1 << bit)) {
92 return result %
filter.size();
99 BloomFilterMultiBitSelParams::create()
#define fatal(...)
This implements a cprintf based fatal() function.
MultiBitSel(const BloomFilterMultiBitSelParams *p)
const int parFilterSize
Size of the filter when doing parallel hashing.
const int sizeBits
Number of bits needed to represent the size of the filter.
const unsigned offsetBits
Number of LSB bits to ignore from the the addresses.
std::vector< SatCounter > filter
The filter itself.
const bool isParallel
Whether hashing should be performed in parallel.
const int numHashes
Number of hashes.
const int skipBits
Bit offset from block number.
void set(Addr addr) override
Perform the filter specific function to set the corresponding entries (can be multiple) of an address...
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int getCount(Addr addr) const override
Get the value stored in the corresponding filter entry of an address.
The MultiBitSel Bloom Filter associates an address to multiple entries through the use of multiple ha...
virtual int hash(Addr addr, int hash_number) const
Apply the selected the hash functions to an address.
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Generated on Wed Sep 30 2020 14:02:07 for gem5 by doxygen 1.8.17