hashJoinMPU overload (1) - 2023.2 English

Vitis Libraries

Release Date
2023.2 English
#include "xf_database/hash_join_v2.hpp"
template <
    int HASH_MODE,
    int KEYW,
    int PW,
    int S_PW,
    int B_PW,
    int HASHWH,
    int HASHWL,
    int ARW,
    int BFW,
    int CH_NM,
    int BF_W,
    int EN_BF
static void hashJoinMPU (
    hls::stream <ap_uint <KEYW>> k0_strm_arry [CH_NM],
    hls::stream <ap_uint <PW>> p0_strm_arry [CH_NM],
    hls::stream <bool> e0_strm_arry [CH_NM],
    ap_uint <BFW>* stb0_buf,
    ap_uint <BFW>* stb1_buf,
    ap_uint <BFW>* stb2_buf,
    ap_uint <BFW>* stb3_buf,
    ap_uint <BFW>* stb4_buf,
    ap_uint <BFW>* stb5_buf,
    ap_uint <BFW>* stb6_buf,
    ap_uint <BFW>* stb7_buf,
    hls::stream <ap_uint <S_PW+B_PW>>& j1_strm,
    hls::stream <bool>& e5_strm

Multi-PU Hash-Join primitive, using multiple DDR/HBM buffers.

The max number of lines of small table is 2M in this design. It is assumed that the hash-conflict is within 512 per bin.

This module can accept more than 1 input row per cycle, via multiple input channels. The small table and the big table shares the same input ports, so the width of the payload should be the max of both, while the data should be aligned to the little-end. The small table should be fed TWICE, followed by the big table once.


HASH_MODE 0 for radix and 1 for Jenkin’s Lookup3 hash.
KEYW width of key, in bit.
PW width of max payload, in bit.
S_PW width of payload of small table.
B_PW width of payload of big table.
HASHWH number of hash bits used for PU/buffer selection, 1~3.
HASHWL number of hash bits used for hash-table in PU.
ARW width of address, log2(small table max num of rows).
BFW width of buffer.
CH_NM number of input channels, 1,2,4.
BF_W bloom-filter hash width.
EN_BF bloom-filter switch, 0 for off, 1 for on.
k0_strm_arry input of key columns of both tables.
p0_strm_arry input of payload columns of both tables.
e0_strm_arry input of end signal of both tables.
stb0_buf HBM/DDR buffer of PU0
stb1_buf HBM/DDR buffer of PU1
stb2_buf HBM/DDR buffer of PU2
stb3_buf HBM/DDR buffer of PU3
stb4_buf HBM/DDR buffer of PU4
stb5_buf HBM/DDR buffer of PU5
stb6_buf HBM/DDR buffer of PU6
stb7_buf HBM/DDR buffer of PU7
j1_strm output of joined rows.
e5_strm end signal of joined rows.