Go to the documentation of this file.
34 #include "params/BloomFilterBlock.hh"
39 namespace bloom_filter
43 :
Base(
p), masksLSBs(
p.masks_lsbs),
44 masksSizes(
p.masks_sizes)
47 "Masks haven't been properly provided");
49 "There must be at least one mask to extract an address bitfield");
53 "The bitfields must be indexable in the filter");
55 std::numeric_limits<Addr>::digits,
56 "The total size of the bitfields cannot be bigger than the " \
57 "number of bits in an address");
92 assert(hashed_addr <
filter.size());
Block(const BloomFilterBlockParams &p)
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.
int getCount(Addr addr) const override
Get the value stored in the corresponding filter entry of an address.
void set(Addr addr) override
Perform the filter specific function to set the corresponding entries (can be multiple) of an address...
void unset(Addr addr) override
Perform the filter specific function to clear the corresponding entries (can be multiple) of an addre...
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.
std::vector< unsigned > masksLSBs
Position of the LSB of each mask.
std::vector< unsigned > masksSizes
Number of bits in each mask.
int hash(Addr addr) const
XOR hash between bitfields of an address, provided by the mask vector.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
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