cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
tcp_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 _TAF_H_
36 #define _TAF_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 
52 #undef TAF_USE_NON_FIFO_IO
53 
54 //---------------------------------------------------------
55 //-- SHELL/MMIO/EchoCtrl - Configuration Register
56 //---------------------------------------------------------
57 enum EchoCtrl {
59  ECHO_PATH_THRU = 1
60  //[NOT-USED] ECHO_OFF = 2
61 };
62 
63 //-------------------------------------------------------------------
64 //-- DEFAULT TESTING PORTS
65 //-- By default, the following port numbers will be used by the
66 //-- TcpApplicationFlash (unless user specifies new ones via TBD).
67 //-- Default testing ports:
68 //-- --> 8803 : Traffic received on this port is looped back and
69 //-- echoed to the sender in path-through mode.
70 //-- --> Others: Traffic received on any port != 8803 is looped back
71 //-- and echo to the sender in store-and-forward mode.
72 //-------------------------------------------------------------------
73 #define ECHO_PATH_THRU_PORT 8803 // 0x2263
74 
75 
76 
81 void tcp_app_flash (
82  //------------------------------------------------------
83  //-- SHELL / MMIO / Configuration Interfaces
84  //------------------------------------------------------
85  #if defined TAF_USE_NON_FIFO_IO
86  ap_uint<2> piSHL_MmioEchoCtrl,
87  #endif
88  //------------------------------------------------------
89  //-- SHELL / TCP Rx Data Interface
90  //------------------------------------------------------
91  stream<TcpAppData> &siTSIF_Data,
92  stream<TcpSessId> &siTSIF_SessId,
93  stream<TcpDatLen> &siTSIF_DatLen,
94  //------------------------------------------------------
95  //-- SHELL / TCP Tx Data Interface
96  //------------------------------------------------------
97  stream<TcpAppData> &soTSIF_Data,
98  stream<TcpSessId> &soTSIF_SessId,
99  stream<TcpDatLen> &soTSIF_DatLen
100 );
101 
102 #endif
103 
EchoCtrl
Definition: memtest.hpp:49
void tcp_app_flash(stream< TcpAppData > &siTSIF_Data, stream< TcpSessId > &siTSIF_SessId, stream< TcpDatLen > &siTSIF_DataLen, stream< TcpAppData > &soTSIF_Data, stream< TcpSessId > &soTSIF_SessId, stream< TcpDatLen > &soTSIF_DatLen)
Main process of the TCP Application Flash (TAF)
@ ECHO_STORE_FWD
@ ECHO_PATH_THRU