34 if( (a >= 0x61) && (a <= 0x7a) )
46 if( (a >= 0x41) && (a <= 0x5a) )
57 if( (a >= 0x41) && (a <= 0x5a) )
61 else if( (a >= 0x61) && (a <= 0x7a) )
75 for(uint8_t i = 0; i < 8; i++)
77 #pragma HLS unroll factor=8
87 stream<NodeId> &sDstNode_sig,
88 ap_uint<32> *po_rx_ports
92 #pragma HLS inline off
96 #pragma HLS reset variable=port_fsm
104 if(!sDstNode_sig.full())
106 NodeId dst_rank = (*pi_rank + 1) % *pi_size;
107 printf(
"rank: %d; size: %d; \n", (
int) *pi_rank, (
int) *pi_size);
108 sDstNode_sig.write(dst_rank);
120 stream<NetworkMetaStream> &siNrc_meta,
121 stream<NetworkWord> &siNrc_data,
122 stream<NetworkMetaStream> &sRxtoTx_Meta,
123 stream<NetworkWord> &sRxpToTxp_Data
127 #pragma HLS inline off
128 #pragma HLS pipeline II=1
131 #pragma HLS reset variable=enqueueFSM
141 if ( !siNrc_meta.empty() && !sRxtoTx_Meta.full() )
143 meta_tmp = siNrc_meta.read();
145 sRxtoTx_Meta.write(meta_tmp);
151 if ( !siNrc_data.empty() && !sRxpToTxp_Data.full() )
154 udpWord = siNrc_data.read();
156 sRxpToTxp_Data.write(newWord);
157 if(udpWord.
tlast == 1)
168 stream<NodeId> &sDstNode_sig,
169 stream<NetworkMetaStream> &sRxtoTx_Meta,
170 stream<NetworkWord> &sRxpToTxp_Data,
171 stream<NetworkMetaStream> &soNrc_meta,
172 stream<NetworkWord> &soNrc_data
176 #pragma HLS inline off
177 #pragma HLS pipeline II=1
180 #pragma HLS reset variable=dequeueFSM
192 if(!sDstNode_sig.empty())
194 dst_rank = sDstNode_sig.read();
202 !sRxtoTx_Meta.empty()
204 && !soNrc_meta.full()
222 meta_out.
len = meta_in.
len;
242 if( !sRxpToTxp_Data.empty() && !soNrc_data.full())
244 udpWordTx = sRxpToTxp_Data.read();
245 soNrc_data.write(udpWordTx);
247 if(udpWordTx.
tlast == 1)
270 ap_uint<32> *pi_rank,
271 ap_uint<32> *pi_size,
275 stream<NetworkWord> &siNrc_data,
276 stream<NetworkWord> &soNrc_data,
277 stream<NetworkMetaStream> &siNrc_meta,
278 stream<NetworkMetaStream> &soNrc_meta,
279 ap_uint<32> *po_rx_ports
284 #pragma HLS INTERFACE ap_ctrl_none port=return
286 #pragma HLS INTERFACE axis register both port=siNrc_data
287 #pragma HLS INTERFACE axis register both port=soNrc_data
289 #pragma HLS INTERFACE axis register both port=siNrc_meta
290 #pragma HLS INTERFACE axis register both port=soNrc_meta
292 #pragma HLS INTERFACE ap_vld register port=po_rx_ports name=poROL_NRC_Rx_ports
293 #pragma HLS INTERFACE ap_vld register port=pi_rank name=piFMC_ROL_rank
294 #pragma HLS INTERFACE ap_vld register port=pi_size name=piFMC_ROL_size
303 static stream<NetworkWord> sRxpToTxp_Data(
"sRxpToTxP_Data");
304 static stream<NetworkMetaStream> sRxtoTx_Meta(
"sRxtoTx_Meta");
305 static stream<NodeId> sDstNode_sig(
"sDstNode_sig");
307 #pragma HLS STREAM variable=sRxpToTxp_Data depth=252
308 #pragma HLS STREAM variable=sRxtoTx_Meta depth=32
309 #pragma HLS STREAM variable=sDstNode_sig depth=1
316 pEnq(siNrc_meta, siNrc_data, sRxtoTx_Meta, sRxpToTxp_Data);
318 pDeq(sDstNode_sig, sRxtoTx_Meta, sRxpToTxp_Data, soNrc_meta, soNrc_data);
#define FSM_WRITE_NEW_DATA
#define PROCESSING_PACKET
#define WAIT_FOR_STREAM_PAIR
void pPortAndDestionation(ap_uint< 32 > *pi_rank, ap_uint< 32 > *pi_size, stream< NodeId > &sDstNode_sig, ap_uint< 32 > *po_rx_ports)
uint64_t invert_word(uint64_t input)
uint8_t invert_case(uint8_t a)
void pDeq(stream< NodeId > &sDstNode_sig, stream< NetworkMetaStream > &sRxtoTx_Meta, stream< NetworkWord > &sRxpToTxp_Data, stream< NetworkMetaStream > &soNrc_meta, stream< NetworkWord > &soNrc_data)
void upper_lower_app(ap_uint< 32 > *pi_rank, ap_uint< 32 > *pi_size, stream< NetworkWord > &siNrc_data, stream< NetworkWord > &soNrc_data, stream< NetworkMetaStream > &siNrc_meta, stream< NetworkMetaStream > &soNrc_meta, ap_uint< 32 > *po_rx_ports)
Main process of the UDP/TCP Triangle Application. This HLS IP receives a packet, invert the case of A...
void pEnq(stream< NetworkMetaStream > &siNrc_meta, stream< NetworkWord > &siNrc_data, stream< NetworkMetaStream > &sRxtoTx_Meta, stream< NetworkWord > &sRxpToTxp_Data)