cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
This is a subgroup of MedianBlur accelerated function with only synthesizable (HLS) functions/classes. More...
Files | |
file | median_blur.hpp |
The Role for a MedianBlur Example application (UDP or TCP) | |
file | xf_config_params.h |
The MedianBlur IP configuration header. | |
file | median_blur.cpp |
The Role for a MedianBlur Example application (UDP or TCP) | |
file | xf_median_blur_accel.cpp |
The MedianBlur 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 | median_blur (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, stream< DmCmd > &soMemWrCmdP0, stream< DmSts > &siMemWrStsP0, stream< Axis< 512 > > &soMemWriteP0, membus_t *lcl_mem0, membus_t *lcl_mem1) |
Main process of the MedianBlur Application directives. More... | |
void | pPortAndDestionation (ap_uint< 32 > *pi_rank, ap_uint< 32 > *pi_size, ap_uint< 32 > *po_rx_ports) |
void | storeWordToArray (uint64_t input, ap_uint< 8 > img[1024 *1024/((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 | pRXPathDDROLD (stream< NetworkWord > &siSHL_This_Data, stream< NetworkMetaStream > &siNrc_meta, stream< NetworkMetaStream > &sRxtoTx_Meta, stream< DmCmd > &soMemWrCmdP0, stream< DmSts > &siMemWrStsP0, stream< Axis< 512 > > &soMemWriteP0, NetworkMetaStream meta_tmp, unsigned int *processed_bytes_rx, stream< bool > &sImageLoaded) |
Receive Path - From SHELL to THIS. More... | |
void | pRXPathNetToStream (stream< NetworkWord > &siSHL_This_Data, stream< NetworkMetaStream > &siNrc_meta, stream< NetworkMetaStream > &sRxtoTx_Meta, stream< ap_uint< 512 >> &img_in_axi_stream, stream< bool > &sMemBurstRx) |
Receive Path - From SHELL to THIS. More... | |
void | pRXPathStreamToDDR (stream< ap_uint< 512 >> &img_in_axi_stream, stream< bool > &sMemBurstRx, stream< DmCmd > &soMemWrCmdP0, stream< DmSts > &siMemWrStsP0, stream< Axis< 512 > > &soMemWriteP0, stream< bool > &sImageLoaded) |
Receive Path - From SHELL to THIS. 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, membus_t *lcl_mem0, membus_t *lcl_mem1, stream< bool > &sImageLoaded) |
Processing Path - Main processing FSM for Vitis kernels. More... | |
void | pTXPath (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 | median_blur_accel (xf::cv::Mat< XF_8UC1, 1024, 1024, XF_NPPC1 > &imgInput, xf::cv::Mat< XF_8UC1, 1024, 1024, XF_NPPC1 > &imgOutput) |
Top-level accelerated function of the MedianBlur Application with xf::cv I/F. More... | |
void | medianBlurAccelArray (ap_uint< 8 > *img_in, ap_uint< 64 > *img_out, int rows, int cols) |
Top-level accelerated function of the MedianBlur Application with array I/F. More... | |
void | medianBlurAccelStream (hls::stream< ap_uint< 8 >> &img_in_axi_stream, hls::stream< ap_uint< 64 >> &img_out_axi_stream, int rows, int cols) |
Top-level accelerated function of the MedianBlur Application with array I/F. More... | |
void | medianBlurAccelMem (membus_t *img_inp, membus_t *img_out, int rows, int cols) |
Top-level accelerated function of the MedianBlur Application with array I/F. More... | |
Variables | |
uint8_t | enqueueRxToStrFSM = 0 |
uint8_t | enqueueStrToDdrFSM = 0 |
uint8_t | enqueueFSM = 0 |
uint8_t | dequeueFSM = 0 |
uint8_t | MedianBlurFSM = 0 |
unsigned int | sRxpToTxp_DataCounter = 0 |
This is a subgroup of MedianBlur accelerated function with only synthesizable (HLS) functions/classes.
#define BPERMDW_512 (MEMDW_512/8) |
Definition at line 117 of file median_blur.hpp.
#define BYTE_PER_MEM_WORD BPERMDW_512 |
Definition at line 129 of file median_blur.hpp.
#define CHECK_CHUNK_SIZE 0x1000 |
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 128 of file median_blur.hpp.
#define CYCLES_UNTIL_TIMEOUT 0x0100 |
Definition at line 144 of file median_blur.hpp.
#define Data_t_in ap_axiu<INPUT_PTR_WIDTH, 0, 0, 0> |
Definition at line 101 of file median_blur.hpp.
#define Data_t_out ap_axiu<OUTPUT_PTR_WIDTH, 0, 0, 0> |
Definition at line 102 of file median_blur.hpp.
#define DDR_LATENCY (52/4) |
Definition at line 148 of file median_blur.hpp.
#define DEFAULT_RX_PORT 2718 |
Definition at line 94 of file median_blur.hpp.
#define DEFAULT_TX_PORT 2718 |
Definition at line 93 of file median_blur.hpp.
#define ENABLE_DDR |
Definition at line 55 of file median_blur.hpp.
#define EXTRA_DDR_LATENCY_DUE_II (64 + 8) |
Definition at line 149 of file median_blur.hpp.
#define FSM_CHK_PROC_BYTES 10 |
Definition at line 78 of file median_blur.hpp.
#define FSM_CHK_SKIP 9 |
Definition at line 77 of file median_blur.hpp.
#define FSM_CHK_WRT_CHNK_TO_DDR_PND 11 |
Definition at line 79 of file median_blur.hpp.
#define FSM_DONE 1 |
Definition at line 90 of file median_blur.hpp.
#define FSM_IDLE 8 |
Definition at line 76 of file median_blur.hpp.
#define FSM_WR_PAT_CMD 12 |
Definition at line 80 of file median_blur.hpp.
#define FSM_WR_PAT_DATA 14 |
Definition at line 82 of file median_blur.hpp.
#define FSM_WR_PAT_LOAD 13 |
Definition at line 81 of file median_blur.hpp.
#define FSM_WR_PAT_STS_A 15 |
Definition at line 83 of file median_blur.hpp.
#define FSM_WR_PAT_STS_B 16 |
Definition at line 84 of file median_blur.hpp.
#define FSM_WR_PAT_STS_C 17 |
Definition at line 85 of file median_blur.hpp.
#define FSM_WRITE_NEW_DATA 0 |
Definition at line 89 of file median_blur.hpp.
#define fsmStateDDRdef uint8_t |
Definition at line 141 of file median_blur.hpp.
#define GRAY 1 |
Definition at line 60 of file xf_config_params.h.
#define KWPERMDW_512 (BPERMDW_512/sizeof(TYPE)) |
Definition at line 118 of file median_blur.hpp.
#define LOAD_IN_STREAM 2 |
Definition at line 70 of file median_blur.hpp.
#define MAX_NB_OF_ELMT_PERDW (BPERDW/sizeof(mat_elmt_t)) |
Definition at line 109 of file median_blur.hpp.
#define MAX_NB_OF_ELMT_READ 16 |
Definition at line 105 of file median_blur.hpp.
#define MAX_NB_OF_WORDS_READ (MAX_NB_OF_ELMT_READ*sizeof(mat_elmt_t)/BPERDW) |
Definition at line 108 of file median_blur.hpp.
#define MEDIANBLUR_RETURN_RESULTS 3 |
Definition at line 71 of file median_blur.hpp.
#define MEDIANBLUR_RETURN_RESULTS_ABSORB_DDR_LAT 4 |
Definition at line 72 of file median_blur.hpp.
#define MEDIANBLUR_RETURN_RESULTS_FWD 6 |
Definition at line 74 of file median_blur.hpp.
#define MEDIANBLUR_RETURN_RESULTS_UNPACK 5 |
Definition at line 73 of file median_blur.hpp.
#define MEMDW_512 512 |
Definition at line 116 of file median_blur.hpp.
#define NO 1 |
Definition at line 56 of file xf_config_params.h.
#define PacketFsmType uint8_t |
Definition at line 86 of file median_blur.hpp.
#define PortFsmType uint8_t |
Definition at line 91 of file median_blur.hpp.
#define PORTS_OPENED 0x1F |
Definition at line 99 of file median_blur.hpp.
#define PROCESSING_PACKET 1 |
Definition at line 69 of file median_blur.hpp.
#define RGB 0 |
Definition at line 59 of file xf_config_params.h.
#define RO 0 |
Definition at line 57 of file xf_config_params.h.
#define ROLE_IS_MEDIANBLUR |
Definition at line 66 of file median_blur.hpp.
#define TOTMEMDW_512 (1 + (IMGSIZE - 1) / BPERMDW_512) |
Definition at line 121 of file median_blur.hpp.
#define TRANSFERS_PER_CHUNK (CHECK_CHUNK_SIZE/BYTE_PER_MEM_WORD) |
Definition at line 130 of file median_blur.hpp.
#define TRANSFERS_PER_CHUNK_DIVEND (TOTMEMDW_512-(TOTMEMDW_512/TRANSFERS_PER_CHUNK)*TRANSFERS_PER_CHUNK) |
Definition at line 131 of file median_blur.hpp.
#define TRANSFERS_PER_CHUNK_LAST_BURST TRANSFERS_PER_CHUNK |
Definition at line 57 of file median_blur.cpp.
#define TYPICAL_DDR_LATENCY 4 |
Definition at line 145 of file median_blur.hpp.
#define WAIT_FOR_META 0 |
Definition at line 68 of file median_blur.hpp.
#define WAIT_FOR_TX 7 |
Definition at line 75 of file median_blur.hpp.
#define WINDOW_SIZE 9 |
Definition at line 62 of file xf_config_params.h.
typedef uint8_t mat_elmt_t |
Definition at line 106 of file median_blur.hpp.
typedef ap_uint< 512 > membus_512_t |
Definition at line 119 of file median_blur.hpp.
typedef membus_512_t membus_t |
Definition at line 120 of file median_blur.hpp.
enum EchoCtrl |
SHELL/MMIO/EchoCtrl - Config Register
Definition at line 60 of file median_blur.hpp.
void median_blur | ( | 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, | ||
stream< DmCmd > & | soMemWrCmdP0, | ||
stream< DmSts > & | siMemWrStsP0, | ||
stream< Axis< 512 > > & | soMemWriteP0, | ||
membus_t * | lcl_mem0, | ||
membus_t * | lcl_mem1 | ||
) |
Main process of the MedianBlur Application directives.
Definition at line 1146 of file median_blur.cpp.
void median_blur_accel | ( | xf::cv::Mat< XF_8UC1, 1024, 1024, XF_NPPC1 > & | imgInput, |
xf::cv::Mat< XF_8UC1, 1024, 1024, XF_NPPC1 > & | imgOutput | ||
) |
Top-level accelerated function of the MedianBlur Application with xf::cv I/F.
Definition at line 66 of file xf_median_blur_accel.cpp.
void medianBlurAccelArray | ( | ap_uint< 8 > * | img_in, |
ap_uint< 64 > * | img_out, | ||
int | rows, | ||
int | cols | ||
) |
Top-level accelerated function of the MedianBlur Application with array I/F.
Definition at line 83 of file xf_median_blur_accel.cpp.
Top-level accelerated function of the MedianBlur Application with array I/F.
Definition at line 222 of file xf_median_blur_accel.cpp.
void medianBlurAccelStream | ( | hls::stream< ap_uint< 8 >> & | img_in_axi_stream, |
hls::stream< ap_uint< 64 >> & | img_out_axi_stream, | ||
int | rows, | ||
int | cols | ||
) |
Top-level accelerated function of the MedianBlur Application with array I/F.
Definition at line 127 of file xf_median_blur_accel.cpp.
void pPortAndDestionation | ( | ap_uint< 32 > * | pi_rank, |
ap_uint< 32 > * | pi_size, | ||
ap_uint< 32 > * | po_rx_ports | ||
) |
void pProcPath | ( | stream< NetworkWord > & | sRxpToTxp_Data, |
membus_t * | lcl_mem0, | ||
membus_t * | lcl_mem1, | ||
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 818 of file median_blur.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 751 of file median_blur.cpp.
void pRXPathDDROLD | ( | stream< NetworkWord > & | siSHL_This_Data, |
stream< NetworkMetaStream > & | siNrc_meta, | ||
stream< NetworkMetaStream > & | sRxtoTx_Meta, | ||
stream< DmCmd > & | soMemWrCmdP0, | ||
stream< DmSts > & | siMemWrStsP0, | ||
stream< Axis< 512 > > & | soMemWriteP0, | ||
NetworkMetaStream | meta_tmp, | ||
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 178 of file median_blur.cpp.
void pRXPathNetToStream | ( | stream< NetworkWord > & | siSHL_This_Data, |
stream< NetworkMetaStream > & | siNrc_meta, | ||
stream< NetworkMetaStream > & | sRxtoTx_Meta, | ||
stream< ap_uint< 512 >> & | img_in_axi_stream, | ||
stream< bool > & | sMemBurstRx | ||
) |
Receive Path - From SHELL to THIS.
[in] | siSHL_This_Data | |
[in] | siNrc_meta | |
[out] | sRxtoTx_Meta | |
[out] | meta_tmp |
Definition at line 432 of file median_blur.cpp.
void pRXPathStreamToDDR | ( | stream< ap_uint< 512 >> & | img_in_axi_stream, |
stream< bool > & | sMemBurstRx, | ||
stream< DmCmd > & | soMemWrCmdP0, | ||
stream< DmSts > & | siMemWrStsP0, | ||
stream< Axis< 512 > > & | soMemWriteP0, | ||
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] | processed_word | |
[out] | sImageLoaded |
Definition at line 530 of file median_blur.cpp.
void pTXPath | ( | 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 1020 of file median_blur.cpp.
void storeWordToArray | ( | uint64_t | input, |
ap_uint< 8 > | img[1024 *1024/((64/8))], | ||
unsigned int * | processed_word, | ||
unsigned int * | image_loaded | ||
) |
Store a net word to local memory.
Definition at line 81 of file median_blur.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 105 of file median_blur.cpp.
uint8_t dequeueFSM = 0 |
Definition at line 52 of file median_blur.cpp.
uint8_t enqueueFSM = 0 |
Definition at line 51 of file median_blur.cpp.
uint8_t enqueueRxToStrFSM = 0 |
Definition at line 49 of file median_blur.cpp.
uint8_t enqueueStrToDdrFSM = 0 |
Definition at line 50 of file median_blur.cpp.
uint8_t MedianBlurFSM = 0 |
Definition at line 53 of file median_blur.cpp.
unsigned int sRxpToTxp_DataCounter = 0 |
Definition at line 1006 of file median_blur.cpp.