38 #ifndef _ROLE_HARRIS_H_
39 #define _ROLE_HARRIS_H_
46 #include <hls_stream.h>
50 #include "memory_utils.hpp"
67 #define ROLE_IS_HARRIS
70 #define WAIT_FOR_META 0
71 #define WAIT_FOR_STREAM_PAIR 1
72 #define PROCESSING_PACKET 2
73 #define LOAD_IN_STREAM 3
74 #define HARRIS_RETURN_RESULTS 4
75 #define HARRIS_RETURN_RESULTS_ABSORB_DDR_LAT 5
76 #define HARRIS_RETURN_RESULTS_UNPACK 6
77 #define HARRIS_RETURN_RESULTS_FWD 7
80 #define FSM_CHK_SKIP 10
81 #define FSM_CHK_PROC_BYTES 11
82 #define FSM_CHK_WRT_CHNK_TO_DDR_PND 12
83 #define FSM_WR_PAT_CMD 13
84 #define FSM_WR_PAT_LOAD 14
85 #define FSM_WR_PAT_DATA 15
86 #define FSM_WR_PAT_STS_A 16
87 #define FSM_WR_PAT_STS_B 17
88 #define FSM_WR_PAT_STS_C 18
89 #define PacketFsmType uint8_t
92 #define FSM_WRITE_NEW_DATA 0
94 #define PortFsmType uint8_t
96 #define DEFAULT_TX_PORT 2718
97 #define DEFAULT_RX_PORT 2718
102 #define PORTS_OPENED 0x1F
104 #define Data_t_in ap_axiu<INPUT_PTR_WIDTH, 0, 0, 0>
105 #define Data_t_out ap_axiu<OUTPUT_PTR_WIDTH, 0, 0, 0>
108 #define MAX_NB_OF_ELMT_READ 16
111 #define MAX_NB_OF_WORDS_READ (MAX_NB_OF_ELMT_READ*sizeof(mat_elmt_t)/BPERDW)
112 #define MAX_NB_OF_ELMT_PERDW (BPERDW/sizeof(mat_elmt_t))
119 #define MEMDW_512 512
120 #define BPERMDW_512 (MEMDW_512/8)
121 #define KWPERMDW_512 (BPERMDW_512/sizeof(IN_TYPE))
124 #define TOTMEMDW_512 (1 + (IMGSIZE - 1) / BPERMDW_512)
131 #define CHECK_CHUNK_SIZE 0x400
132 #define BYTE_PER_MEM_WORD BPERMDW_512
133 #define TRANSFERS_PER_CHUNK (CHECK_CHUNK_SIZE/BYTE_PER_MEM_WORD)
134 #define TRANSFERS_PER_CHUNK_DIVEND (TOTMEMDW_512-(TOTMEMDW_512/TRANSFERS_PER_CHUNK)*TRANSFERS_PER_CHUNK)
144 #define fsmStateDDRdef uint8_t
147 #define CYCLES_UNTIL_TIMEOUT 0x0100
148 #define TYPICAL_DDR_LATENCY 4
151 #define DDR_LATENCY (52/4)
152 #define EXTRA_DDR_LATENCY_DUE_II (64 + 8)
159 ap_uint<(D+7)/8> tkeep;
162 Axis(ap_uint<D> single_data) : tdata((ap_uint<D>)single_data), tkeep(1), tlast(1) {}
168 ap_uint<32> *pi_rank,
169 ap_uint<32> *pi_size,
173 stream<NetworkWord> &siSHL_This_Data,
174 stream<NetworkWord> &soTHIS_Shl_Data,
175 stream<NetworkMetaStream> &siNrc_meta,
176 stream<NetworkMetaStream> &soNrc_meta,
177 ap_uint<32> *po_rx_ports
189 stream<DmCmd> &soMemWrCmdP0,
190 stream<DmSts> &siMemWrStsP0,
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.
ap_uint< 512 > membus_512_t
ap_uint< 512 > membus_512_t
Axis(ap_uint< D > single_data)