DP-HLS
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
Traceback Namespace Reference

Functions

void Traceback (tbp_t(&tbmat)[MAX_QUERY_LENGTH][MAX_REFERENCE_LENGTH], tbr_t(&traceback_out)[MAX_REFERENCE_LENGTH+MAX_QUERY_LENGTH], const int max_row, const int max_col)
 Traceback function. It extract the traceback path from a matrix of traceback pointers. More...
 
void TracebackOptimized (tbp_t(&tbmat)[PE_NUM][TBMEM_SIZE], traceback_buf_t(&traceback_out), idx_t(&ck_start_col)[MAX_QUERY_LENGTH/PE_NUM], idx_t(&ck_end_col)[MAX_QUERY_LENGTH/PE_NUM], int ck_idx, int pe_idx, int col_idx, int v_row, int v_col)
 Traceback function. It extract the traceback path from a matrix of traceback pointers. More...
 
template<int VIRTUAL_CHUNK_WIDTH>
void NextAddressFixedSize (tbr_t &nav, int &chunk, int &pe, int &col, int &v_row, int &v_col)
 
template<int CHUNK_WIDTH>
void TracebackFixedSize (tbp_t(&tbmat)[PE_NUM][TBMEM_SIZE], traceback_buf_t(&traceback_out), int ck_idx, int pe_idx, int col_idx, int v_row, int v_col)
 
void pointer_to_coordinate (tbp_t tbp, TB_STATE &state, int &row, int &column)
 A traceback pointer to coordinate mapping function. The traceback function is implemeted as a state machine. The state represents the matrix the traceback is tracing in. To increase the customizability, the function that maps a traceback pointer with it's current state to the next coordinate and the state the next step goes to shall be overrite by the user. More...
 
void state_initial (tbp_t tbp, TB_STATE &state)
 Function used to set the initial state of the traceback, according to the ruls of the traceback pointer set by the user. More...
 
tbp_t extract_direction (tbp_t tbp)
 Private helper function that extract the direction bit of the traceback pointer. More...
 
tbr_t state_to_path (TB_STATE state)
 
void NextAddress (tbr_t &nagivation, idx_t(&ck_start_idx)[CK_NUM], idx_t(&ck_end_idx)[CK_NUM], int &chunk, int &pe, int &col, int &v_row, int &v_col)
 

Function Documentation

tbp_t Traceback::extract_direction ( tbp_t  tbp)

Private helper function that extract the direction bit of the traceback pointer.

Parameters
tbp: Traceback Pointer.
void Traceback::NextAddress ( tbr_t nagivation,
idx_t(&)  ck_start_idx[CK_NUM],
idx_t(&)  ck_end_idx[CK_NUM],
int &  chunk,
int &  pe,
int &  col,
int &  v_row,
int &  v_col 
)
template<int VIRTUAL_CHUNK_WIDTH>
void Traceback::NextAddressFixedSize ( tbr_t nav,
int &  chunk,
int &  pe,
int &  col,
int &  v_row,
int &  v_col 
)
void Traceback::pointer_to_coordinate ( tbp_t  tbp,
TB_STATE &  state,
int &  row,
int &  column 
)

A traceback pointer to coordinate mapping function. The traceback function is implemeted as a state machine. The state represents the matrix the traceback is tracing in. To increase the customizability, the function that maps a traceback pointer with it's current state to the next coordinate and the state the next step goes to shall be overrite by the user.

Parameters
tbp: A traceback pointer
state: The state of the traceback at the pointer.
row: Row index of the poiner.
column: Column index of the pointer.
void Traceback::state_initial ( tbp_t  tbp,
TB_STATE &  state 
)

Function used to set the initial state of the traceback, according to the ruls of the traceback pointer set by the user.

Parameters
tbp: initial traceback pointer.
tbr_t Traceback::state_to_path ( TB_STATE  state)
Parameters
state: Current state of the state machine.
Returns
Number corresponding to the traceback navigation.
void Traceback::Traceback ( tbp_t(&)  tbmat[MAX_QUERY_LENGTH][MAX_REFERENCE_LENGTH],
tbr_t(&)  traceback_out[MAX_REFERENCE_LENGTH+MAX_QUERY_LENGTH],
const int  max_row,
const int  max_col 
)

Traceback function. It extract the traceback path from a matrix of traceback pointers.

Parameters
max_row: Row index of the maximum element to start the traceback.
max_col: Column index of the maximum element to start the traceback.
template<int CHUNK_WIDTH>
void Traceback::TracebackFixedSize ( tbp_t(&)  tbmat[PE_NUM][TBMEM_SIZE],
traceback_buf_t traceback_out,
int  ck_idx,
int  pe_idx,
int  col_idx,
int  v_row,
int  v_col 
)
void Traceback::TracebackOptimized ( tbp_t(&)  tbmat[PE_NUM][TBMEM_SIZE],
traceback_buf_t traceback_out,
idx_t(&)  ck_start_col[MAX_QUERY_LENGTH/PE_NUM],
idx_t(&)  ck_end_col[MAX_QUERY_LENGTH/PE_NUM],
int  ck_idx,
int  pe_idx,
int  col_idx,
int  v_row,
int  v_col 
)

Traceback function. It extract the traceback path from a matrix of traceback pointers.

Parameters
max_row: Row index of the maximum element to start the traceback.
max_col: Column index of the maximum element to start the traceback.