cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
tx_engine.hpp
Go to the documentation of this file.
1 
17 
43 
56 #ifndef _TOE_TXE_H_
57 #define _TOE_TXE_H_
58 
59 
60 #include "../../../../../NTS/nts.hpp"
61 #include "../../../../../NTS/nts_utils.hpp"
62 #include "../../../../../NTS/toe/src/toe.hpp"
63 #include "../../../../../NTS/toe/src/toe_utils.hpp"
64 #include "../../../../../NTS/SimNtsUtils.hpp"
65 #include "../../../../../NTS/AxisIp4.hpp"
66 #include "../../../../../NTS/AxisPsd4.hpp"
67 
68 using namespace hls;
69 
70 
73 class TXeMeta {
74  public:
79  ap_uint<1> ack;
80  ap_uint<1> rst;
81  ap_uint<1> syn;
82  ap_uint<1> fin;
83  TXeMeta() {}
84  TXeMeta(ap_uint<1> ack, ap_uint<1> rst, ap_uint<1> syn, ap_uint<1> fin)
85  : seqNumb(0), ackNumb(0), winSize(0), length(0), ack(ack), rst(rst), syn(syn), fin(fin) {}
86  TXeMeta(TcpSeqNum seqNumb, TcpAckNum ackNumb, ap_uint<1> ack, ap_uint<1> rst, ap_uint<1> syn, ap_uint<1> fin)
87  : seqNumb(seqNumb), ackNumb(ackNumb), winSize(0), length(0), ack(ack), rst(rst), syn(syn), fin(fin) {}
88  TXeMeta(TcpSeqNum seqNumb, TcpAckNum ackNumb, TcpWindow winSize, ap_uint<1> ack, ap_uint<1> rst, ap_uint<1> syn, ap_uint<1> fin)
89  : seqNumb(seqNumb), ackNumb(ackNumb), winSize(winSize), length(0), ack(ack), rst(rst), syn(syn), fin(fin) {}
90 };
91 
92 
93 
96 struct SubCSums
97 {
98  ap_uint<17> sum0;
99  ap_uint<17> sum1;
100  ap_uint<17> sum2;
101  ap_uint<17> sum3;
102  SubCSums() {}
103  SubCSums(ap_uint<17> sums[4]) :
104  sum0(sums[0]), sum1(sums[1]), sum2(sums[2]), sum3(sums[3]) {}
105  SubCSums(ap_uint<17> s0, ap_uint<17> s1, ap_uint<17> s2, ap_uint<17> s3) :
106  sum0(s0), sum1(s1), sum2(s2), sum3(s3) {}
107 };
108 
109 
110 
113 class IpAddrPair {
114  public:
119  src(src), dst(dst) {}
120 };
121 
122 
127 void tx_engine(
128  //-- Ack Delayer & Event Engine Interfaces
129  stream<ExtendedEvent> &siAKd_Event,
130  stream<SigBit> &soEVe_RxEventSig,
131  //-- Rx SAR Table Interface
132  stream<SessionId> &soRSt_RxSarReq,
133  stream<RxSarReply> &siRSt_RxSarRep,
134  //-- Tx SAR Table Interface
135  stream<TXeTxSarQuery> &soTSt_TxSarQry,
136  stream<TXeTxSarReply> &siTSt_TxSarRep,
137  //-- MEM / Tx Read Path Interface
138  stream<DmCmd> &soMEM_Txp_RdCmd,
139  stream<AxisApp> &siMEM_TxP_Data,
140  //-- Timers Interface
141  stream<TXeReTransTimerCmd> &soTIm_ReTxTimerEvent,
142  stream<ap_uint<16> > &soTIm_SetProbeTimer,
143  //-- Session Lookup Controller Interface
144  stream<SessionId> &soSLc_ReverseLkpReq,
145  stream<fourTuple> &siSLc_ReverseLkpRep,
146  //-- IP Tx Interface
147  stream<AxisIp4> &soIPTX_Data
148 );
149 
150 #endif
151 
Ip4Addr src
Definition: tx_engine.hpp:115
IpAddrPair(Ip4Addr src, Ip4Addr dst)
Definition: tx_engine.hpp:118
Ip4Addr dst
Definition: tx_engine.hpp:116
TXeMeta(ap_uint< 1 > ack, ap_uint< 1 > rst, ap_uint< 1 > syn, ap_uint< 1 > fin)
Definition: tx_engine.hpp:84
ap_uint< 1 > ack
Definition: tx_engine.hpp:79
ap_uint< 1 > rst
Definition: tx_engine.hpp:80
TcpSegLen length
Definition: tx_engine.hpp:78
TcpWindow winSize
Definition: tx_engine.hpp:77
TcpSeqNum seqNumb
Definition: tx_engine.hpp:75
ap_uint< 1 > syn
Definition: tx_engine.hpp:81
TcpAckNum ackNumb
Definition: tx_engine.hpp:76
ap_uint< 1 > fin
Definition: tx_engine.hpp:82
TXeMeta(TcpSeqNum seqNumb, TcpAckNum ackNumb, TcpWindow winSize, ap_uint< 1 > ack, ap_uint< 1 > rst, ap_uint< 1 > syn, ap_uint< 1 > fin)
Definition: tx_engine.hpp:88
TXeMeta(TcpSeqNum seqNumb, TcpAckNum ackNumb, ap_uint< 1 > ack, ap_uint< 1 > rst, ap_uint< 1 > syn, ap_uint< 1 > fin)
Definition: tx_engine.hpp:86
void tx_engine(stream< ExtendedEvent > &siAKd_Event, stream< SigBit > &soEVe_RxEventSig, stream< SessionId > &soRSt_RxSarReq, stream< RxSarReply > &siRSt_RxSarRep, stream< TXeTxSarQuery > &soTSt_TxSarQry, stream< TXeTxSarReply > &siTSt_TxSarRep, stream< DmCmd > &soMEM_Txp_RdCmd, stream< AxisApp > &siMEM_TxP_Data, stream< TXeReTransTimerCmd > &soTIm_ReTxTimerCmd, stream< SessionId > &soTIm_SetProbeTimer, stream< SessionId > &soSLc_ReverseLkpReq, stream< fourTuple > &siSLc_ReverseLkpRep, stream< AxisIp4 > &soIPTX_Data)
Transmit Engine (TXe)
Definition: tx_engine.cpp:1517
ap_uint< 16 > TcpSegLen
Definition: AxisTcp.hpp:121
ap_uint< 32 > TcpSeqNum
Definition: AxisTcp.hpp:106
ap_uint< 32 > Ip4Addr
Definition: AxisIp4.hpp:169
ap_uint< 16 > TcpWindow
Definition: AxisTcp.hpp:112
ap_uint< 32 > TcpAckNum
Definition: AxisTcp.hpp:107
ap_uint< 17 > sum3
Definition: tx_engine.hpp:101
SubCSums(ap_uint< 17 > sums[4])
Definition: tx_engine.hpp:103
ap_uint< 17 > sum0
Definition: tx_engine.hpp:98
SubCSums(ap_uint< 17 > s0, ap_uint< 17 > s1, ap_uint< 17 > s2, ap_uint< 17 > s3)
Definition: tx_engine.hpp:105
ap_uint< 17 > sum1
Definition: tx_engine.hpp:99
ap_uint< 17 > sum2
Definition: tx_engine.hpp:100