#include "xf_database/hash_multi_join.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 hashMultiJoin ( hls::stream <ap_uint <3>>& join_flag_strm, 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 )
Multi-PU Hash-Multi-Join primitive, using multiple DDR/HBM buffers.
This primitive shares most of the structure of hashJoinV3
. The inner table should be fed once, followed by the outer table 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. |
join_flag_strm | specifies the join type, this flag is only read once. |
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 | constains depth of hash, row number of join result |
pu_end_status_strms | constains depth of hash, row number of join result |
j_strm | output of joined result |
j_e_strm | end flag of joined result |