cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
upper_lower_app.hpp File Reference
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
#include <math.h>
#include <hls_stream.h>
#include "ap_int.h"
#include <stdint.h>
#include "network.hpp"
Include dependency graph for upper_lower_app.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WAIT_FOR_META   0
 
#define WAIT_FOR_STREAM_PAIR   1
 
#define WRITE_META   2
 
#define PROCESSING_PACKET   3
 
#define PacketFsmType   uint8_t
 
#define FSM_WRITE_NEW_DATA   0
 
#define FSM_DONE   1
 
#define PortFsmType   uint8_t
 
#define DEFAULT_TX_PORT   2718
 
#define DEFAULT_RX_PORT   2718
 

Functions

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 ASCII characters, and forwards it to the next node in the cluster. The last forwards it to 0. More...
 

Macro Definition Documentation

◆ DEFAULT_RX_PORT

#define DEFAULT_RX_PORT   2718

Definition at line 57 of file upper_lower_app.hpp.

◆ DEFAULT_TX_PORT

#define DEFAULT_TX_PORT   2718

Definition at line 56 of file upper_lower_app.hpp.

◆ FSM_DONE

#define FSM_DONE   1

Definition at line 53 of file upper_lower_app.hpp.

◆ FSM_WRITE_NEW_DATA

#define FSM_WRITE_NEW_DATA   0

Definition at line 52 of file upper_lower_app.hpp.

◆ PacketFsmType

#define PacketFsmType   uint8_t

Definition at line 50 of file upper_lower_app.hpp.

◆ PortFsmType

#define PortFsmType   uint8_t

Definition at line 54 of file upper_lower_app.hpp.

◆ PROCESSING_PACKET

#define PROCESSING_PACKET   3

Definition at line 49 of file upper_lower_app.hpp.

◆ WAIT_FOR_META

#define WAIT_FOR_META   0

Definition at line 46 of file upper_lower_app.hpp.

◆ WAIT_FOR_STREAM_PAIR

#define WAIT_FOR_STREAM_PAIR   1

Definition at line 47 of file upper_lower_app.hpp.

◆ WRITE_META

#define WRITE_META   2

Definition at line 48 of file upper_lower_app.hpp.

Function Documentation

◆ upper_lower_app()

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 ASCII characters, and forwards it to the next node in the cluster. The last forwards it to 0.

Returns
Nothing.

Definition at line 269 of file upper_lower_app.cpp.

281 {
282 
283  //-- DIRECTIVES FOR THE BLOCK ---------------------------------------------
284 #pragma HLS INTERFACE ap_ctrl_none port=return
285 
286 #pragma HLS INTERFACE axis register both port=siNrc_data
287 #pragma HLS INTERFACE axis register both port=soNrc_data
288 
289 #pragma HLS INTERFACE axis register both port=siNrc_meta
290 #pragma HLS INTERFACE axis register both port=soNrc_meta
291 
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
295 
296 
297  //-- DIRECTIVES FOR THIS PROCESS ------------------------------------------
298 #pragma HLS DATAFLOW
299 
300  //-- STATIC VARIABLES (with RESET) ------------------------------------------
301 
302  //-- STATIC DATAFLOW VARIABLES ------------------------------------------
303  static stream<NetworkWord> sRxpToTxp_Data("sRxpToTxP_Data");
304  static stream<NetworkMetaStream> sRxtoTx_Meta("sRxtoTx_Meta");
305  static stream<NodeId> sDstNode_sig("sDstNode_sig");
306 
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
310 
311 
312  //-- LOCAL VARIABLES ------------------------------------------------------
313 
314  pPortAndDestionation(pi_rank, pi_size, sDstNode_sig, po_rx_ports);
315 
316  pEnq(siNrc_meta, siNrc_data, sRxtoTx_Meta, sRxpToTxp_Data);
317 
318  pDeq(sDstNode_sig, sRxtoTx_Meta, sRxpToTxp_Data, soNrc_meta, soNrc_data);
319 
320 }
void pPortAndDestionation(ap_uint< 32 > *pi_rank, ap_uint< 32 > *pi_size, stream< NodeId > &sDstNode_sig, ap_uint< 32 > *po_rx_ports)
void pDeq(stream< NodeId > &sDstNode_sig, stream< NetworkMetaStream > &sRxtoTx_Meta, stream< NetworkWord > &sRxpToTxp_Data, stream< NetworkMetaStream > &soNrc_meta, stream< NetworkWord > &soNrc_data)
void pEnq(stream< NetworkMetaStream > &siNrc_meta, stream< NetworkWord > &siNrc_data, stream< NetworkMetaStream > &sRxtoTx_Meta, stream< NetworkWord > &sRxpToTxp_Data)
Here is the call graph for this function: