Go to the documentation of this file.
34 #include "params/BloomFilterBlock.hh"
39 :
Base(
p), masksLSBs(
p->masks_lsbs),
40 masksSizes(
p->masks_sizes)
43 "Masks haven't been properly provided");
45 "There must be at least one mask to extract an address bitfield");
49 "The bitfields must be indexable in the filter");
51 std::numeric_limits<Addr>::digits,
52 "The total size of the bitfields cannot be bigger than the " \
53 "number of bits in an address");
88 assert(hashed_addr <
filter.size());
95 BloomFilterBlockParams::create()
const int sizeBits
Number of bits needed to represent the size of the filter.
void unset(Addr addr) override
Perform the filter specific function to clear the corresponding entries (can be multiple) of an addre...
void set(Addr addr) override
Perform the filter specific function to set the corresponding entries (can be multiple) of an address...
std::vector< unsigned > masksSizes
Number of bits in each mask.
const unsigned offsetBits
Number of LSB bits to ignore from the the addresses.
std::vector< SatCounter > filter
The filter itself.
Block(const BloomFilterBlockParams *p)
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.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Simple deletable (with false negatives) bloom filter that extracts bitfields of an address to use as ...
int hash(Addr addr) const
XOR hash between bitfields of an address, provided by the mask vector.
std::vector< unsigned > masksLSBs
Position of the LSB of each mask.
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