bfGen - 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 bfGen (
    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
    )

Generate the bloomfilter in on-chip RAM blocks.

This primitive calculates hash of input values, and marks corresponding bits in the on-chip RAM blocks. RAM blocks can be configured to be 18-bit BRAM or 72-bit URAM.

The bloom-filter bit vectors are passed as three pointers, and behind the scene, one hash value is calculated and manipulated into three distint marker locatins in these vectors.

To check for existance of a value with generated vector, use the bfCheck primitive.

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.