36 #include "../include/warp_transform.hpp"
37 #include "../include/xf_warp_transform_config.h"
38 #include "../include/warp_transform_network_library.hpp"
39 #include "../include/warp_transform_hw_common.hpp"
40 #include "../include/warp_transform_processing.hpp"
58 stream<NetworkWord> &siSHL_This_Data,
59 stream<NetworkWord> &soTHIS_Shl_Data,
60 stream<NetworkMetaStream> &siNrc_meta,
61 stream<NetworkMetaStream> &soNrc_meta,
62 ap_uint<32> *po_rx_ports
74 stream<DmCmd> &soMemWrCmdP0,
75 stream<DmSts> &siMemWrStsP0,
88 #pragma HLS INTERFACE axis register both port=siSHL_This_Data
89 #pragma HLS INTERFACE axis register both port=soTHIS_Shl_Data
91 #pragma HLS INTERFACE axis register both port=siNrc_meta
92 #pragma HLS INTERFACE axis register both port=soNrc_meta
94 #pragma HLS INTERFACE ap_ovld register port=po_rx_ports name=poROL_NRC_Rx_ports
96 #if HLS_VERSION < 20211
97 #pragma HLS INTERFACE ap_stable register port=pi_rank name=piFMC_ROL_rank
98 #pragma HLS INTERFACE ap_stable register port=pi_size name=piFMC_ROL_size
99 #elif HLS_VERSION >= 20211
100 #pragma HLS stable variable=pi_rank
101 #pragma HLS stable variable=pi_size
103 printf(
"ERROR: Invalid HLS_VERSION=%s\n", HLS_VERSION);
110 #pragma HLS INTERFACE axis register both port=soMemWrCmdP0
111 #pragma HLS INTERFACE axis register both port=siMemWrStsP0
112 #pragma HLS INTERFACE axis register both port=soMemWriteP0
114 #if HLS_VERSION <= 20201
115 #pragma HLS DATA_PACK variable=soMemWrCmdP0 instance=soMemWrCmdP0
116 #pragma HLS DATA_PACK variable=siMemWrStsP0 instance=siMemWrStsP0
117 #elif HLS_VERSION >= 20211
118 #pragma HLS aggregate variable=soMemWrCmdP0 compact=bit
119 #pragma HLS aggregate variable=siMemWrStsP0 compact=bit
121 printf(
"ERROR: Invalid HLS_VERSION=%s\n", HLS_VERSION);
131 const unsigned int max_axi_rw_burst_length = 64;
132 const unsigned int num_outstanding_transactions = 256;
135 #pragma HLS INTERFACE m_axi depth=ddr_mem_depth port=lcl_mem0 bundle=moMEM_Mp1\
136 max_read_burst_length=max_axi_rw_burst_length max_write_burst_length=max_axi_rw_burst_length offset=direct \
137 num_read_outstanding=num_outstanding_transactions num_write_outstanding=num_outstanding_transactions latency=ddr_latency
140 #pragma HLS INTERFACE m_axi depth=ddr_mem_depth port=lcl_mem1 bundle=moMEM_Mp1 \
141 max_read_burst_length=max_axi_rw_burst_length max_write_burst_length=max_axi_rw_burst_length offset=direct \
142 num_read_outstanding=num_outstanding_transactions num_write_outstanding=num_outstanding_transactions latency=ddr_latency
150 static stream<NetworkWord> sRxpToTxp_Data(
"sRxpToTxP_Data");
151 static stream<NetworkMetaStream> sRxtoTx_Meta(
"sRxtoTx_Meta");
152 static unsigned int processed_word_rx;
153 static unsigned int processed_bytes_rx;
154 static unsigned int processed_word_tx = 0;
155 static stream<bool> sImageLoaded(
"sImageLoaded");
156 static bool skip_read;
157 static bool write_chunk_to_ddr_pending;
158 static bool ready_to_accept_new_data;
159 static bool signal_init;
160 const int tot_transfers = TOT_TRANSFERS_TX;
165 static stream<membus_t> img_in_axi_stream (
"img_in_axi_stream");
167 static stream<bool> sMemBurstRx(
"sMemBurstRx");
172 static stream<ap_uint<INPUT_PTR_WIDTH>> img_in_axi_stream (
"img_in_axi_stream");
173 static stream<ap_uint<OUTPUT_PTR_WIDTH>> img_out_axi_stream (
"img_out_axi_stream");
175 static stream<NodeId> sDstNode_sig(
"sDstNode_sig");
179 #pragma HLS stream variable=sRxtoTx_Meta depth=tot_transfers
180 #pragma HLS reset variable=processed_word_rx
181 #pragma HLS reset variable=processed_word_tx
182 #pragma HLS reset variable=processed_bytes_rx
184 #pragma HLS stream variable=sImageLoaded depth=1
185 #pragma HLS reset variable=skip_read
186 #pragma HLS reset variable=write_chunk_to_ddr_pending
188 #pragma HLS reset variable=ready_to_accept_new_data
189 #pragma HLS reset variable=signal_init
190 #pragma HLS STREAM variable=sDstNode_sig depth=1
193 #pragma HLS stream variable=img_in_axi_stream depth=img_in_axi_stream_depth
194 #pragma HLS stream variable=sProcessed_bytes_rx depth=img_in_axi_stream_depth
196 #pragma HLS stream variable=img_in_axi_stream depth=img_in_axi_stream_depth
197 #pragma HLS stream variable=img_out_axi_stream depth=img_out_axi_stream_depth
200 static stream<float> sTxMatrix(
"sTxMatrix");
201 #pragma HLS stream variable=sTxMatrix depth=const_tx_matrix_dim
208 #pragma HLS reset variable=img_rows
209 #pragma HLS reset variable=img_cols
210 #pragma HLS reset variable=img_chan
238 pRXPathStreamToDDR< Axis<MEMDW_512>,
#define TRANSFERS_PER_CHUNK
void pProcPath(stream< NetworkWord > &sRxpToTxp_Data, stream< NetworkMetaStream > &sRxtoTx_Meta, NetworkMetaStream meta_tmp, varin *instruct, double *out, unsigned int *processed_word_rx, unsigned int *processed_word_proc, unsigned int *struct_loaded)
Processing Path - Main processing FSM for Vitis kernels.
#define BITS_PER_10GBITETHRNET_AXI_PACKET
#define BYTES_PER_10GBITETHRNET_AXI_PACKET
void pPortAndDestionation(ap_uint< 32 > *pi_rank, ap_uint< 32 > *pi_size, stream< NodeId > &sDstNode_sig, ap_uint< 32 > *po_rx_ports)
pPortAndDestionation - Setup the port and the destination rank.
void pRXPath(stream< NetworkWord > &siSHL_This_Data, stream< NetworkMetaStream > &siNrc_meta, stream< NetworkMetaStream > &sRxtoProc_Meta, stream< NetworkWord > &sRxpToProcp_Data, NetworkMetaStream meta_tmp, bool *start_stop, unsigned int *processed_word_rx, unsigned int *processed_bytes_rx)
Receive Path - From SHELL to THIS.
void pTXPath(stream< NetworkWord > &soTHIS_Shl_Data, stream< NetworkMetaStream > &soNrc_meta, stream< NetworkWord > &sProcpToTxp_Data, stream< NetworkMetaStream > &sRxtoTx_Meta, stream< NodeId > &sDstNode_sig, unsigned int *processed_word_tx, ap_uint< 32 > *pi_rank)
Transmit Path - From THIS to SHELL.