cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
This is a subgroup of Harris accelerated function with only synthesizable (Vivado HLS) functions/classes. More...
Files | |
file | harris.hpp |
The Role for a Harris Example application (UDP or TCP) | |
file | xf_config_params.h |
The Harris IP configuration header. | |
file | harris.cpp |
The Role for a Harris Example application (UDP or TCP) | |
file | xf_harris_accel.cpp |
The Harris top-level. | |
Classes | |
struct | Axis< D > |
Typedefs | |
typedef uint8_t | mat_elmt_t |
typedef ap_uint< 512 > | membus_512_t |
typedef membus_512_t | membus_t |
Enumerations | |
enum | EchoCtrl { ECHO_PATH_THRU = 0 , ECHO_STORE_FWD = 1 , ECHO_OFF = 2 , ECHO_PATH_THRU = 0 , ECHO_STORE_FWD = 1 , ECHO_OFF = 2 , ECHO_PATH_THRU = 0 , ECHO_STORE_FWD = 1 , ECHO_OFF = 2 , ECHO_PATH_THRU = 0 , ECHO_STORE_FWD = 1 , ECHO_OFF = 2 , ECHO_PATH_THRU = 0 , ECHO_STORE_FWD = 1 , ECHO_OFF = 2 , ECHO_PATH_THRU = 0 , ECHO_STORE_FWD = 1 , ECHO_OFF = 2 , ECHO_PATH_THRU = 0 , ECHO_STORE_FWD = 1 , ECHO_OFF = 2 , ECHO_STORE_FWD = 0 , ECHO_PATH_THRU = 1 , ECHO_CTRL_DISABLED = 0 , ECHO_PATH_THRU = 1 , ECHO_STORE_FWD = 2 , ECHO_OFF = 3 } |
Functions | |
void | harris (ap_uint< 32 > *pi_rank, ap_uint< 32 > *pi_size, stream< NetworkWord > &siSHL_This_Data, stream< NetworkWord > &soTHIS_Shl_Data, stream< NetworkMetaStream > &siNrc_meta, stream< NetworkMetaStream > &soNrc_meta, ap_uint< 32 > *po_rx_ports) |
Main process of the Harris Application directives. More... | |
void | pPortAndDestionation (ap_uint< 32 > *pi_rank, ap_uint< 32 > *pi_size, stream< NodeId > &sDstNode_sig, ap_uint< 32 > *po_rx_ports) |
void | storeWordToArray (uint64_t input, ap_uint< 8 > img[16 *16/((64/8))], unsigned int *processed_word, unsigned int *image_loaded) |
Store a net word to local memory. More... | |
void | storeWordToAxiStream (NetworkWord word, stream< ap_uint< 8 >> &img_in_axi_stream, unsigned int *processed_word_rx, unsigned int *processed_bytes_rx, stream< bool > &sImageLoaded) |
Store a net word to a local AXI stream. More... | |
void | pRXPath (stream< NetworkWord > &siSHL_This_Data, stream< NetworkMetaStream > &siNrc_meta, stream< NetworkMetaStream > &sRxtoTx_Meta, stream< ap_uint< 8 >> &img_in_axi_stream, NetworkMetaStream meta_tmp, unsigned int *processed_word_rx, unsigned int *processed_bytes_rx, stream< bool > &sImageLoaded) |
Receive Path - From SHELL to THIS. More... | |
void | pProcPath (stream< NetworkWord > &sRxpToTxp_Data, stream< ap_uint< 8 >> &img_in_axi_stream, stream< ap_uint< 64 >> &img_out_axi_stream, stream< bool > &sImageLoaded) |
Processing Path - Main processing FSM for Vitis kernels. More... | |
void | pTXPath (stream< NodeId > &sDstNode_sig, stream< NetworkWord > &soTHIS_Shl_Data, stream< NetworkMetaStream > &soNrc_meta, stream< NetworkWord > &sRxpToTxp_Data, stream< NetworkMetaStream > &sRxtoTx_Meta, unsigned int *processed_word_tx, ap_uint< 32 > *pi_rank, ap_uint< 32 > *pi_size) |
Transmit Path - From THIS to SHELL. More... | |
void | harris_accel (xf::cv::Mat< XF_8UC1, 16, 16, XF_NPPC1 > &_src, xf::cv::Mat< XF_8UC1, 16, 16, XF_NPPC1 > &_dst, unsigned short Thresh, unsigned short k) |
Top-level accelerated function of the Harris Application with xf::cv I/F. More... | |
void | cornerHarrisAccelArray (ap_uint< 8 > *img_inp, ap_uint< 64 > *img_out, int rows, int cols, int threshold, int k) |
Top-level accelerated function of the Harris Application with array I/F. More... | |
void | cornerHarrisAccelStream (hls::stream< ap_uint< 8 >> &img_in_axi_stream, hls::stream< ap_uint< 64 >> &img_out_axi_stream, int rows, int cols, int threshold, int k) |
Top-level accelerated function of the Harris Application with array I/F. More... | |
void | cornerHarrisAccelMem (membus_t *img_inp, membus_t *img_out, int rows, int cols, int threshold, int k) |
Top-level accelerated function of the Harris Application with array I/F. More... | |
Variables | |
uint8_t | enqueueFSM = 0 |
uint8_t | dequeueFSM = 0 |
uint8_t | HarrisFSM = 0 |
uint8_t | fsmStateDDR = 9 |
unsigned int | sRxpToTxp_DataCounter = 0 |
This is a subgroup of Harris accelerated function with only synthesizable (Vivado HLS) functions/classes.
This is a subgroup of Harris accelerated function with only synthesizable (HLS) functions/classes.
#define BLOCK_WIDTH 3 |
Definition at line 60 of file xf_config_params.h.
#define BPERMDW_512 (MEMDW_512/8) |
Definition at line 120 of file harris.hpp.
#define BYTE_PER_MEM_WORD BPERMDW_512 |
Definition at line 132 of file harris.hpp.
#define CHECK_CHUNK_SIZE 0x400 |
This define configures tha AXI burst size of DDRM memory-mapped interfaces AXI4 allows 4KiB, but Role's AXI interconnect is configured at max 1KiB 0x40->64, 0x400->1024B(1KiB), 0x1000->4KiB.
Definition at line 131 of file harris.hpp.
#define CYCLES_UNTIL_TIMEOUT 0x0100 |
Definition at line 147 of file harris.hpp.
#define Data_t_in ap_axiu<INPUT_PTR_WIDTH, 0, 0, 0> |
Definition at line 104 of file harris.hpp.
#define Data_t_out ap_axiu<OUTPUT_PTR_WIDTH, 0, 0, 0> |
Definition at line 105 of file harris.hpp.
#define DDR_LATENCY (52/4) |
Definition at line 151 of file harris.hpp.
#define DEFAULT_RX_PORT 2718 |
Definition at line 97 of file harris.hpp.
#define DEFAULT_TX_PORT 2718 |
Definition at line 96 of file harris.hpp.
#define EXTRA_DDR_LATENCY_DUE_II (64 + 8) |
Definition at line 152 of file harris.hpp.
#define FILTER_WIDTH 3 |
Definition at line 59 of file xf_config_params.h.
#define FSM_CHK_PROC_BYTES 11 |
Definition at line 81 of file harris.hpp.
#define FSM_CHK_SKIP 10 |
Definition at line 80 of file harris.hpp.
#define FSM_CHK_WRT_CHNK_TO_DDR_PND 12 |
Definition at line 82 of file harris.hpp.
#define FSM_DONE 1 |
Definition at line 93 of file harris.hpp.
#define FSM_IDLE 9 |
Definition at line 79 of file harris.hpp.
#define FSM_WR_PAT_CMD 13 |
Definition at line 83 of file harris.hpp.
#define FSM_WR_PAT_DATA 15 |
Definition at line 85 of file harris.hpp.
#define FSM_WR_PAT_LOAD 14 |
Definition at line 84 of file harris.hpp.
#define FSM_WR_PAT_STS_A 16 |
Definition at line 86 of file harris.hpp.
#define FSM_WR_PAT_STS_B 17 |
Definition at line 87 of file harris.hpp.
#define FSM_WR_PAT_STS_C 18 |
Definition at line 88 of file harris.hpp.
#define FSM_WRITE_NEW_DATA 0 |
Definition at line 92 of file harris.hpp.
#define fsmStateDDRdef uint8_t |
Definition at line 144 of file harris.hpp.
#define HARRIS_RETURN_RESULTS 4 |
Definition at line 74 of file harris.hpp.
#define HARRIS_RETURN_RESULTS_ABSORB_DDR_LAT 5 |
Definition at line 75 of file harris.hpp.
#define HARRIS_RETURN_RESULTS_FWD 7 |
Definition at line 77 of file harris.hpp.
#define HARRIS_RETURN_RESULTS_UNPACK 6 |
Definition at line 76 of file harris.hpp.
#define KWPERMDW_512 (BPERMDW_512/sizeof(IN_TYPE)) |
Definition at line 121 of file harris.hpp.
#define LOAD_IN_STREAM 3 |
Definition at line 73 of file harris.hpp.
#define MAX_NB_OF_ELMT_PERDW (BPERDW/sizeof(mat_elmt_t)) |
Definition at line 112 of file harris.hpp.
#define MAX_NB_OF_ELMT_READ 16 |
Definition at line 108 of file harris.hpp.
#define MAX_NB_OF_WORDS_READ (MAX_NB_OF_ELMT_READ*sizeof(mat_elmt_t)/BPERDW) |
Definition at line 111 of file harris.hpp.
#define MAXCORNERS 1024 |
Definition at line 63 of file xf_config_params.h.
#define MEMDW_512 512 |
Definition at line 119 of file harris.hpp.
#define NMS_RADIUS 1 |
Definition at line 61 of file xf_config_params.h.
#define NO 1 |
Definition at line 57 of file xf_config_params.h.
#define PacketFsmType uint8_t |
Definition at line 89 of file harris.hpp.
#define PortFsmType uint8_t |
Definition at line 94 of file harris.hpp.
#define PORTS_OPENED 0x1F |
Definition at line 102 of file harris.hpp.
#define PROCESSING_PACKET 2 |
Definition at line 72 of file harris.hpp.
#define RO 0 |
Definition at line 56 of file xf_config_params.h.
#define ROLE_IS_HARRIS |
Definition at line 67 of file harris.hpp.
#define TOTMEMDW_512 (1 + (IMGSIZE - 1) / BPERMDW_512) |
Definition at line 124 of file harris.hpp.
#define TRANSFERS_PER_CHUNK (CHECK_CHUNK_SIZE/BYTE_PER_MEM_WORD) |
Definition at line 133 of file harris.hpp.
#define TRANSFERS_PER_CHUNK_DIVEND (TOTMEMDW_512-(TOTMEMDW_512/TRANSFERS_PER_CHUNK)*TRANSFERS_PER_CHUNK) |
Definition at line 134 of file harris.hpp.
#define TYPICAL_DDR_LATENCY 4 |
Definition at line 148 of file harris.hpp.
#define WAIT_FOR_META 0 |
Definition at line 70 of file harris.hpp.
#define WAIT_FOR_STREAM_PAIR 1 |
Definition at line 71 of file harris.hpp.
#define WAIT_FOR_TX 8 |
Definition at line 78 of file harris.hpp.
#define XF_USE_URAM false |
Definition at line 65 of file xf_config_params.h.
typedef uint8_t mat_elmt_t |
Definition at line 109 of file harris.hpp.
typedef ap_uint< 512 > membus_512_t |
Definition at line 122 of file harris.hpp.
typedef membus_512_t membus_t |
Definition at line 123 of file harris.hpp.
enum EchoCtrl |
SHELL/MMIO/EchoCtrl - Config Register
Definition at line 60 of file harris.hpp.
void cornerHarrisAccelArray | ( | ap_uint< 8 > * | img_inp, |
ap_uint< 64 > * | img_out, | ||
int | rows, | ||
int | cols, | ||
int | threshold, | ||
int | k | ||
) |
Top-level accelerated function of the Harris Application with array I/F.
Definition at line 58 of file xf_harris_accel.cpp.
void cornerHarrisAccelMem | ( | membus_t * | img_inp, |
membus_t * | img_out, | ||
int | rows, | ||
int | cols, | ||
int | threshold, | ||
int | k | ||
) |
Top-level accelerated function of the Harris Application with array I/F.
Definition at line 216 of file xf_harris_accel.cpp.
void cornerHarrisAccelStream | ( | hls::stream< ap_uint< 8 >> & | img_in_axi_stream, |
hls::stream< ap_uint< 64 >> & | img_out_axi_stream, | ||
int | rows, | ||
int | cols, | ||
int | threshold, | ||
int | k | ||
) |
Top-level accelerated function of the Harris Application with array I/F.
Definition at line 106 of file xf_harris_accel.cpp.
void harris | ( | ap_uint< 32 > * | pi_rank, |
ap_uint< 32 > * | pi_size, | ||
stream< NetworkWord > & | siSHL_This_Data, | ||
stream< NetworkWord > & | soTHIS_Shl_Data, | ||
stream< NetworkMetaStream > & | siNrc_meta, | ||
stream< NetworkMetaStream > & | soNrc_meta, | ||
ap_uint< 32 > * | po_rx_ports | ||
) |
Main process of the Harris Application directives.
Definition at line 918 of file harris.cpp.
void harris_accel | ( | xf::cv::Mat< XF_8UC1, 16, 16, XF_NPPC1 > & | _src, |
xf::cv::Mat< XF_8UC1, 16, 16, XF_NPPC1 > & | _dst, | ||
unsigned short | Thresh, | ||
unsigned short | k | ||
) |
Top-level accelerated function of the Harris Application with xf::cv I/F.
Definition at line 41 of file xf_harris_accel.cpp.
void pPortAndDestionation | ( | ap_uint< 32 > * | pi_rank, |
ap_uint< 32 > * | pi_size, | ||
stream< NodeId > & | sDstNode_sig, | ||
ap_uint< 32 > * | po_rx_ports | ||
) |
void pProcPath | ( | stream< NetworkWord > & | sRxpToTxp_Data, |
stream< ap_uint< 8 >> & | img_in_axi_stream, | ||
stream< ap_uint< 64 >> & | img_out_axi_stream, | ||
stream< bool > & | sImageLoaded | ||
) |
Processing Path - Main processing FSM for Vitis kernels.
[out] | sRxpToTxp_Data | |
[in] | img_in_axi_stream | |
[in] | img_out_axi_stream | |
[out] | processed_word_rx | |
[in] | sImageLoaded |
Definition at line 580 of file harris.cpp.
void pRXPath | ( | stream< NetworkWord > & | siSHL_This_Data, |
stream< NetworkMetaStream > & | siNrc_meta, | ||
stream< NetworkMetaStream > & | sRxtoTx_Meta, | ||
stream< ap_uint< 8 >> & | img_in_axi_stream, | ||
NetworkMetaStream | meta_tmp, | ||
unsigned int * | processed_word_rx, | ||
unsigned int * | processed_bytes_rx, | ||
stream< bool > & | sImageLoaded | ||
) |
Receive Path - From SHELL to THIS.
[in] | siSHL_This_Data | |
[in] | siNrc_meta | |
[out] | sRxtoTx_Meta | |
[out] | img_in_axi_stream | |
[out] | meta_tmp | |
[out] | processed_word | |
[out] | sImageLoaded |
Definition at line 513 of file harris.cpp.
void pTXPath | ( | stream< NodeId > & | sDstNode_sig, |
stream< NetworkWord > & | soTHIS_Shl_Data, | ||
stream< NetworkMetaStream > & | soNrc_meta, | ||
stream< NetworkWord > & | sRxpToTxp_Data, | ||
stream< NetworkMetaStream > & | sRxtoTx_Meta, | ||
unsigned int * | processed_word_tx, | ||
ap_uint< 32 > * | pi_rank, | ||
ap_uint< 32 > * | pi_size | ||
) |
Transmit Path - From THIS to SHELL.
[out] | soTHIS_Shl_Data | |
[out] | soNrc_meta | |
[in] | sRxpToTxp_Data | |
[in] | sRxtoTx_Meta | |
[in] | pi_rank | |
[in] | pi_size |
Definition at line 782 of file harris.cpp.
void storeWordToArray | ( | uint64_t | input, |
ap_uint< 8 > | img[16 *16/((64/8))], | ||
unsigned int * | processed_word, | ||
unsigned int * | image_loaded | ||
) |
Store a net word to local memory.
Definition at line 105 of file harris.cpp.
void storeWordToAxiStream | ( | NetworkWord | word, |
stream< ap_uint< 8 >> & | img_in_axi_stream, | ||
unsigned int * | processed_word_rx, | ||
unsigned int * | processed_bytes_rx, | ||
stream< bool > & | sImageLoaded | ||
) |
Store a net word to a local AXI stream.
Definition at line 129 of file harris.cpp.
uint8_t dequeueFSM = 0 |
Definition at line 51 of file harris.cpp.
uint8_t enqueueFSM = 0 |
Definition at line 50 of file harris.cpp.
uint8_t fsmStateDDR = 9 |
Definition at line 53 of file harris.cpp.
uint8_t HarrisFSM = 0 |
Definition at line 52 of file harris.cpp.
unsigned int sRxpToTxp_DataCounter = 0 |
Definition at line 768 of file harris.cpp.