cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
udp_app_flash.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2016 -- 2021 IBM Corporation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
35 #ifndef _UAF_H_
36 #define _UAF_H_
37 
38 #include "../../../../cFDK/SRA/LIB/SHELL/LIB/hls/NTS/nts.hpp"
39 #include "../../../../cFDK/SRA/LIB/SHELL/LIB/hls/NTS/nts_utils.hpp"
40 
41 
44 enum EchoCtrl {
48  ECHO_OFF = 3
49 };
50 
51 #define MTU 1500 // Maximum Transmission Unit in bytes [TODO:Move to a common place]
52 
53 //-------------------------------------------------------------------
54 //-- DEFAULT TESTING PORTS
55 //-- By default, the following port numbers will be used by the
56 //-- UdpApplicationFlash (unless user specifies new ones via TBD).
57 //-- Default testing ports:
58 //-- --> 8803 : Traffic received on this port is looped back and
59 //-- echoed to the sender in path-through mode.
60 //-- --> Others: Traffic received on any port != 8803 is looped back
61 //-- and echo to the sender in store-and-forward mode.
62 //-------------------------------------------------------------------
63 #define ECHO_PATH_THRU_PORT 8803 // 0x2263
64 
65 
66 
71 void udp_app_flash (
72 
73  //------------------------------------------------------
74  //-- SHELL / Mmio Interfaces
75  //------------------------------------------------------
76  CmdBit *piSHL_Mmio_En,
77  //[NOT_USED] ap_uint<2> piSHL_Mmio_EchoCtrl,
78  //[NOT_USED] CmdBit piSHL_Mmio_PostPktEn,
79  //[NOT_USED] CmdBit piSHL_Mmio_CaptPktEn,
80 
81  //------------------------------------------------------
82  //-- USIF / Rx Data Interfaces
83  //------------------------------------------------------
84  stream<UdpAppData> &siUSIF_Data,
85  stream<UdpAppMeta> &siUSIF_Meta,
86  stream<UdpAppDLen> &siUSIF_DLen,
87 
88  //------------------------------------------------------
89  //-- USIF / Tx Data Interfaces
90  //------------------------------------------------------
91  stream<UdpAppData> &soUSIF_Data,
92  stream<UdpAppMeta> &soUSIF_Meta,
93  stream<UdpAppDLen> &soUSIF_DLen
94 
95 );
96 
97 #endif
98 
EchoCtrl
Definition: memtest.hpp:49
ap_uint< 1 > CmdBit
Definition: nts_types.hpp:108
void udp_app_flash(CmdBit *piSHL_Mmio_En, stream< UdpAppData > &siUSIF_Data, stream< UdpAppMeta > &siUSIF_Meta, stream< UdpAppDLen > &siUSIF_DLen, stream< UdpAppData > &soUSIF_Data, stream< UdpAppMeta > &soUSIF_Meta, stream< UdpAppDLen > &soUSIF_DLen)
Main process of the UDP Application Flash (UAF)
@ ECHO_STORE_FWD
@ ECHO_CTRL_DISABLED
@ ECHO_OFF
@ ECHO_PATH_THRU