hashJoinV3 - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English
#include "xf_database/hash_join_v3.hpp"
template <
    int HASH_MODE,
    int KEYW,
    int PW,
    int S_PW,
    int B_PW,
    int HASHWH,
    int HASHWL,
    int ARW,
    int CH_NM
    >
void hashJoinV3 (
    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 <256>* htb0_buf,
    ap_uint <256>* htb1_buf,
    ap_uint <256>* htb2_buf,
    ap_uint <256>* htb3_buf,
    ap_uint <256>* htb4_buf,
    ap_uint <256>* htb5_buf,
    ap_uint <256>* htb6_buf,
    ap_uint <256>* htb7_buf,
    ap_uint <256>* stb0_buf,
    ap_uint <256>* stb1_buf,
    ap_uint <256>* stb2_buf,
    ap_uint <256>* stb3_buf,
    ap_uint <256>* stb4_buf,
    ap_uint <256>* stb5_buf,
    ap_uint <256>* stb6_buf,
    ap_uint <256>* stb7_buf,
    hls::stream <ap_uint <32>>& pu_begin_status_strms,
    hls::stream <ap_uint <32>>& pu_end_status_strms,
    hls::stream <ap_uint <KEYW+S_PW+B_PW>>& j_strm,
    hls::stream <bool>& j_e_strm
    )

Hash-Join v3 primitive, it takes more resourse than hashJoinMPU and promises a better performance in large size of table.

The maximum size of small table is 256MBx8(HBM number)=2GB in this design. The total hash entries is equal to 1<<(HASHWH + HASHWL), and it is limitied to maximum of 1M entries because of the size of URAM in a single SLR.

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. To be different with hashJoinMPU , the small table and big table should be fed only once.

Parameters:

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, larger than 24 is suggested.
CH_NM number of input channels, 1,2,4.
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.
htb0_buf HBM/DDR buffer of hash_table0
htb1_buf HBM/DDR buffer of hash_table1
htb2_buf HBM/DDR buffer of hash_table2
htb3_buf HBM/DDR buffer of hash_table3
htb4_buf HBM/DDR buffer of hash_table4
htb5_buf HBM/DDR buffer of hash_table5
htb6_buf HBM/DDR buffer of hash_table6
htb7_buf HBM/DDR buffer of hash_table7
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
pu_begin_status_strms contains hash depth, row number of join result
pu_end_status_strms contains hash depth, row number of join result
j_strm output of joined result
j_e_strm end flag of joined result