cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
rx_engine.hpp
Go to the documentation of this file.
1 
17 
43 
56 #ifndef _TOE_RXE_H_
57 #define _TOE_RXE_H_
58 
59 #include "../../../../../NTS/nts.hpp"
60 #include "../../../../../NTS/nts_utils.hpp"
61 #include "../../../../../NTS/SimNtsUtils.hpp"
62 #include "../../../../../NTS/toe/src/toe.hpp"
63 #include "../../../../../NTS/AxisIp4.hpp"
64 #include "../../../../../NTS/AxisTcp.hpp"
65 #include "../../../../../NTS/AxisPsd4.hpp"
66 
67 using namespace hls;
68 
69 
72 class RXeMeta {
73  public:
74  TcpSeqNum seqNumb; // TCP Sequence Number
75  TcpAckNum ackNumb; // TCP Acknowledgment Number
76  TcpWindow winSize; // TCP Window Size
77  TcpSegLen length; // TCP Segment Length
82  RXeMeta() {}
83 };
84 
85 
88 class RXeFsmMeta {
89  public:
97  sessionId(sessId), ip4SrcAddr(ipSA), tcpSrcPort(tcpSP), tcpDstPort(tcpDP), meta(rxeMeta) {}
98 };
99 
100 
103 const int cDepth_FsmToEve_Event = 4;
104 const int cDepth_FsmToMwr_WrCmd = 16;
105 const int cDepth_FsmToRan_Notif = 16; // This depends on the memory delay
106 const int cDepth_FsmToTsd_DropCmd = 16;
107 
108 const int cDepth_MdhToEvm_Event = 4;
109 const int cDepth_MdhToTsd_DropCmd = 16;
110 
112 
113 
118 void rx_engine(
119  //-- IP Rx Interface
120  stream<AxisIp4> &siIPRX_Data,
121  //-- Session Lookup Controller Interface
122  stream<SessionLookupQuery> &soSLc_SessLkReq,
123  stream<SessionLookupReply> &siSLc_SessLkRep,
124  //-- State Table Interface
125  stream<StateQuery> &soSTt_StateQry,
126  stream<TcpState> &siSTt_StateRep,
127  //-- Port Table Interface
128  stream<TcpPort> &soPRt_PortStateReq,
129  stream<RepBit> &siPRt_PortStateRep,
130  //-- Rx SAR Table Interface
131  stream<RXeRxSarQuery> &soRSt_RxSarQry,
132  stream<RxSarReply> &siRSt_RxSarRep,
133  //-- Tx SAR Table Interface
134  stream<RXeTxSarQuery> &soTSt_TxSarQry,
135  stream<RXeTxSarReply> &siTSt_TxSarRep,
136  //-- Timers Interface
137  stream<RXeReTransTimerCmd> &soTIm_ReTxTimerCmd,
138  stream<SessionId> &soTIm_ClearProbeTimer,
139  stream<SessionId> &soTIm_CloseTimer,
140  //-- Event Engine Interface
141  stream<ExtendedEvent> &soEVe_SetEvent,
142  //-- Tx Application Interface
143  stream<SessState> &soTAi_SessOpnSts,
144  //-- Rx Application Interface
145  stream<TcpAppNotif> &soRAi_RxNotif,
146  //-- MEM / Rx Write Path Interface
147  stream<DmCmd> &soMEM_WrCmd,
148  stream<AxisApp> &soMEM_WrData,
149  stream<DmSts> &siMEM_WrSts,
150  //--MMIO Interfaces
151  stream<StsBit> &soMMIO_RxMemWrErr,
152  stream<ap_uint<8> > &soMMIO_CrcDropCnt,
153  stream<ap_uint<8> > &soMMIO_SessDropCnt,
154  stream<ap_uint<8> > &soMMIO_OooDropCnt,
155  //-- DEBUG Interfaces
156  stream<RxBufPtr> &soDBG_RxFreeSpace,
157  stream<ap_uint<32> > &soDBG_TcpIpRxByteCnt,
158  stream<ap_uint<8> > &soDBG_oooDebug
159 );
160 
161 #endif
162 
RXeMeta meta
Definition: rx_engine.hpp:94
Ip4SrcAddr ip4SrcAddr
Definition: rx_engine.hpp:91
TcpDstPort tcpDstPort
Definition: rx_engine.hpp:93
TcpSrcPort tcpSrcPort
Definition: rx_engine.hpp:92
RXeFsmMeta(SessionId sessId, Ip4SrcAddr ipSA, TcpSrcPort tcpSP, TcpDstPort tcpDP, RXeMeta rxeMeta)
Definition: rx_engine.hpp:96
SessionId sessionId
Definition: rx_engine.hpp:90
TcpSegLen length
Definition: rx_engine.hpp:77
TcpCtrlBit ack
Definition: rx_engine.hpp:78
TcpCtrlBit fin
Definition: rx_engine.hpp:81
TcpCtrlBit rst
Definition: rx_engine.hpp:79
TcpSeqNum seqNumb
Definition: rx_engine.hpp:74
TcpWindow winSize
Definition: rx_engine.hpp:76
TcpCtrlBit syn
Definition: rx_engine.hpp:80
TcpAckNum ackNumb
Definition: rx_engine.hpp:75
AppMeta sessionId
Definition: tb_nal.cpp:827
const int cDepth_FsmToMwr_WrCmd
Definition: rx_engine.hpp:104
void rx_engine(stream< AxisIp4 > &siIPRX_Data, stream< SessionLookupQuery > &soSLc_SessLkReq, stream< SessionLookupReply > &siSLc_SessLkRep, stream< StateQuery > &soSTt_StateQry, stream< TcpState > &siSTt_StateRep, stream< TcpPort > &soPRt_PortStateReq, stream< RepBit > &siPRt_PortStateRep, stream< RXeRxSarQuery > &soRSt_RxSarQry, stream< RxSarReply > &siRSt_RxSarRep, stream< RXeTxSarQuery > &soTSt_TxSarQry, stream< RXeTxSarReply > &siTSt_TxSarRep, stream< RXeReTransTimerCmd > &soTIm_ReTxTimerCmd, stream< SessionId > &soTIm_ClearProbeTimer, stream< SessionId > &soTIm_CloseTimer, stream< ExtendedEvent > &soEVe_SetEvent, stream< SessState > &soTAi_SessOpnSts, stream< TcpAppNotif > &soRAi_RxNotif, stream< DmCmd > &soMEM_WrCmd, stream< AxisApp > &soMEM_WrData, stream< DmSts > &siMEM_WrSts, stream< StsBit > &soMMIO_RxMemWrErr, stream< ap_uint< 8 > > &soMMIO_CrcDropCnt, stream< ap_uint< 8 > > &soMMIO_SessDropCnt, stream< ap_uint< 8 > > &soMMIO_OooDropCnt, stream< RxBufPtr > &soDBG_RxFreeSpace, stream< ap_uint< 32 > > &soDBG_TcpIpRxByteCnt, stream< ap_uint< 8 > > &soDBG_OooDebug)
Receive Engine (RXe)
Definition: rx_engine.cpp:2000
const int cDepth_FsmToTsd_DropCmd
Definition: rx_engine.hpp:106
const int cDepth_MdhToTsd_DropCmd
Definition: rx_engine.hpp:109
const int cDepth_MwrToRan_SplitSeg
Definition: rx_engine.hpp:111
const int cDepth_FsmToEve_Event
Definition: rx_engine.hpp:103
const int cDepth_MdhToEvm_Event
Definition: rx_engine.hpp:108
const int cDepth_FsmToRan_Notif
Definition: rx_engine.hpp:105
ap_uint< 16 > TcpSegLen
Definition: AxisTcp.hpp:121
ap_uint< 32 > TcpSeqNum
Definition: AxisTcp.hpp:106
ap_uint< 16 > TcpSrcPort
Definition: AxisTcp.hpp:103
ap_uint< 16 > SessionId
Definition: nts_types.hpp:136
ap_uint< 32 > Ip4SrcAddr
Definition: AxisIp4.hpp:166
ap_uint< 1 > TcpCtrlBit
Definition: AxisTcp.hpp:111
ap_uint< 16 > TcpDstPort
Definition: AxisTcp.hpp:104
ap_uint< 16 > TcpWindow
Definition: AxisTcp.hpp:112
ap_uint< 32 > TcpAckNum
Definition: AxisTcp.hpp:107