bfCheck - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English
#include "xf_database/bloom_filter.hpp"
template <
    bool IS_BRAM,
    int STR_IN_W,
    int BV_W
    >
void bfCheck (
    hls::stream <ap_uint <STR_IN_W>>& msg_strm,
    hls::stream <bool>& in_e_strm,
    ap_uint <IS_BRAM?16:72>* bit_vector_ptr0,
    ap_uint <IS_BRAM?16:72>* bit_vector_ptr1,
    ap_uint <IS_BRAM?16:72>* bit_vector_ptr2,
    hls::stream <bool>& out_v_strm,
    hls::stream <bool>& out_e_strm
    )

Check existance of value using bloom-filter vectors.

This primitive is designed to work with the bloom-filter vectors generated by the bfGen primitive. Basically, it detects the existance of value by hashing it and check for the corresponding vector bits. When hit, it is likely to be in the set of generating values, otherwise, it cannot be element of the set. RAM blocks can be configured to be 18-bit BRAM or 72-bit URAM, the setting must match bfGen .

Parameters:

IS_BRAM choose which types of memory to use. True for BRAM. False for URAM
STR_IN_W W width of the streamed input message, e.g., W=512.
BV_W width of the hash value. ptr0, ptr1 and ptr2 should point at MEM_SPACE=2^BV_W (bit).
msg_strm input message stream.
in_e_strm the flag that indicate the end of input message stream.
bit_vector_ptr0 the pointer of bit_vector0.
bit_vector_ptr1 the pointer of bit_vector1.
bit_vector_ptr2 the pointer of bit_vector2.
out_v_strm the output stream that indicate whether the value may exist <1 for true, 0 for false>.
out_e_strm the output end flag stream.