class xf::database::gqe::KernelCommand

#include "xf_database/kernel_command.hpp"

Overview

Class for generating configuration bits of gqePart , gqeJoin and gqeFilter kernels.


Methods

KernelCommand

KernelCommand ()

constructor of KernelCommand class. The kernel command used buffer is allocated on host. Some default settings are provided.

setScanColEnable

void setScanColEnable (
    int krn_id,
    int table_id,
    std::vector <int8_t> index
    )

scan valid cols.

Parameters:

krn_id 0 for gqeJoin, 1 for gqePart, 2 for gqeFilter.
table_id 0 for left table, 1 for right table.
index valid input column ids.

setRowIDValidEnable

void setRowIDValidEnable (
    int krn_id,
    int table_id,
    bool gen_rowID_en,
    bool valid_en
    )

set gen_rowIDEnable and validEnable flag.

Parameters:

krn_id 0 for gqeJoin, 1 for gqePart, 2 for gqeFilter.
table_id 0 for left table, 1 for right table.
gen_rowID_en enable flag for using GQE to generate row IDs internally. 1 for enable, 0 for disable.
valid_en enable flag for getting valid bits from off-chip memory or enabing every row internally. 1 for valid bits from off-chip memory, 0 for enabling every row.

setBypassOn

void setBypassOn ()

set bypass on.

setBloomfilterOn

void setBloomfilterOn (ap_uint <35> bf_size)

set bloom-filter on.

Parameters:

bf_size size of bloom-filter in bits, we need 35 bits to represent a range between 1 to 16 Gbits.

setDualKeyOn

void setDualKeyOn ()

set dual key on.

setJoinType

void setJoinType (int jointype)

set join type.

Parameters:

jointype Join type, default is INNER_JOIN.

setJoinWriteColEnable

void setJoinWriteColEnable (
    int krn_id,
    int table_id,
    std::vector <int8_t> index
    )

enables output columns for gqeJoin/Filter.

Parameters:

krn_id 0 for gqeJoin, 1 for gqePart, 2 for gqeFilter.
table_id 0 for left table, 1 for right table.
index output column ids.

setPartWriteColEnable

void setPartWriteColEnable (
    int krn_id,
    int table_id,
    std::vector <int8_t> index
    )

enables output columns for gqePart.

Parameters:

krn_id 0 for gqeJoin, 1 for gqePart, 2 for gqeFilter
table_id 0 for left table, 1 for right table
index output column ids

setFilter

void setFilter (
    int table_id,
    std::string filter_string
    )

set Filter string.

The string uses a , b , c , d to refer to first to the fourth column, and supports comparison and logical operator like C++. Parentheses can be used to group logic, but notice that the underlying hardware module does not support comparing one column with multiple constant boundaries in OR relationship. Integral constants will be extracted from expression.

For example, an expression could be (a < 10 && b < 20) || (c >= d) .

Parameters:

table_id 0 for left table, 1 for right table
filter_string filter expression string

getConfigBits

ap_uint <512>* getConfigBits () const

return config bit array.