cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
toe.hpp
Go to the documentation of this file.
1 
17 
43 
71 #ifndef _TOE_H_
72 #define _TOE_H_
73 
74 #include <stdint.h>
75 #include "ap_int.h"
76 
77 #include "../../../NTS/nts.hpp"
78 #include "../../../NTS/nts_utils.hpp"
79 #include "../../../NTS/SimNtsUtils.hpp"
80 #include "../../../MEM/mem.hpp"
81 
82 
83 
87 //-- The Maximum Segment Size (MSS) that can be received and processed by TOE
88 //-- FYI: MSS is rounded modulo 8 bytes for better efficiency.
89 static const TcpSegLen MY_MSS = (MTU - IP4_HEADER_LEN - TCP_HEADER_LEN) & ~0x7; // 1456
90 
91 //-- The Maximum Segment Size (MSS) that can be transmitted by TOE
92 //-- FYI: This MSS is advertised by the remote host during the 3-may handshake.
93 static const TcpSegLen THEIR_MSS = ZYC2_MSS; // 1352
94 
95 
96 
99 #define TOE_SIZEOF_LISTEN_PORT_TABLE 0x8000
100 #define TOE_SIZEOF_ACTIVE_PORT_TABLE 0x8000
101 #define TOE_FIRST_EPHEMERAL_PORT_NUM 0x8000 // Dynamic ports are in the range 32768..65535
102 
103 #define TOE_FEATURE_USED_FOR_DEBUGGING 0
104 
105 
106 extern uint32_t packetCounter; // [FIXME] Remove
107 extern uint32_t idleCycCnt; // [FIXME] Remove
108 extern unsigned int gSimCycCnt; // [FIXME] Remove
109 
110 #ifndef __SYNTHESIS__
111  // HowTo - You should adjust the value of 'TIME_1s' such that the testbench
112  // works with your longest segment. In other words, if 'TIME_1s' is too short
113  // and/or your segment is too long, you may experience retransmission events
114  // (RT) which will break the test. You may want to use 'siIPRX_OneSeg.dat' or
115  // 'siIPRX_TwoSeg.dat' to tune this parameter.
116  static const ap_uint<32> TIME_1s = 250;
117 
118  static const ap_uint<32> TIME_1us = (((ap_uint<32>)(TIME_1s/1000000) > 1) ? (ap_uint<32>)(TIME_1s/1000000) : (ap_uint<32>)1);
119  static const ap_uint<32> TIME_64us = (((ap_uint<32>)(TIME_1s/ 15625) > 1) ? (ap_uint<32>)(TIME_1s/ 15625) : (ap_uint<32>)1);
120  static const ap_uint<32> TIME_128us = (((ap_uint<32>)(TIME_1s/ 31250) > 1) ? (ap_uint<32>)(TIME_1s/ 31250) : (ap_uint<32>)1);
121  static const ap_uint<32> TIME_256us = (((ap_uint<32>)(TIME_1s/ 62500) > 1) ? (ap_uint<32>)(TIME_1s/ 62500) : (ap_uint<32>)1);
122  static const ap_uint<32> TIME_512us = (((ap_uint<32>)(TIME_1s/ 125000) > 1) ? (ap_uint<32>)(TIME_1s/ 125000) : (ap_uint<32>)1);
123 
124  static const ap_uint<32> ACKD_1us = ( 1.0/0.0064/TOE_MAX_SESSIONS/10) + 1;
125  static const ap_uint<32> ACKD_2us = ( 2.0/0.0064/TOE_MAX_SESSIONS/10) + 1;
126  static const ap_uint<32> ACKD_4us = ( 4.0/0.0064/TOE_MAX_SESSIONS/10) + 1;
127  static const ap_uint<32> ACKD_8us = ( 8.0/0.0064/TOE_MAX_SESSIONS/10) + 1;
128  static const ap_uint<32> ACKD_16us = ( 16.0/0.0064/TOE_MAX_SESSIONS/10) + 1;
129  static const ap_uint<32> ACKD_32us = ( 32.0/0.0064/TOE_MAX_SESSIONS/10) + 1;
130  static const ap_uint<32> ACKD_64us = ( 64.0/0.0064/TOE_MAX_SESSIONS/10) + 1;
131 
132  static const ap_uint<32> TIME_1ms = (((ap_uint<32>)(TIME_1s/1000) > 1) ? (ap_uint<32>)(TIME_1s/1000) : (ap_uint<32>)1);
133  static const ap_uint<32> TIME_5ms = (((ap_uint<32>)(TIME_1s/ 200) > 1) ? (ap_uint<32>)(TIME_1s/ 200) : (ap_uint<32>)1);
134  static const ap_uint<32> TIME_25ms = (((ap_uint<32>)(TIME_1s/ 40) > 1) ? (ap_uint<32>)(TIME_1s/ 40) : (ap_uint<32>)1);
135  static const ap_uint<32> TIME_50ms = (((ap_uint<32>)(TIME_1s/ 20) > 1) ? (ap_uint<32>)(TIME_1s/ 20) : (ap_uint<32>)1);
136  static const ap_uint<32> TIME_100ms = (((ap_uint<32>)(TIME_1s/ 10) > 1) ? (ap_uint<32>)(TIME_1s/ 10) : (ap_uint<32>)1);
137  static const ap_uint<32> TIME_250ms = (((ap_uint<32>)(TIME_1s/ 4) > 1) ? (ap_uint<32>)(TIME_1s/ 4) : (ap_uint<32>)1);
138 
139  static const ap_uint<32> TIME_3s = ( 3*TIME_1s);
140  static const ap_uint<32> TIME_5s = ( 5*TIME_1s);
141  static const ap_uint<32> TIME_6s = ( 6*TIME_1s);
142  static const ap_uint<32> TIME_7s = ( 7*TIME_1s);
143  static const ap_uint<32> TIME_10s = ( 10*TIME_1s);
144  static const ap_uint<32> TIME_12s = ( 12*TIME_1s);
145  static const ap_uint<32> TIME_15s = ( 15*TIME_1s);
146  static const ap_uint<32> TIME_20s = ( 20*TIME_1s);
147  static const ap_uint<32> TIME_30s = ( 30*TIME_1s);
148  static const ap_uint<32> TIME_60s = ( 60*TIME_1s);
149  static const ap_uint<32> TIME_120s = (120*TIME_1s);
150 #else
151  static const ap_uint<32> ACKD_1us = ( 1.0/0.0064/TOE_MAX_SESSIONS) + 1;
152  static const ap_uint<32> ACKD_2us = ( 2.0/0.0064/TOE_MAX_SESSIONS) + 1;
153  static const ap_uint<32> ACKD_4us = ( 4.0/0.0064/TOE_MAX_SESSIONS) + 1;
154  static const ap_uint<32> ACKD_8us = ( 8.0/0.0064/TOE_MAX_SESSIONS) + 1;
155  static const ap_uint<32> ACKD_16us = ( 16.0/0.0064/TOE_MAX_SESSIONS) + 1;
156  static const ap_uint<32> ACKD_32us = ( 32.0/0.0064/TOE_MAX_SESSIONS) + 1;
157  static const ap_uint<32> ACKD_64us = ( 64.0/0.0064/TOE_MAX_SESSIONS) + 1;
158  static const ap_uint<32> TIME_128us = (128.0/0.0064/TOE_MAX_SESSIONS) + 1;
159  static const ap_uint<32> TIME_256us = (256.0/0.0064/TOE_MAX_SESSIONS) + 1;
160  static const ap_uint<32> TIME_512us = (512.0/0.0064/TOE_MAX_SESSIONS) + 1;
161 
162  static const ap_uint<32> TIME_1ms = ( 1.0/0.0000064/TOE_MAX_SESSIONS) + 1;
163  static const ap_uint<32> TIME_5ms = ( 5.0/0.0000064/TOE_MAX_SESSIONS) + 1;
164  static const ap_uint<32> TIME_25ms = ( 25.0/0.0000064/TOE_MAX_SESSIONS) + 1;
165  static const ap_uint<32> TIME_50ms = ( 50.0/0.0000064/TOE_MAX_SESSIONS) + 1;
166  static const ap_uint<32> TIME_100ms = (100.0/0.0000064/TOE_MAX_SESSIONS) + 1;
167  static const ap_uint<32> TIME_250ms = (250.0/0.0000064/TOE_MAX_SESSIONS) + 1;
168 
169  static const ap_uint<32> TIME_1s = ( 1.0/0.0000000064/TOE_MAX_SESSIONS) + 1;
170  static const ap_uint<32> TIME_3s = ( 3.0/0.0000000064/TOE_MAX_SESSIONS) + 1;
171  static const ap_uint<32> TIME_5s = ( 5.0/0.0000000064/TOE_MAX_SESSIONS) + 1;
172  static const ap_uint<32> TIME_6s = ( 6.0/0.0000000064/TOE_MAX_SESSIONS) + 1;
173  static const ap_uint<32> TIME_7s = ( 7.0/0.0000000064/TOE_MAX_SESSIONS) + 1;
174  static const ap_uint<32> TIME_10s = ( 10.0/0.0000000064/TOE_MAX_SESSIONS) + 1;
175  static const ap_uint<32> TIME_12s = ( 12.0/0.0000000064/TOE_MAX_SESSIONS) + 1;
176  static const ap_uint<32> TIME_15s = ( 15.0/0.0000000064/TOE_MAX_SESSIONS) + 1;
177  static const ap_uint<32> TIME_20s = ( 20.0/0.0000000064/TOE_MAX_SESSIONS) + 1;
178  static const ap_uint<32> TIME_30s = ( 30.0/0.0000000064/TOE_MAX_SESSIONS) + 1;
179  static const ap_uint<32> TIME_60s = ( 60.0/0.0000000064/TOE_MAX_SESSIONS) + 1;
180  static const ap_uint<32> TIME_120s = (120.0/0.0000000064/TOE_MAX_SESSIONS) + 1;
181 #endif
182 
183 
184 
187 #define cIP4_ADDR_WIDTH 32
188 
189 #define cTCP_PORT_WIDTH 16
190 
191 #define cSHL_TOE_SESS_ID_WIDTH 16 // [TODO - Move into a CFG file.]
192 #define cSHL_TOE_LSN_ACK_WIDTH 1 // [TODO - Move into a CFG file.]
193 #define cSHL_TOE_LSN_REQ_WIDTH cSHL_TOE_SESS_ID_WIDTH
194 #define cSHL_TOE_OPN_REQ_WIDTH (cIP4_ADDR_WIDTH + cTCP_PORT_WIDTH)
195 #define cSHL_TOE_CLS_REQ_WIDTH cSHL_TOE_SESS_ID_WIDTH
196 
197 typedef ap_uint<cSHL_TOE_SESS_ID_WIDTH> SessionId;
198 typedef ap_uint<cSHL_TOE_LSN_ACK_WIDTH> LsnAck;
199 typedef ap_uint<cSHL_TOE_LSN_REQ_WIDTH> LsnReq;
200 typedef ap_uint<cSHL_TOE_OPN_REQ_WIDTH> OpnReq;
201 typedef ap_uint<cSHL_TOE_CLS_REQ_WIDTH> ClsReq;
202 
203 
206 const int cDepth_AKdToEVe_Event = 8;
207 const int cDepth_AKdToTXe_Event = 16;
208 
209 const int cDepth_EVeToAKd_Event = 8;
210 
211 const int cDepth_RAiToRSt_Qry = 4;
212 
213 const int cDepth_RXeToEVe_Event = 64;
214 const int cDepth_RXeToRSt_Qry = 4;
215 const int cDepth_RXeToTSt_Qry = 4;
216 
217 const int cDepth_STtToRXe_Rep = 2;
218 const int cDepth_STtToTAi_Rep = 2;
219 
220 const int cDepth_TAiToEVe_Event = 8;
221 const int cDepth_TAiToTSt_Cmd = 4;
222 
223 const int cDepth_TStToRXe_Rep = 2;
224 const int cDepth_TStToTAi_Cmd = 4;
225 const int cDepth_TStToTXe_Rep = 2;
226 
227 const int cDepth_TImToEVe_Event = 4;
228 
229 const int cDepth_TXeToEVe_Event = 8;
230 const int cDepth_TXeToRSt_Req = 4;
231 const int cDepth_TXeToTSt_Qry = 4;
232 
233 
245 
246 
247 #define TLAST 1
248 
249 
253 typedef ap_uint<64> LE_tData; // [FIXME] Can be removed
254 typedef ap_uint< 8> LE_tKeep;
255 typedef ap_uint<64> tData;
256 typedef ap_uint<32> tDataHalf;
257 typedef ap_uint< 8> tKeep;
258 typedef ap_uint< 1> tLast;
259 
260 
261 
262 
270 //---------------------------------------------------------
271 //-- TOE - EVENT TYPES
272 //---------------------------------------------------------
275 
276 //---------------------------------------------------------
277 //-- TOE - SESSION STATE
278 //---------------------------------------------------------
279 typedef TcpAppOpnRep SessState; // TCP state according to RFC-793
280 
281 //---------------------------------------------------------
282 //-- TOE - TCP PORT RANGES (Static & Ephemeral)
283 //---------------------------------------------------------
284 typedef ap_uint<15> TcpStaPort; // TCP Static Port [0x0000..0x7FFF]
285 typedef ap_uint<15> TcpDynPort; // TCP Dynamic Port [0x8000..0xFFFF]
286 
287 //---------------------------------------------------------
288 //-- TOE - Some Rx & Tx SAR Types
289 //---------------------------------------------------------
290 typedef TcpSeqNum RxSeqNum; // A sequence number received from the network layer
291 typedef TcpAckNum TxAckNum; // An acknowledge number transmitted to the network layer
292 typedef TcpWindow RemotWinSize; // A remote window size
293 typedef TcpWindow LocalWinSize; // A local window size
294 
295 typedef ap_uint<32> RxMemPtr; // A pointer to RxMemBuff ( 4GB) [FIXME <33>]
296 typedef ap_uint<32> TxMemPtr; // A pointer to TxMemBuff ( 4GB) [FIXME <33>]
297 typedef ap_uint<TOE_WINDOW_BITS> TcpBufAdr; // A TCP buffer address (64KB)
298 typedef TcpBufAdr RxBufPtr; // A pointer to RxSessBuf (64KB)
299 typedef TcpBufAdr TxBufPtr; // A pointer to TxSessBuf (64KB)
300 
301 //---------------------------------------------------------
302 //-- SOCKET ADDRESS (alias ipTuple)
303 //---------------------------------------------------------
304 struct ipTuple // [TODO] - Replace w/ SockAddr
305 {
306  ap_uint<32> ip_address;
307  ap_uint<16> ip_port;
308 };
309 
310 
314 typedef bool HitState;
315 enum HitStates { SESSION_UNKNOWN = false, SESSION_EXISTS = true};
316 
317 //=========================================================
318 //== SLc - Session Lookup Query
319 //=========================================================
321  public:
322  LE_SocketPair tuple; // [FIXME - Name and type]
327 };
328 
329 //=========================================================
330 //== SLc - Session Lookup Reply
331 //=========================================================
333  public:
338  sessionID(id), hit(hit) {}
339 };
340 
341 
345 //=========================================================
346 //== STt - Session State Query
347 //=========================================================
348 class StateQuery {
349  public:
354  state(CLOSED) {}
355  // Read queries
357  sessionID(id), state(CLOSED), write(QUERY_RD) {}
359  sessionID(id), state(CLOSED), write(QUERY_RD) {}
360  // Write query
362  sessionID(id), state(state), write(QUERY_WR) {}
363 };
364 
365 //=========================================================
366 //== RSt / Generic Reply (Same as RxSarEntry)
367 //=========================================================
368 class RxSarReply {
369  public:
371  RxSeqNum rcvd; // Last received SeqNum
378 };
379 
380 //=========================================================
381 //== RSt / Query from RXe
382 //=========================================================
384  public:
386  RxSeqNum rcvd; // Last received SeqNum
393  ooo(false) {}
394  // Read queries
396  sessionID(id), rcvd(0), ooo(false), oooHead(0), oooTail(0), write(QUERY_RD), init(0) {}
398  sessionID(id), rcvd(0), ooo(FLAG_INO), oooHead(0), oooTail(0), write(QUERY_RD), init(0) {}
399  // Write query - When in order processing
401  sessionID(id), rcvd(rcvd), ooo(FLAG_INO), oooHead(0), oooTail(0), write(QUERY_WR), init(0) {}
402  // Init query
405  // Write query - When in out-of-order processing
408 
409 };
410 
411 //=========================================================
412 //== RSt / Query from RAi
413 //=========================================================
415  public:
417  RxBufPtr appd; // Next byte to be consumed by [APP]
421  sessionID(id), appd(0), write(0) {}
423  sessionID(id), appd(appd), write(1) {}
424 };
425 
426 //=========================================================
427 //== RSt / Reply to RAi
428 //=========================================================
430  public:
432  RxBufPtr appd; // Next byte to be consumed by [APP]
435  sessionID(id), appd(appd) {}
436 };
437 
438 
442 //=========================================================
443 //== TSt / Query from RXe
444 //=========================================================
446  public:
448  TxAckNum ackd; // TX'ed and ACK'ed
449  RemotWinSize recv_window; // Remote receiver's buffer size (their)
450  LocalWinSize cong_window; // Local receiver's buffer size (my)
451  ap_uint<2> count;
454 
456  fastRetransmitted(false) {}
457  // Read Query
459  sessionID(id), fastRetransmitted(false), write(QUERY_RD) {}
460  // Write Query
463 };
464 
465 //=========================================================
466 //== TSt / Reply to RXe
467 //=========================================================
469  public:
470  TxAckNum prevAckd; // Bytes TX'ed and ACK'ed
471  TxAckNum prevUnak; // Bytes TX'ed but not ACK'ed
474  ap_uint<2> count;
477  RXeTxSarReply(TxAckNum ackd, TxAckNum unak, TcpWindow cong_win, TcpWindow sstresh, ap_uint<2> count, CmdBool fastRetransmitted) :
479 };
480 
481 //=========================================================
482 //== TSt / Query from TXe
483 //=========================================================
485  public:
487  TxAckNum not_ackd; // TX'ed but not ACK'ed
490  bool finReady;
491  bool finSent;
492  bool isRtQuery;
493 
495  finReady(false), finSent(false), isRtQuery(false) {}
496  // Read Query
498  sessionID(id), write(QUERY_RD), finReady(false), finSent(false), isRtQuery(false) {}
499  // Write Queries
501  sessionID(id), not_ackd(not_ackd), write(QUERY_WR), init(0), finReady(false), finSent(false), isRtQuery(false) {}
503  sessionID(id), not_ackd(not_ackd), write(QUERY_WR), init(init), finReady(false), finSent(false), isRtQuery(false) {}
508 };
509 
510 //=========================================================
511 //== TSt / Reply to TXe
512 //=========================================================
514  public:
515  TxAckNum ackd; // TX'ed and ACK'ed
516  TxAckNum not_ackd; // TX'ed but not ACK'ed
517  TcpWindow min_window; // Min(cong_window, recv_window)
518  TxBufPtr app; // Written by APP
519  bool finReady;
520  bool finSent;
522  TXeTxSarReply(ap_uint<32> ack, ap_uint<32> nack, ap_uint<16> min_window, ap_uint<16> app, bool finReady, bool finSent) :
524 };
525 
526 //=========================================================
527 //== TSt / Re-transmission Query from TXe
528 //=========================================================
530 {
531  public:
535  TXeTxSarRtQuery(SessionId id, ap_uint<TOE_WINDOW_BITS> ssthresh) :
536  TXeTxSarQuery(id, ssthresh, 1, 0, false, false, true) {}
537  ap_uint<TOE_WINDOW_BITS> getThreshold() {
538  return not_ackd(TOE_WINDOW_BITS-1, 0);
539  }
540 };
541 
542 //=========================================================
543 //== TSt / Tx Application Interface
544 //=========================================================
546  public:
551  sessionID(id), app(app) {}
552 };
553 
554 //=========================================================
555 //== TSt / Command from TSt
556 //=========================================================
558  public:
560  ap_uint<16> ackd;
561 #if (TCP_NODELAY)
562  ap_uint<16> min_window;
563 #endif
566 #if !(TCP_NODELAY)
567  TStTxSarPush(SessionId id, ap_uint<16> ackd) :
568  sessionID(id), ackd(ackd), init(0) {}
569  TStTxSarPush(SessionId id, ap_uint<16> ackd, CmdBit init) :
570  sessionID(id), ackd(ackd), init(init) {}
571 #else
572  TStTxSarPush(SessionId id, ap_uint<16> ackd, ap_uint<16> min_window) :
573  sessionID(id), ackd(ackd), min_window(min_window), init(0) {}
574  TStTxSarPush(SessionId id, ap_uint<16> ackd, ap_uint<16> min_window, CmdBit init) :
575  sessionID(id), ackd(ackd), min_window(min_window), init(init) {}
576 #endif
577 };
578 
579 
583 //=========================================================
584 //== TAI / Tx Application Table (Tat) Request
585 //=========================================================
587  public:
590  bool write;
593  sessId(id), mempt(0), write(false) {}
594  TxAppTableQuery(SessionId id, ap_uint<16> pt) :
595  sessId(id), mempt(pt), write(true) {}
596 };
597 
598 //=========================================================
599 //== TAI / Tx Application Table (Tat) Reply
600 //=========================================================
602  public:
604  ap_uint<16> ackd;
606  #if (TCP_NODELAY)
607  ap_uint<16> min_window;
608  #endif
610  #if !(TCP_NODELAY)
611  TxAppTableReply(SessionId id, ap_uint<16> ackd, TxBufPtr pt) :
612  sessId(id), ackd(ackd), mempt(pt) {}
613  #else
614  TxAppTableReply(SessionId id, ap_uint<16> ackd, TxBufPtr pt, ap_uint<16> min_window) :
615  sessionID(id), ackd(ackd), mempt(pt), min_window(min_window) {}
616  #endif
617 };
618 
619 
622 enum TimerCmd {LOAD_TIMER = false,
623  STOP_TIMER = true};
624 
625 //=========================================================
626 //== TIm / ReTransmit Timer Command from RXe
627 //=========================================================
629  public:
631  TimerCmd command; // { LOAD=false; STOP=true}
634  sessionID(id), command(STOP_TIMER) {}
636  sessionID(id), command(cmd) {}
637 };
638 
639 //=========================================================
640 //== TIm / ReTransmit Timer Command from TXe
641 //=========================================================
643  public:
648  sessionID(id), type(RT_EVENT) {}
650  sessionID(id), type(type) {}
651 };
652 
653 
657 //=========================================================
658 //== EVe / Event
659 //=========================================================
660 class Event
661 {
662  public:
667  ap_uint<3> rt_count; // [FIXME - Make this type configurable]
668  Event() {}
670  type(type), sessionID(id), address(0), length(0), rt_count(0) {}
671  Event(EventType type, SessionId id, ap_uint<3> rt_count) :
672  type(type), sessionID(id), address(0), length(0), rt_count(rt_count) {}
673  Event(EventType type, SessionId id, ap_uint<16> addr, ap_uint<16> len) :
674  type(type), sessionID(id), address(addr), length(len), rt_count(0) {}
675  Event(EventType type, SessionId id, ap_uint<16> addr, ap_uint<16> len, ap_uint<3> rt_count) :
676  type(type), sessionID(id), address(addr), length(len), rt_count(rt_count) {}
677 };
678 
679 //=========================================================
680 //== EVe / ExtendedEvent
681 //=========================================================
682 class ExtendedEvent : public Event
683 {
684  public:
685  LE_SocketPair tuple; // [FIXME - Rename and change type]
687  ExtendedEvent(const Event& ev) :
688  Event(ev.type, ev.sessionID, ev.address, ev.length, ev.rt_count) {}
690  Event(ev.type, ev.sessionID, ev.address, ev.length, ev.rt_count), tuple(tuple) {}
691 };
692 
693 //=========================================================
694 //== EVe / RstEvent // [FIXME- TODO]
695 //=========================================================
696 struct rstEvent : public Event // [FIXME - Class naming convention]
697 {
698  rstEvent() {}
699  rstEvent(const Event& ev) :
700  Event(ev.type, ev.sessionID, ev.address, ev.length, ev.rt_count) {}
701  rstEvent(RxSeqNum seq) : //:Event(RST, 0, false), seq(seq) {}
702  Event(RST_EVENT, 0, seq(31, 16), seq(15, 0), 0) {}
704  Event(RST_EVENT, id, seq(31, 16), seq(15, 0), 1) {} //:Event(RST, id, true), seq(seq) {}
706  Event(RST_EVENT, id, seq(31, 16), seq(15, 0), hasSessionID) {} //:Event(RST, id, hasSessionID), seq(seq) {}
708  RxSeqNum seq;
709  seq(31, 16) = address;
710  seq(15, 0) = length;
711  return seq;
712  }
713  bool hasSessionID() {
714  return (rt_count != 0);
715  }
716 };
717 
718 
719 
727 #define RXMEMBUF 65536 // 64KB = 2^16
728 #define TXMEMBUF 65536 // 64KB = 2^16
729 
730 //=========================================================
731 //== MUX / A 2-to-1 Stream multiplexer.
732 //=========================================================
733 template<typename T> void pStreamMux(
734  stream<T> &si1,
735  stream<T> &si2,
736  stream<T> &so);
737 
738 
743 #if HLS_VERSION == 2017
744 
745  void toe_top(
746  //------------------------------------------------------
747  //-- MMIO Interfaces
748  //------------------------------------------------------
749  Ip4Addr piMMIO_IpAddr,
750  stream<StsBit> &soMMIO_RxMemWrErr,
751  stream<ap_uint<8> > &soMMIO_NotifDropCnt,
752  stream<ap_uint<8> > &soMMIO_MetaDropCnt,
753  stream<ap_uint<8> > &soMMIO_DataDropCnt,
754  stream<ap_uint<8> > &soMMIO_CrcDropCnt,
755  stream<ap_uint<8> > &soMMIO_SessDropCnt,
756  stream<ap_uint<8> > &soMMIO_OooDropCnt,
757 
758  //------------------------------------------------------
759  //-- NTS Interfaces
760  //------------------------------------------------------
761  StsBit &poNTS_Ready,
762 
763  //------------------------------------------------------
764  //-- IPRX / IP Rx / Data Interface
765  //------------------------------------------------------
766  stream<AxisIp4> &siIPRX_Data,
767 
768  //------------------------------------------------------
769  //-- IPTX / IP Tx / Data Interface
770  //------------------------------------------------------
771  stream<AxisIp4> &soIPTX_Data,
772 
773  //------------------------------------------------------
774  //-- TAIF / Receive Data Interfaces
775  //------------------------------------------------------
776  stream<TcpAppNotif> &soTAIF_Notif,
777  stream<TcpAppRdReq> &siTAIF_DReq,
778  stream<TcpAppData> &soTAIF_Data,
779  stream<TcpAppMeta> &soTAIF_Meta,
780 
781  //------------------------------------------------------
782  //-- TAIF / Listen Interfaces
783  //------------------------------------------------------
784  stream<TcpAppLsnReq> &siTAIF_LsnReq,
785  stream<TcpAppLsnRep> &soTAIF_LsnRep,
786 
787  //------------------------------------------------------
788  //-- TAIF / Send Data Interfaces
789  //------------------------------------------------------
790  stream<TcpAppData> &siTAIF_Data,
791  stream<TcpAppSndReq> &siTAIF_SndReq,
792  stream<TcpAppSndRep> &soTAIF_SndRep,
793 
794  //------------------------------------------------------
795  //-- TAIF / Open Connection Interfaces
796  //------------------------------------------------------
797  stream<TcpAppOpnReq> &siTAIF_OpnReq,
798  stream<TcpAppOpnRep> &soTAIF_OpnRep,
799 
800  //------------------------------------------------------
801  //-- TAIF / Close Interfaces
802  //------------------------------------------------------
803  stream<TcpAppClsReq> &siTAIF_ClsReq,
804  //-- Not Used &soTAIF_ClsSts,
805 
806  //------------------------------------------------------
807  //-- MEM / Rx PATH / S2MM Interface
808  //------------------------------------------------------
809  //-- Not Used &siMEM_RxP_RdSts,
810  stream<DmCmd> &soMEM_RxP_RdCmd,
811  stream<AxisApp> &siMEM_RxP_Data,
812  stream<DmSts> &siMEM_RxP_WrSts,
813  stream<DmCmd> &soMEM_RxP_WrCmd,
814  stream<AxisApp> &soMEM_RxP_Data,
815 
816  //------------------------------------------------------
817  //-- MEM / Tx PATH / S2MM Interface
818  //------------------------------------------------------
819  //-- Not Used &siMEM_TxP_RdSts,
820  stream<DmCmd> &soMEM_TxP_RdCmd,
821  stream<AxisApp> &siMEM_TxP_Data,
822  stream<DmSts> &siMEM_TxP_WrSts,
823  stream<DmCmd> &soMEM_TxP_WrCmd,
824  stream<AxisApp> &soMEM_TxP_Data,
825 
826  //------------------------------------------------------
827  //-- CAM / Session Lookup & Update Interfaces
828  //------------------------------------------------------
829  stream<CamSessionLookupRequest> &soCAM_SssLkpReq,
830  stream<CamSessionLookupReply> &siCAM_SssLkpRep,
831  stream<CamSessionUpdateRequest> &soCAM_SssUpdReq,
832  stream<CamSessionUpdateReply> &siCAM_SssUpdRep,
833 
834  //------------------------------------------------------
835  //-- DEBUG / Interfaces
836  //------------------------------------------------------
837  stream<ap_uint<16> > &soDBG_SssRelCnt,
838  stream<ap_uint<16> > &soDBG_SssRegCnt,
839  stream<RxBufPtr> &soDBG_RxFreeSpace,
840  stream<ap_uint<32> > &soDBG_TcpIpRxByteCnt,
841  stream<ap_uint< 8> > &soDBG_OooDebug
843  //-- DEBUG / SimCycCounter
844  ap_uint<32> &poSimCycCount
845  #endif
846  );
847 
848 #else
849 
850  void toe_top(
851  //------------------------------------------------------
852  //-- MMIO Interfaces
853  //------------------------------------------------------
854  Ip4Addr piMMIO_IpAddr,
855  stream<StsBit> &soMMIO_RxMemWrErr,
856  stream<ap_uint<8> > &soMMIO_NotifDropCnt,
857  stream<ap_uint<8> > &soMMIO_MetaDropCnt,
858  stream<ap_uint<8> > &soMMIO_DataDropCnt,
859  stream<ap_uint<8> > &soMMIO_CrcDropCnt,
860  stream<ap_uint<8> > &soMMIO_SessDropCnt,
861  stream<ap_uint<8> > &soMMIO_OooDropCnt,
862 
863  //------------------------------------------------------
864  //-- NTS Interfaces
865  //------------------------------------------------------
866  StsBit &poNTS_Ready,
867 
868  //------------------------------------------------------
869  //-- IPRX / IP Rx / Data Interface
870  //------------------------------------------------------
871  stream<AxisRaw> &siIPRX_Data,
872 
873  //------------------------------------------------------
874  //-- IPTX / IP Tx / Data Interface
875  //------------------------------------------------------
876  stream<AxisRaw> &soIPTX_Data,
877 
878  //------------------------------------------------------
879  //-- TAIF / Receive Data Interfaces
880  //------------------------------------------------------
881  stream<TcpAppNotif> &soTAIF_Notif,
882  stream<TcpAppRdReq> &siTAIF_DReq,
883  stream<TcpAppData> &soTAIF_Data,
884  stream<TcpAppMeta> &soTAIF_Meta,
885 
886  //------------------------------------------------------
887  //-- TAIF / Listen Interfaces
888  //------------------------------------------------------
889  stream<TcpAppLsnReq> &siTAIF_LsnReq,
890  stream<TcpAppLsnRep> &soTAIF_LsnRep,
891 
892  //------------------------------------------------------
893  //-- TAIF / Send Data Interfaces
894  //------------------------------------------------------
895  stream<TcpAppData> &siTAIF_Data,
896  stream<TcpAppSndReq> &siTAIF_SndReq,
897  stream<TcpAppSndRep> &soTAIF_SndRep,
898 
899  //------------------------------------------------------
900  //-- TAIF / Open Connection Interfaces
901  //------------------------------------------------------
902  stream<TcpAppOpnReq> &siTAIF_OpnReq,
903  stream<TcpAppOpnRep> &soTAIF_OpnRep,
904 
905  //------------------------------------------------------
906  //-- TAIF / Close Interfaces
907  //------------------------------------------------------
908  stream<TcpAppClsReq> &siTAIF_ClsReq,
909  //-- Not Used &soTAIF_ClsSts,
910 
911  //------------------------------------------------------
912  //-- MEM / Rx PATH / S2MM Interface
913  //------------------------------------------------------
914  //-- Not Used &siMEM_RxP_RdSts,
915  stream<DmCmd> &soMEM_RxP_RdCmd,
916  stream<AxisApp> &siMEM_RxP_Data,
917  stream<DmSts> &siMEM_RxP_WrSts,
918  stream<DmCmd> &soMEM_RxP_WrCmd,
919  stream<AxisApp> &soMEM_RxP_Data,
920 
921  //------------------------------------------------------
922  //-- MEM / Tx PATH / S2MM Interface
923  //------------------------------------------------------
924  //-- Not Used &siMEM_TxP_RdSts,
925  stream<DmCmd> &soMEM_TxP_RdCmd,
926  stream<AxisApp> &siMEM_TxP_Data,
927  stream<DmSts> &siMEM_TxP_WrSts,
928  stream<DmCmd> &soMEM_TxP_WrCmd,
929  stream<AxisApp> &soMEM_TxP_Data,
930 
931  //------------------------------------------------------
932  //-- CAM / Session Lookup & Update Interfaces
933  //------------------------------------------------------
934  stream<CamSessionLookupRequest> &soCAM_SssLkpReq,
935  stream<CamSessionLookupReply> &siCAM_SssLkpRep,
936  stream<CamSessionUpdateRequest> &soCAM_SssUpdReq,
937  stream<CamSessionUpdateReply> &siCAM_SssUpdRep,
938 
939  //------------------------------------------------------
940  //-- DEBUG / Interfaces
941  //------------------------------------------------------
942  stream<ap_uint<16> > &soDBG_SssRelCnt,
943  stream<ap_uint<16> > &soDBG_SssRegCnt,
944  stream<RxBufPtr> &soDBG_RxFreeSpace,
945  stream<ap_uint<32> > &soDBG_TcpIpRxByteCnt,
946  stream<ap_uint< 8> > &soDBG_OooDebug
948  //-- DEBUG / SimCycCounter
949  ,
950  ap_uint<32> &poSimCycCount
951  #endif
952  );
953 
954 #endif // HLS_VERSION
955 
956 #endif
957 
Definition: toe.hpp:661
TcpBufAdr address
Definition: toe.hpp:665
Event(EventType type, SessionId id, ap_uint< 3 > rt_count)
Definition: toe.hpp:671
Event(EventType type, SessionId id)
Definition: toe.hpp:669
Event()
Definition: toe.hpp:668
ap_uint< 3 > rt_count
Definition: toe.hpp:667
SessionId sessionID
Definition: toe.hpp:664
EventType type
Definition: toe.hpp:663
TcpSegLen length
Definition: toe.hpp:666
Event(EventType type, SessionId id, ap_uint< 16 > addr, ap_uint< 16 > len)
Definition: toe.hpp:673
Event(EventType type, SessionId id, ap_uint< 16 > addr, ap_uint< 16 > len, ap_uint< 3 > rt_count)
Definition: toe.hpp:675
ExtendedEvent()
Definition: toe.hpp:686
ExtendedEvent(const Event &ev, LE_SocketPair tuple)
Definition: toe.hpp:689
ExtendedEvent(const Event &ev)
Definition: toe.hpp:687
LE_SocketPair tuple
Definition: toe.hpp:685
RAiRxSarQuery(SessionId id, RxBufPtr appd)
Definition: toe.hpp:422
SessionId sessionID
Definition: toe.hpp:416
RAiRxSarQuery()
Definition: toe.hpp:419
RxBufPtr appd
Definition: toe.hpp:417
RAiRxSarQuery(SessionId id)
Definition: toe.hpp:420
RdWrBit write
Definition: toe.hpp:418
SessionId sessionID
Definition: toe.hpp:431
RAiRxSarReply()
Definition: toe.hpp:433
RxBufPtr appd
Definition: toe.hpp:432
RAiRxSarReply(SessionId id, RxBufPtr appd)
Definition: toe.hpp:434
RXeReTransTimerCmd(SessionId id, TimerCmd cmd)
Definition: toe.hpp:635
TimerCmd command
Definition: toe.hpp:631
RXeReTransTimerCmd(SessionId id)
Definition: toe.hpp:633
SessionId sessionID
Definition: toe.hpp:630
CmdBit init
Definition: toe.hpp:391
RXeRxSarQuery(SessionId id, RxSeqNum rcvd, RdWrBit wrBit)
Definition: toe.hpp:400
RdWrBit write
Definition: toe.hpp:390
RxSeqNum rcvd
Definition: toe.hpp:386
RxSeqNum oooTail
Definition: toe.hpp:388
FlagBool ooo
Definition: toe.hpp:389
RXeRxSarQuery(SessionId id, RxSeqNum rcvd, FlagBool ooo, RxSeqNum oooHead, RxSeqNum oooTail, RdWrBit wrBit)
Definition: toe.hpp:406
RXeRxSarQuery(SessionId id)
Definition: toe.hpp:395
SessionId sessionID
Definition: toe.hpp:385
RXeRxSarQuery(SessionId id, RdWrBit wrBit)
Definition: toe.hpp:397
RXeRxSarQuery(SessionId id, RxSeqNum rcvd, RdWrBit wrBit, CmdBit iniBit)
Definition: toe.hpp:403
RxSeqNum oooHead
Definition: toe.hpp:387
RXeRxSarQuery()
Definition: toe.hpp:392
RemotWinSize recv_window
Definition: toe.hpp:449
RXeTxSarQuery(SessionId id, TxAckNum ackd, RemotWinSize recv_win, LocalWinSize cong_win, ap_uint< 2 > count, CmdBool fastRetransmitted)
Definition: toe.hpp:461
RXeTxSarQuery()
Definition: toe.hpp:455
CmdBool fastRetransmitted
Definition: toe.hpp:452
TxAckNum ackd
Definition: toe.hpp:448
RXeTxSarQuery(SessionId id, RdWrBit wrBit)
Definition: toe.hpp:458
RdWrBit write
Definition: toe.hpp:453
ap_uint< 2 > count
Definition: toe.hpp:451
LocalWinSize cong_window
Definition: toe.hpp:450
SessionId sessionID
Definition: toe.hpp:447
TxAckNum prevUnak
Definition: toe.hpp:471
ap_uint< 2 > count
Definition: toe.hpp:474
RXeTxSarReply(TxAckNum ackd, TxAckNum unak, TcpWindow cong_win, TcpWindow sstresh, ap_uint< 2 > count, CmdBool fastRetransmitted)
Definition: toe.hpp:477
CmdBool fastRetransmitted
Definition: toe.hpp:475
RXeTxSarReply()
Definition: toe.hpp:476
TcpWindow slowstart_threshold
Definition: toe.hpp:473
TcpWindow cong_window
Definition: toe.hpp:472
TxAckNum prevAckd
Definition: toe.hpp:470
FlagBool ooo
Definition: toe.hpp:374
RxSeqNum oooTail
Definition: toe.hpp:373
RxSarReply()
Definition: toe.hpp:375
RxSarReply(RxBufPtr appd, RxSeqNum rcvd, StsBool ooo, RxSeqNum oooHead, RxSeqNum oooTail)
Definition: toe.hpp:376
RxBufPtr appd
Definition: toe.hpp:370
RxSeqNum oooHead
Definition: toe.hpp:372
RxSeqNum rcvd
Definition: toe.hpp:371
bool allowCreation
Definition: toe.hpp:323
SessionLookupQuery(LE_SocketPair tuple, bool allowCreation)
Definition: toe.hpp:325
LE_SocketPair tuple
Definition: toe.hpp:322
SessionLookupReply(SessionId id, HitState hit)
Definition: toe.hpp:337
SessionId sessionID
Definition: toe.hpp:334
HitState hit
Definition: toe.hpp:335
StateQuery(SessionId id, RdWrBit wrBit)
Definition: toe.hpp:358
RdWrBit write
Definition: toe.hpp:352
StateQuery(SessionId id)
Definition: toe.hpp:356
TcpState state
Definition: toe.hpp:351
StateQuery()
Definition: toe.hpp:353
SessionId sessionID
Definition: toe.hpp:350
StateQuery(SessionId id, TcpState state, RdWrBit write)
Definition: toe.hpp:361
SessionId sessionID
Definition: toe.hpp:547
TAiTxSarPush(SessionId id, TxBufPtr app)
Definition: toe.hpp:550
TxBufPtr app
Definition: toe.hpp:548
TAiTxSarPush()
Definition: toe.hpp:549
TStTxSarPush()
Definition: toe.hpp:565
SessionId sessionID
Definition: toe.hpp:559
CmdBit init
Definition: toe.hpp:564
TStTxSarPush(SessionId id, ap_uint< 16 > ackd)
Definition: toe.hpp:567
ap_uint< 16 > ackd
Definition: toe.hpp:560
TStTxSarPush(SessionId id, ap_uint< 16 > ackd, CmdBit init)
Definition: toe.hpp:569
EventType type
Definition: toe.hpp:645
TXeReTransTimerCmd(SessionId id, EventType type)
Definition: toe.hpp:649
SessionId sessionID
Definition: toe.hpp:644
TXeReTransTimerCmd(SessionId id)
Definition: toe.hpp:647
bool finReady
Definition: toe.hpp:490
bool isRtQuery
Definition: toe.hpp:492
TXeTxSarQuery(SessionId id, RdWrBit wrBit)
Definition: toe.hpp:497
TXeTxSarQuery(SessionId id, TxAckNum not_ackd, RdWrBit write, CmdBit init, bool finReady, bool finSent)
Definition: toe.hpp:504
TXeTxSarQuery(SessionId id, TxAckNum not_ackd, RdWrBit write, CmdBit init, bool finReady, bool finSent, bool isRt)
Definition: toe.hpp:506
TXeTxSarQuery()
Definition: toe.hpp:494
TXeTxSarQuery(SessionId id, TxAckNum not_ackd, RdWrBit write, CmdBit init)
Definition: toe.hpp:502
TXeTxSarQuery(SessionId id, TxAckNum not_ackd, RdWrBit write)
Definition: toe.hpp:500
bool finSent
Definition: toe.hpp:491
SessionId sessionID
Definition: toe.hpp:486
TxAckNum not_ackd
Definition: toe.hpp:487
RdWrBit write
Definition: toe.hpp:488
CmdBit init
Definition: toe.hpp:489
TcpWindow min_window
Definition: toe.hpp:517
bool finReady
Definition: toe.hpp:519
TXeTxSarReply(ap_uint< 32 > ack, ap_uint< 32 > nack, ap_uint< 16 > min_window, ap_uint< 16 > app, bool finReady, bool finSent)
Definition: toe.hpp:522
TxAckNum not_ackd
Definition: toe.hpp:516
TxAckNum ackd
Definition: toe.hpp:515
TXeTxSarReply()
Definition: toe.hpp:521
bool finSent
Definition: toe.hpp:520
TxBufPtr app
Definition: toe.hpp:518
TXeTxSarRtQuery(const TXeTxSarQuery &q)
Definition: toe.hpp:533
TXeTxSarRtQuery(SessionId id, ap_uint< TOE_WINDOW_BITS > ssthresh)
Definition: toe.hpp:535
TXeTxSarRtQuery()
Definition: toe.hpp:532
ap_uint< TOE_WINDOW_BITS > getThreshold()
Definition: toe.hpp:537
TxAppTableQuery(SessionId id, ap_uint< 16 > pt)
Definition: toe.hpp:594
bool write
Definition: toe.hpp:590
SessionId sessId
Definition: toe.hpp:588
TxAppTableQuery(SessionId id)
Definition: toe.hpp:592
TxBufPtr mempt
Definition: toe.hpp:589
TxAppTableQuery()
Definition: toe.hpp:591
ap_uint< 16 > ackd
Definition: toe.hpp:604
SessionId sessId
Definition: toe.hpp:603
TxAppTableReply()
Definition: toe.hpp:609
TxAppTableReply(SessionId id, ap_uint< 16 > ackd, TxBufPtr pt)
Definition: toe.hpp:611
TxBufPtr mempt
Definition: toe.hpp:605
bool StsBool
Definition: nal.hpp:246
TcpAppOpnRep SessState
Definition: toe.hpp:279
const int cDepth_STtToRXe_Rep
Definition: toe.hpp:217
void pStreamMux(stream< T > &si1, stream< T > &si2, stream< T > &so)
A 2-to-1 generic Stream Multiplexer.
Definition: timers.cpp:90
uint32_t idleCycCnt
TcpWindow RemotWinSize
Definition: toe.hpp:292
ap_uint< 32 > TxMemPtr
Definition: toe.hpp:296
ap_uint< 64 > LE_tData
Definition: toe.hpp:253
ap_uint< 32 > tDataHalf
Definition: toe.hpp:256
const int cDepth_AKdToTXe_Event
Definition: toe.hpp:207
EventType
Definition: toe.hpp:273
TcpWindow LocalWinSize
Definition: toe.hpp:293
const int cDepth_RXeToTSt_Qry
Definition: toe.hpp:215
const int cDepth_RAiToRSt_Qry
Definition: toe.hpp:211
const int cDepth_TImToEVe_Event
Definition: toe.hpp:227
const int cDepth_TXeToEVe_Event
Definition: toe.hpp:229
TcpSeqNum RxSeqNum
Definition: toe.hpp:290
TimerCmd
Definition: toe.hpp:622
const int cDepth_TStToTXe_Rep
Definition: toe.hpp:225
const int cDepth_TAiToTSt_Cmd
Definition: toe.hpp:221
ap_uint< TOE_WINDOW_BITS > TcpBufAdr
Definition: toe.hpp:297
const int cDepth_TXeToRSt_Req
Definition: toe.hpp:230
ap_uint< 8 > tKeep
Definition: toe.hpp:257
const int cDepth_RXeToEVe_Event
Definition: toe.hpp:213
const int cDepth_RXeToRSt_Qry
Definition: toe.hpp:214
ap_uint< 1 > LsnAck
Definition: toe.hpp:198
unsigned int gSimCycCnt
Definition: tb_nal.cpp:150
const int cDepth_TStToRXe_Rep
Definition: toe.hpp:223
ap_uint< 15 > TcpStaPort
Definition: toe.hpp:284
const int cDepth_AKdToEVe_Event
Definition: toe.hpp:206
ap_uint< 16 > ClsReq
Definition: toe.hpp:201
const int cDepth_EVeToAKd_Event
Definition: toe.hpp:209
TcpBufAdr TxBufPtr
Definition: toe.hpp:299
ap_uint< 1 > tLast
Definition: toe.hpp:258
ap_uint< 8 > LE_tKeep
Definition: toe.hpp:254
HitStates
Definition: toe.hpp:315
#define TOE_FEATURE_USED_FOR_DEBUGGING
Definition: toe.hpp:103
TcpBufAdr RxBufPtr
Definition: toe.hpp:298
void toe_top(Ip4Addr piMMIO_IpAddr, stream< StsBit > &soMMIO_RxMemWrErr, stream< ap_uint< 8 > > &soMMIO_NotifDropCnt, stream< ap_uint< 8 > > &soMMIO_MetaDropCnt, stream< ap_uint< 8 > > &soMMIO_DataDropCnt, stream< ap_uint< 8 > > &soMMIO_CrcDropCnt, stream< ap_uint< 8 > > &soMMIO_SessDropCnt, stream< ap_uint< 8 > > &soMMIO_OooDropCnt, StsBit &poNTS_Ready, stream< AxisRaw > &siIPRX_Data, stream< AxisRaw > &soIPTX_Data, stream< TcpAppNotif > &soTAIF_Notif, stream< TcpAppRdReq > &siTAIF_DReq, stream< TcpAppData > &soTAIF_Data, stream< TcpAppMeta > &soTAIF_Meta, stream< TcpAppLsnReq > &siTAIF_LsnReq, stream< TcpAppLsnRep > &soTAIF_LsnRep, stream< TcpAppData > &siTAIF_Data, stream< TcpAppSndReq > &siTAIF_SndReq, stream< TcpAppSndRep > &soTAIF_SndRep, stream< TcpAppOpnReq > &siTAIF_OpnReq, stream< TcpAppOpnRep > &soTAIF_OpnRep, stream< TcpAppClsReq > &siTAIF_ClsReq, stream< DmCmd > &soMEM_RxP_RdCmd, stream< AxisApp > &siMEM_RxP_Data, stream< DmSts > &siMEM_RxP_WrSts, stream< DmCmd > &soMEM_RxP_WrCmd, stream< AxisApp > &soMEM_RxP_Data, stream< DmCmd > &soMEM_TxP_RdCmd, stream< AxisApp > &siMEM_TxP_Data, stream< DmSts > &siMEM_TxP_WrSts, stream< DmCmd > &soMEM_TxP_WrCmd, stream< AxisApp > &soMEM_TxP_Data, stream< CamSessionLookupRequest > &soCAM_SssLkpReq, stream< CamSessionLookupReply > &siCAM_SssLkpRep, stream< CamSessionUpdateRequest > &soCAM_SssUpdReq, stream< CamSessionUpdateReply > &siCAM_SssUpdRep, stream< ap_uint< 16 > > &soDBG_SssRelCnt, stream< ap_uint< 16 > > &soDBG_SssRegCnt, stream< RxBufPtr > &soDBG_RxFreeSpace, stream< ap_uint< 32 > > &soDBG_TcpIpRxByteCnt, stream< ap_uint< 8 > > &soDBG_OooDebug)
Top of TCP Offload Engine (TOE)
Definition: toe.cpp:1056
bool HitState
Definition: toe.hpp:314
ap_uint< 16 > LsnReq
Definition: toe.hpp:199
ap_uint< 64 > tData
Definition: toe.hpp:255
ap_uint< 16 > SessionId
Definition: toe.hpp:197
const int cDepth_STtToTAi_Rep
Definition: toe.hpp:218
ap_uint<(32+16) > OpnReq
Definition: toe.hpp:200
notificationType
Definition: toe.hpp:242
ap_uint< 32 > RxMemPtr
Definition: toe.hpp:295
uint32_t packetCounter
TcpAckNum TxAckNum
Definition: toe.hpp:291
const int cDepth_TAiToEVe_Event
Definition: toe.hpp:220
const int cDepth_TStToTAi_Cmd
Definition: toe.hpp:224
ap_uint< 15 > TcpDynPort
Definition: toe.hpp:285
const int cDepth_TXeToTSt_Qry
Definition: toe.hpp:231
@ RST_EVENT
Definition: toe.hpp:274
@ SYN_EVENT
Definition: toe.hpp:273
@ ACK_EVENT
Definition: toe.hpp:273
@ FIN_EVENT
Definition: toe.hpp:274
@ TX_EVENT
Definition: toe.hpp:273
@ RT_EVENT
Definition: toe.hpp:273
@ ACK_NODELAY_EVENT
Definition: toe.hpp:274
@ LOAD_TIMER
Definition: toe.hpp:622
@ STOP_TIMER
Definition: toe.hpp:623
@ CHUNK_2
Definition: toe.hpp:244
@ CHUNK_1
Definition: toe.hpp:244
@ CHUNK_4
Definition: toe.hpp:244
@ CHUNK_5
Definition: toe.hpp:244
@ CHUNK_3
Definition: toe.hpp:244
@ CHUNK_0
Definition: toe.hpp:244
@ SESSION_EXISTS
Definition: toe.hpp:315
@ SESSION_UNKNOWN
Definition: toe.hpp:315
@ WORD_3
Definition: toe.hpp:243
@ WORD_1
Definition: toe.hpp:243
@ WORD_5
Definition: toe.hpp:243
@ WORD_2
Definition: toe.hpp:243
@ WORD_4
Definition: toe.hpp:243
@ WORD_0
Definition: toe.hpp:243
@ TIME_OUT
Definition: toe.hpp:242
@ RESET
Definition: toe.hpp:242
@ CLOSE
Definition: toe.hpp:242
@ PKG
Definition: toe.hpp:242
ap_uint< 16 > TcpSegLen
Definition: AxisTcp.hpp:121
ap_uint< 32 > TcpSeqNum
Definition: AxisTcp.hpp:106
ap_uint< 16 > SessionId
Definition: nts_types.hpp:136
#define CMD_INIT
Definition: nts_types.hpp:60
TcpState
Definition: nts_types.hpp:296
ap_uint< 1 > StsBit
Definition: nts_types.hpp:116
#define QUERY_RD
Definition: nts_types.hpp:65
ap_uint< 32 > Ip4Addr
Definition: AxisIp4.hpp:169
ap_uint< 1 > RdWrBit
Definition: nts_types.hpp:111
#define TCP_HEADER_LEN
Definition: AxisTcp.hpp:81
bool FlagBool
Definition: nts_types.hpp:124
#define QUERY_WR
Definition: nts_types.hpp:66
#define IP4_HEADER_LEN
Definition: AxisIp4.hpp:133
ap_uint< 1 > CmdBit
Definition: nts_types.hpp:108
ap_uint< 16 > TcpWindow
Definition: AxisTcp.hpp:112
ap_uint< 32 > TcpAckNum
Definition: AxisTcp.hpp:107
#define FLAG_INO
Definition: nts_types.hpp:74
bool CmdBool
Definition: nts_types.hpp:123
@ CLOSED
Definition: nts_types.hpp:296
tuple ZYC2_MSS
Definition: tc_utils.py:42
Definition: udp.hpp:91
ap_uint< 32 > ip_address
Definition: toe.hpp:306
ap_uint< 16 > ip_port
Definition: toe.hpp:307
TxAckNum getAckNumb()
Definition: toe.hpp:707
bool hasSessionID()
Definition: toe.hpp:713
rstEvent(SessionId id, RxSeqNum seq, bool hasSessionID)
Definition: toe.hpp:705
rstEvent()
Definition: toe.hpp:698
rstEvent(RxSeqNum seq)
Definition: toe.hpp:701
rstEvent(const Event &ev)
Definition: toe.hpp:699
rstEvent(SessionId id, RxSeqNum seq)
Definition: toe.hpp:703
#define MTU
Definition: udp.hpp:71