cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
upper_lower_app.hpp
Go to the documentation of this file.
1 
17 // *
18 // * cloudFPGA
19 // * =============================================
20 // * Created: May 2019
21 // * Authors: FAB, WEI, NGL
22 // *
23 // * Description:
24 // * The Role for an ASCII case invert application (UDP or TCP)
25 // *
26 
27 #ifndef _ROLE_UPPERLOWER_H_
28 #define _ROLE_UPPERLOWER_H_
29 
30 #include <stdio.h>
31 #include <iostream>
32 #include <fstream>
33 #include <string>
34 #include <math.h>
35 #include <hls_stream.h>
36 #include "ap_int.h"
37 #include <stdint.h>
38 
39 //#include "../../../../../cFDK/SRA/LIB/hls/network.hpp"
40 #include "network.hpp"
41 
42 using namespace hls;
43 
44 
45 
46 #define WAIT_FOR_META 0
47 #define WAIT_FOR_STREAM_PAIR 1
48 #define WRITE_META 2
49 #define PROCESSING_PACKET 3
50 #define PacketFsmType uint8_t
51 
52 #define FSM_WRITE_NEW_DATA 0
53 #define FSM_DONE 1
54 #define PortFsmType uint8_t
55 
56 #define DEFAULT_TX_PORT 2718
57 #define DEFAULT_RX_PORT 2718
58 
59 
60 void upper_lower_app(
61  ap_uint<32> *pi_rank,
62  ap_uint<32> *pi_size,
63  //------------------------------------------------------
64  //-- SHELL / This / UDP/TCP Interfaces
65  //------------------------------------------------------
66  stream<NetworkWord> &siNrc_data,
67  stream<NetworkWord> &soNrc_data,
68  stream<NetworkMetaStream> &siNrc_meta,
69  stream<NetworkMetaStream> &soNrc_meta,
70  ap_uint<32> *po_rx_ports
71 );
72 
73 #endif
74 
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...