34#include "params/BloomFilterBlock.hh"
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());
std::vector< SatCounter8 > filter
The filter itself.
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.
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...
std::vector< unsigned > masksLSBs
Position of the LSB of each mask.
int hash(Addr addr) const
XOR hash between bitfields of an address, provided by the mask vector.
std::vector< unsigned > masksSizes
Number of bits in each mask.
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.