cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
hss.cpp
Go to the documentation of this file.
1 
17 
30 #include "uss.hpp"
31 #include "nal.hpp"
32 
33 using namespace hls;
34 
45 uint8_t selectConfigUpdatePropagation(uint16_t config_addr)
46 {
47 #pragma HLS INLINE
48  switch(config_addr) {
49  default:
50  return 0;
52  return 3;
56  return 2;
57  }
58 }
59 
60 
61 
62 
81  //stream<NalConfigUpdate> &sToTcpAgency, //(currently not used)
82  stream<NalConfigUpdate> &sToPortLogic,
83  stream<NalConfigUpdate> &sToUdpRx,
84  stream<NalConfigUpdate> &sToTcpRx,
85  stream<NalConfigUpdate> &sToStatusProc,
86  stream<NalMrtUpdate> &sMrtUpdate,
87  //ap_uint<32> localMRT[MAX_MRT_SIZE],
88  stream<uint32_t> &mrt_version_update_0,
89  stream<uint32_t> &mrt_version_update_1,
90  stream<NalStatusUpdate> &sStatusUpdate
91  )
92 {
93  //-- DIRECTIVES FOR THIS PROCESS ------------------------------------------
94 #pragma HLS INLINE off
95  //no pipeline, isn't compatible to AXI4Lite bus
96 
97  //-- STATIC CONTROL VARIABLES (with RESET) --------------------------------
98  static uint16_t tableCopyVariable = 0;
99  static bool tables_initialized = false;
100  static AxiLiteFsmStates a4lFsm = A4L_COPY_CONFIG; //start with config after reset
101  static ConfigBcastStates cbFsm = CB_WAIT;
102  static uint32_t processed_mrt_version = 0;
103  static ConfigBcastStates mbFsm = CB_WAIT;
104 
105 #pragma HLS reset variable=tableCopyVariable
106 #pragma HLS reset variable=tables_initialized
107 #pragma HLS reset variable=a4lFsm
108 #pragma HLS reset variable=cbFsm
109 #pragma HLS reset variable=processed_mrt_version
110 #pragma HLS reset variable=mbFsm
111 
112  //-- STATIC DATAFLOW VARIABLES --------------------------------------------
113  static ap_uint<32> config[NUMBER_CONFIG_WORDS];
114  static ap_uint<32> status[NUMBER_STATUS_WORDS];
115 
116  static ap_uint<16> configProp = 0x0;
117  static NalConfigUpdate cu_toCB = NalConfigUpdate();
118  static ap_uint<32> new_word;
119 
120  static ap_uint<32> localMRT[MAX_MRT_SIZE];
121  //#pragma HLS RESOURCE variable=localMRT core=RAM_2P_BRAM
122  //#pragma HLS ARRAY_PARTITION variable=localMRT complete dim=1
123  //FIXME: maybe optimize and remove localMRT here (send updates when indicated by version?)
124 
125 
126  //#pragma HLS ARRAY_PARTITION variable=status cyclic factor=4 dim=1
127  //#pragma HLS ARRAY_PARTITION variable=config cyclic factor=4 dim=1
128 
129  //-- LOCAL DATAFLOW VARIABLES ---------------------------------------------
131  uint32_t new_mrt_version;
132  ap_uint<32> new_ip4node;
133 
134 
135  if(!tables_initialized)
136  {
137  // ----- tables init -----
138  for(int i = 0; i < MAX_MRT_SIZE; i++)
139  {
140  //localMRT[i] = 0x0;
141  localMRT[i] = 0x1; //to force init of MRT agency
142  }
143  for(int i = 0; i < NUMBER_CONFIG_WORDS; i++)
144  {
145  config[i] = 0x0;
146  }
147  for(int i = 0; i < NUMBER_STATUS_WORDS; i++)
148  {
149  status[i] = 0x0;
150  }
151  tables_initialized = true;
152  } else {
153 
154  // ----- AXI4Lite Processing -----
155 
156  switch(a4lFsm)
157  {
158  default:
159  //case A4L_RESET:
160  // // ----- tables init -----
161  // for(int i = 0; i < MAX_MRT_SIZE; i++)
162  // {
163  // localMRT[i] = 0x0;
164  // }
165  // for(int i = 0; i < NUMBER_CONFIG_WORDS; i++)
166  // {
167  // config[i] = 0x0;
168  // }
169  // for(int i = 0; i < NUMBER_STATUS_WORDS; i++)
170  // {
171  // status[i] = 0x0;
172  // }
173  // tableCopyVariable = 0;
174  // a4lFsm = A4L_STATUS_UPDATE;
175  // break;
176  case A4L_STATUS_UPDATE:
177  if(!sStatusUpdate.empty())
178  {
179  // ----- apply updates -----
180  NalStatusUpdate su = sStatusUpdate.read();
181  status[su.status_addr] = su.new_value;
182  printf("[A4l] got status update for address %d with value %d\n", (int) su.status_addr, (int) su.new_value);
183  } else {
184  a4lFsm = A4L_COPY_CONFIG;
185  }
186  break;
187  case A4L_COPY_CONFIG:
188  //TODO: necessary? Or does this AXI4Lite anyways "in the background"?
189  //or do we need to copy it explicetly, but could do this also every ~2 seconds?
190 
191  //printf("[A4l] copy config %d\n", tableCopyVariable);
192  new_word = ctrlLink[tableCopyVariable];
193  if(new_word != config[tableCopyVariable])
194  {
195  configProp = selectConfigUpdatePropagation(tableCopyVariable);
196  cu = NalConfigUpdate(tableCopyVariable, new_word);
197  cbFsm = CB_START;
198  //config[tableCopyVariable] = new_word;
199  a4lFsm = A4L_COPY_CONFIG_2;
200  } else {
201  tableCopyVariable++;
202  if(tableCopyVariable >= NUMBER_CONFIG_WORDS)
203  {
204  tableCopyVariable = 0;
205  a4lFsm = A4L_COPY_MRT;
206  }
207  }
208  break;
209  case A4L_COPY_CONFIG_2:
210  printf("[A4l] waiting CB broadcast\n");
211  if(cbFsm == CB_WAIT)
212  {
213  config[tableCopyVariable] = new_word;
214  tableCopyVariable++;
215  if(tableCopyVariable >= NUMBER_CONFIG_WORDS)
216  {
217  tableCopyVariable = 0;
218  a4lFsm = A4L_COPY_MRT;
219  } else {
220  a4lFsm = A4L_COPY_CONFIG;
221  }
222  }
223  break;
224  case A4L_COPY_MRT:
225  //printf("[A4l] copy MRT %d\n", tableCopyVariable);
226  new_ip4node = ctrlLink[tableCopyVariable + NUMBER_CONFIG_WORDS + NUMBER_STATUS_WORDS];
227  if (new_ip4node != localMRT[tableCopyVariable])
228  {
229  NalMrtUpdate mu = NalMrtUpdate(tableCopyVariable, new_ip4node);
230  sMrtUpdate.write(mu);
231  localMRT[tableCopyVariable] = new_ip4node;
232  printf("[A4l] update MRT at %d with %d\n", tableCopyVariable, (int) new_ip4node);
233  NalMrtUpdate mrt_update = NalMrtUpdate(tableCopyVariable, new_ip4node);
234  sMrtUpdate.write(mrt_update);
235  }
236  tableCopyVariable++;
237  if(tableCopyVariable >= MAX_MRT_SIZE)
238  {
239  tableCopyVariable = 0;
240  a4lFsm = A4L_COPY_STATUS;
241  }
242  break;
243  case A4L_COPY_STATUS:
244  ctrlLink[NUMBER_CONFIG_WORDS + tableCopyVariable] = status[tableCopyVariable];
245  tableCopyVariable++;
246  if(tableCopyVariable >= NUMBER_STATUS_WORDS)
247  {
248  //tableCopyVariable = 0;
249  a4lFsm = A4L_COPY_FINISH;
250  }
251  break;
252  case A4L_COPY_FINISH:
253  tableCopyVariable = 0;
254  //acknowledge the processed version
255  new_mrt_version = (uint32_t) config[NAL_CONFIG_MRT_VERSION];
256  if(new_mrt_version != processed_mrt_version)
257  {
258  printf("\t\t\t[A4L:CtrlLink:Info] Acknowledged MRT version %d.\n", (int) new_mrt_version);
259  mbFsm = CB_START;
260  processed_mrt_version = new_mrt_version;
261  }
262  a4lFsm = A4L_WAIT_FOR_SUB_FSMS;
263  break;
265  printf("[A4l] SubFSMs state mb: %d; cb: %d\n", (int) mbFsm, (int) cbFsm);
266  if(mbFsm == CB_WAIT && cbFsm == CB_WAIT)
267  {
268  a4lFsm = A4L_STATUS_UPDATE;
269  printf("[A4l] SubFSMs done...continue\n");
270  }
271  break;
272  }
273 
274  // ----- Config Broadcast -----
275 
276  switch(cbFsm)
277  {
278  default:
279  case CB_WAIT:
280  //NOP
281  break;
282  case CB_START:
283  cu_toCB = cu;
284  switch (configProp) {
285  default:
286  case 0:
287  cbFsm = CB_WAIT; //currently not used
288  break;
289  case 1:
290  cbFsm = CB_1;
291  break;
292  case 2:
293  cbFsm = CB_2;
294  break;
295  case 3:
296  cbFsm = CB_3_0;
297  printf("[A4l] Issued rank update: %d\n", (int) cu.update_value);
298  break;
299  }
300  break;
301  case CB_1:
302  //(currently not used)
303  //if(!sToTcpAgency.full())
304  //{
305  // sToTcpAgency.write(cu_toCB);
306  cbFsm = CB_WAIT;
307  //}
308  break;
309  case CB_2:
310  if(!sToPortLogic.full())
311  {
312  sToPortLogic.write(cu_toCB);
313  cbFsm = CB_WAIT;
314  }
315  break;
316  case CB_3_0:
317  if(!sToUdpRx.full())
318  {
319  sToUdpRx.write(cu_toCB);
320  cbFsm = CB_3_1;
321  }
322  break;
323  case CB_3_1:
324  if(!sToTcpRx.full())
325  {
326  sToTcpRx.write(cu_toCB);
327  cbFsm = CB_3_2;
328  }
329  break;
330  case CB_3_2:
331  if(!sToStatusProc.full())
332  {
333  sToStatusProc.write(cu_toCB);
334  cbFsm = CB_WAIT;
335  }
336  break;
337  }
338 
339  // ----- MRT version broadcast ----
340 
341  switch(mbFsm)
342  {
343  default:
344  case CB_WAIT:
345  //NOP
346  break;
347  case CB_START:
348  mbFsm = CB_1;
349  printf("[A4l] Issued Mrt update: %d\n", (int) processed_mrt_version);
350  break;
351  case CB_1:
352  if(!mrt_version_update_0.full())
353  {
354  mrt_version_update_0.write(processed_mrt_version);
355  mbFsm = CB_2;
356  }
357  break;
358  case CB_2:
359  if(!mrt_version_update_1.full())
360  {
361  mrt_version_update_1.write(processed_mrt_version);
362  mbFsm = CB_WAIT;
363  }
364  break;
365  }
366 
367  } // else
368 
369 }
370 
371 
372 
387  stream<NalMrtUpdate> &sMrtUpdate,
388  //const ap_uint<32> localMRT[MAX_MRT_SIZE],
389  stream<NodeId> &sGetIpReq_UdpTx,
390  stream<Ip4Addr> &sGetIpRep_UdpTx,
391  stream<NodeId> &sGetIpReq_TcpTx,
392  stream<Ip4Addr> &sGetIpRep_TcpTx,
393  stream<Ip4Addr> &sGetNidReq_UdpRx,
394  stream<NodeId> &sGetNidRep_UdpRx,
395  stream<Ip4Addr> &sGetNidReq_TcpRx,
396  stream<NodeId> &sGetNidRep_TcpRx//,
397  //stream<Ip4Addr> &sGetNidReq_TcpTx,
398  //stream<NodeId> &sGetNidRep_TcpTx
399  )
400 {
401  //-- DIRECTIVES FOR THIS PROCESS ------------------------------------------
402 #pragma HLS INLINE off
403 #pragma HLS pipeline II=1
404 
405  //-- STATIC CONTROL VARIABLES (with RESET) --------------------------------
406  //static bool tables_initialized = false;
407 
408  //#pragma HLS reset variable=tables_initialized
409 
410  //-- STATIC DATAFLOW VARIABLES --------------------------------------------
411  //static ap_uint<32> localMRT[MAX_MRT_SIZE];
412 
413  //#define CAM_SIZE 8
414  //#define CAM_NUM 16
415  // static Cam8<NodeId,Ip4Addr> mrt_cam_arr[CAM_NUM];
416  //#ifndef __SYNTHESIS__
417  // if(MAX_MRT_SIZE != 128)
418  // {
419  // printf("\n\t\tERROR: pMrtAgency is currently configured to support only a MRT size up to 128! Abort.\n(Currently, the use of \'mrt_cam_arr\' must be updated accordingly by hand.)\n");
420  // exit(-1);
421  // }
422  //#endif
423 
424  static ap_uint<32> localMRT[MAX_MRT_SIZE];
425  //#pragma HLS ARRAY_PARTITION variable=localMRT cyclic factor=8 dim=1
426 #pragma HLS ARRAY_PARTITION variable=localMRT complete dim=1
427 
428 
429  //-- LOCAL DATAFLOW VARIABLES ---------------------------------------------
430 
431  // if(!tables_initialized)
432  // {
433  // //for(int i = 0; i < CAM_NUM; i++)
434  // //{
435  // // mrt_cam_arr[i].reset();
436  // //}
437  // tables_initialized = true;
438  // } else
439 
440  if( !sMrtUpdate.empty() )
441  {
442  NalMrtUpdate mu = sMrtUpdate.read();
443  if(mu.nid < MAX_MRT_SIZE)
444  {
445  localMRT[mu.nid] = mu.ip4a;
446  }
447 
448  } else if( !sGetIpReq_UdpTx.empty() && !sGetIpRep_UdpTx.full())
449  {
450  NodeId rank;
451  rank = sGetIpReq_UdpTx.read();
452  //uint8_t cam_select = rank / CAM_SIZE;
453  Ip4Addr rep = 0; //return zero on failure
454  //if(rank < MAX_MRT_SIZE && cam_select < CAM_NUM)
455  if(rank < MAX_MRT_SIZE)
456  {
457  //mrt_cam_arr[cam_select].lookup(rank, rep);
458  rep = localMRT[rank];
459  }
460  sGetIpRep_UdpTx.write(rep);
461  }
462  else if( !sGetIpReq_TcpTx.empty() && !sGetIpRep_TcpTx.full())
463  {
464  NodeId rank;
465  rank = sGetIpReq_TcpTx.read();
466  //uint8_t cam_select = rank / CAM_SIZE;
467  Ip4Addr rep = 0; //return zero on failure
468  //if(rank < MAX_MRT_SIZE && cam_select < CAM_NUM)
469  if(rank < MAX_MRT_SIZE)
470  {
471  //mrt_cam_arr[cam_select].lookup(rank, rep);
472  rep = localMRT[rank];
473  }
474  sGetIpRep_TcpTx.write(rep);
475  }
476  else if( !sGetNidReq_UdpRx.empty() && !sGetNidRep_UdpRx.full())
477  {
478  ap_uint<32> ipAddr = sGetNidReq_UdpRx.read();
479  printf("[HSS-INFO] Searching for Node ID of IP %d.\n", (int) ipAddr);
481  for(uint32_t i = 0; i< MAX_MRT_SIZE; i++)
482  {
483 #pragma HLS unroll factor=8
484  if(localMRT[i] == ipAddr)
485  {
486  rep = (NodeId) i;
487  break;
488  }
489  }
490  printf("[HSS-INFO] found Node Id %d.\n", (int) rep);
491  sGetNidRep_UdpRx.write(rep);
492  }
493  else if( !sGetNidReq_TcpRx.empty() && !sGetNidRep_TcpRx.full())
494  {
495  ap_uint<32> ipAddr = sGetNidReq_TcpRx.read();
496  printf("[HSS-INFO] Searching for Node ID of IP %d.\n", (int) ipAddr);
498  for(uint32_t i = 0; i< MAX_MRT_SIZE; i++)
499  {
500 #pragma HLS unroll factor=8
501  if(localMRT[i] == ipAddr)
502  {
503  rep = (NodeId) i;
504  break;
505  }
506  }
507  printf("[HSS-INFO] found Node Id %d.\n", (int) rep);
508  sGetNidRep_TcpRx.write(rep);
509  }
510  //for(int i = 0; i < CAM_NUM; i++)
511  //{
512  // if(mrt_cam_arr[i].reverse_lookup(ipAddr, rep))
513  // {
514  // break;
515  // }
516  //}
517 }
518 
519 
520 
546  ap_uint<1> *layer_4_enabled,
547  ap_uint<1> *layer_7_enabled,
548  ap_uint<1> *role_decoupled,
549  ap_uint<1> *piNTS_ready,
550  ap_uint<16> *piMMIO_FmcLsnPort,
551  ap_uint<32> *pi_udp_rx_ports,
552  ap_uint<32> *pi_tcp_rx_ports,
553  stream<NalConfigUpdate> &sConfigUpdate,
554  stream<UdpPort> &sUdpPortsToOpen,
555  stream<UdpPort> &sUdpPortsToClose,
556  stream<TcpPort> &sTcpPortsToOpen,
557  stream<bool> &sUdpPortsOpenFeedback,
558  stream<bool> &sTcpPortsOpenFeedback,
559  stream<bool> &sMarkToDel_unpriv,
560  stream<NalPortUpdate> &sPortUpdate,
561  stream<bool> &sStartTclCls
562  )
563 {
564  //-- DIRECTIVES FOR THIS PROCESS ------------------------------------------
565 #pragma HLS INLINE off
566 #pragma HLS pipeline II=1
567 
568  //-- STATIC CONTROL VARIABLES (with RESET) --------------------------------
569  static ap_uint<16> processed_FMC_listen_port = 0;
570  static ap_uint<32> tcp_rx_ports_processed = 0;
571  static ap_uint<32> udp_rx_ports_processed = 0;
572  static PortFsmStates port_fsm = PORT_RESET;
573 
574 #ifndef __SYNTHESIS__
575  static ap_uint<16> mmio_stabilize_counter = 1;
576 #else
577  static ap_uint<16> mmio_stabilize_counter = NAL_MMIO_STABILIZE_TIME;
578 #endif
579 
580 
581 #pragma HLS reset variable=mmio_stabilize_counter
582 #pragma HLS reset variable=processed_FMC_listen_port
583 #pragma HLS reset variable=udp_rx_ports_processed
584 #pragma HLS reset variable=tcp_rx_ports_processed
585 #pragma HLS reset variable=port_fsm
586 
587  //-- STATIC DATAFLOW VARIABLES --------------------------------------------
588  static ap_uint<16> new_relative_port_to_req_udp;
589  static ap_uint<16> new_relative_port_to_req_tcp;
590  static ap_uint<16> current_requested_port;
591  static NalPortUpdate current_port_update;
592 
593  //-- LOCAL DATAFLOW VARIABLES ---------------------------------------------
594 
595  switch(port_fsm)
596  {
597  default:
598  case PORT_RESET:
599  if(mmio_stabilize_counter > 0)
600  {
601  mmio_stabilize_counter--;
602  } else {
603  port_fsm = PORT_IDLE;
604  }
605  break;
606  case PORT_IDLE:
607  if(!sConfigUpdate.empty())
608  {
609  // restore saved states (after NAL got reset)
610  // TODO: apparently, this isn't working in time...for this we have to have a bigger "stabilizing count"
611  // at the other side: to request ports twice is apparently not harmful
612  NalConfigUpdate ca = sConfigUpdate.read();
613  switch(ca.config_addr)
614  {
616  if(processed_FMC_listen_port == 0)
617  {
618  processed_FMC_listen_port = (ap_uint<16>) ca.update_value;
619  }
620  break;
622  if(udp_rx_ports_processed == 0)
623  {
624  udp_rx_ports_processed = ca.update_value;
625  }
626  break;
628  if(tcp_rx_ports_processed == 0)
629  {
630  tcp_rx_ports_processed = ca.update_value;
631  }
632  break;
633  default:
634  printf("[ERROR] invalid config update received!\n");
635  break;
636  }
637 
638  } else if(*layer_4_enabled == 0 || *piNTS_ready == 0)
639  {
640  port_fsm = PORT_L4_RESET;
641  } else if(processed_FMC_listen_port != *piMMIO_FmcLsnPort)
642  { //process FMC port first!
643  port_fsm = PORT_NEW_FMC_REQ;
644  } else if (*layer_7_enabled == 0 || *role_decoupled == 1 )
645  {
646  port_fsm = PORT_L7_RESET;
647  } else {
648  // Role port requests
649  if(udp_rx_ports_processed != *pi_udp_rx_ports)
650  {
651  port_fsm = PORT_NEW_UDP_REQ;
652  }
653  else if(tcp_rx_ports_processed != *pi_tcp_rx_ports)
654  {
655  port_fsm = PORT_NEW_TCP_REQ;
656  }
657  }
658  break;
659  case PORT_L4_RESET:
660  if(!sPortUpdate.full()
661  && (processed_FMC_listen_port != 0 || udp_rx_ports_processed != 0 || tcp_rx_ports_processed !=0 )
662  )
663  {//first, notify
664  if(processed_FMC_listen_port != 0)
665  {
666  sPortUpdate.write(NalPortUpdate(FMC, 0));
667  processed_FMC_listen_port = 0;
668  }
669  else if(udp_rx_ports_processed != 0)
670  {
671  sPortUpdate.write(NalPortUpdate(UDP, 0));
672  udp_rx_ports_processed = 0;
673  }
674  else if(tcp_rx_ports_processed != 0)
675  {
676  sPortUpdate.write(NalPortUpdate(TCP, 0));
677  tcp_rx_ports_processed = 0;
678  }
679  }
680  else if(*layer_4_enabled == 1 && *piNTS_ready == 1)
681  {
682  //if layer 4 is reset, ports will be closed
683  //in all cases
684  processed_FMC_listen_port = 0x0;
685  udp_rx_ports_processed = 0x0;
686  tcp_rx_ports_processed = 0x0;
687  port_fsm = PORT_IDLE;
688  //no need for PORT_RESET (everything should still be "stable")
689  }
690  break;
691  case PORT_L7_RESET:
692  if(*layer_4_enabled == 1 && *piNTS_ready == 1)
693  {
694  if(udp_rx_ports_processed > 0)
695  {
696  port_fsm = PORT_START_UDP_CLS;
697  } else if(tcp_rx_ports_processed > 0)
698  {
699  //port_fsm = PORT_START_TCP_CLS_0;
700  port_fsm = PORT_START_TCP_CLS_1;
701  } else {
702  port_fsm = PORT_IDLE;
703  }
704  } else {
705  port_fsm = PORT_L4_RESET;
706  }
707  break;
708  case PORT_START_UDP_CLS:
709  if(!sUdpPortsToClose.full())
710  {
711 
712  //mark all UDP ports as to be deleted
713  ap_uint<16> newRelativePortToClose = 0;
714  ap_uint<16> newAbsolutePortToClose = 0;
715  if(udp_rx_ports_processed != 0)
716  {
717  newRelativePortToClose = getRightmostBitPos(udp_rx_ports_processed);
718  newAbsolutePortToClose = NAL_RX_MIN_PORT + newRelativePortToClose;
719  sUdpPortsToClose.write(newAbsolutePortToClose);
720  ap_uint<32> one_cold_closed_port = ~(((ap_uint<32>) 1) << (newRelativePortToClose));
721  udp_rx_ports_processed &= one_cold_closed_port;
722  printf("new UDP port ports to close: %#04x\n",(unsigned int) udp_rx_ports_processed);
723  }
724  if(udp_rx_ports_processed == 0)
725  {
726  current_port_update = NalPortUpdate(UDP, 0);
727  port_fsm = PORT_SEND_UPDATE;
728  }
729  }
730  break;
731  //case PORT_START_TCP_CLS_0:
732  //to close the open Role ports (not connections)
733  //TODO, add if TOE supports it
734  // break;
736  if(!sMarkToDel_unpriv.full())
737  {
738  sMarkToDel_unpriv.write(true);
739  if(*role_decoupled == 1)
740  {
741  port_fsm = PORT_WAIT_PR;
742  } else {
743  port_fsm = PORT_START_TCP_CLS_2;
744  }
745  }
746  break;
747  case PORT_WAIT_PR:
748  if(*role_decoupled == 0)
749  {
750  port_fsm = PORT_START_TCP_CLS_2;
751  }
752  break;
754  if(!sStartTclCls.full())
755  {
756  sStartTclCls.write(true);
757  tcp_rx_ports_processed = 0x0;
758  current_port_update = NalPortUpdate(TCP, 0);
759  port_fsm = PORT_SEND_UPDATE;
760  }
761  break;
762  case PORT_NEW_FMC_REQ:
763  //TODO: if processed_FMC_listen_port != 0, we should actually close it?
764  if(!sTcpPortsToOpen.full())
765  {
766  printf("Need FMC port request: %#02x\n",(unsigned int) *piMMIO_FmcLsnPort);
767  sTcpPortsToOpen.write(*piMMIO_FmcLsnPort);
768  current_requested_port = *piMMIO_FmcLsnPort;
769  port_fsm = PORT_NEW_FMC_REP;
770  }
771  break;
772  case PORT_NEW_FMC_REP:
773  if(!sTcpPortsOpenFeedback.empty())
774  {
775  bool fed = sTcpPortsOpenFeedback.read();
776  if(fed)
777  {
778  processed_FMC_listen_port = current_requested_port;
779  printf("FMC Port opened: %#03x\n",(int) processed_FMC_listen_port);
780  } else {
781  printf("[ERROR] FMC TCP port opening failed.\n");
782  //TODO: add block list for ports? otherwise we will try it again and again
783  }
784  current_port_update = NalPortUpdate(FMC, processed_FMC_listen_port);
785  port_fsm = PORT_SEND_UPDATE;
786  }
787  break;
788  case PORT_NEW_UDP_REQ:
789  if(!sUdpPortsToOpen.full())
790  {
791  ap_uint<32> tmp = udp_rx_ports_processed | *pi_udp_rx_ports;
792  ap_uint<32> diff = udp_rx_ports_processed ^ tmp;
793  //printf("rx_ports IN: %#04x\n",(int) *pi_udp_rx_ports);
794  //printf("udp_rx_ports_processed: %#04x\n",(int) udp_rx_ports_processed);
795  printf("UDP port diff: %#04x\n",(unsigned int) diff);
796  if(diff != 0)
797  {//we have to open new ports, one after another
798  new_relative_port_to_req_udp = getRightmostBitPos(diff);
799  UdpPort new_port_to_open = NAL_RX_MIN_PORT + new_relative_port_to_req_udp;
800  sUdpPortsToOpen.write(new_port_to_open);
801  port_fsm = PORT_NEW_UDP_REP;
802  } else {
803  udp_rx_ports_processed = *pi_udp_rx_ports;
804  port_fsm = PORT_IDLE;
805  }
806  }
807  break;
808  case PORT_NEW_UDP_REP:
809  if(!sUdpPortsOpenFeedback.empty())
810  {
811  bool fed = sUdpPortsOpenFeedback.read();
812  if(fed)
813  {
814  udp_rx_ports_processed |= ((ap_uint<32>) 1) << (new_relative_port_to_req_udp);
815  printf("new udp_rx_ports_processed: %#03x\n",(int) udp_rx_ports_processed);
816  } else {
817  printf("[ERROR] UDP port opening failed.\n");
818  //TODO: add block list for ports? otherwise we will try it again and again
819  }
820  //in all cases
821  current_port_update = NalPortUpdate(UDP, udp_rx_ports_processed);
822  port_fsm = PORT_SEND_UPDATE;
823  }
824  break;
825  case PORT_NEW_TCP_REQ:
826  if( !sTcpPortsToOpen.full() )
827  {
828  ap_uint<32> tmp = tcp_rx_ports_processed | *pi_tcp_rx_ports;
829  ap_uint<32> diff = tcp_rx_ports_processed ^ tmp;
830  //printf("rx_ports IN: %#04x\n",(int) *pi_tcp_rx_ports);
831  //printf("tcp_rx_ports_processed: %#04x\n",(int) tcp_rx_ports_processed);
832  printf("TCP port diff: %#04x\n",(unsigned int) diff);
833  if(diff != 0)
834  {//we have to open new ports, one after another
835  new_relative_port_to_req_tcp = getRightmostBitPos(diff);
836  TcpPort new_port = NAL_RX_MIN_PORT + new_relative_port_to_req_tcp;
837  sTcpPortsToOpen.write(new_port);
838  port_fsm = PORT_NEW_TCP_REP;
839  } else {
840  tcp_rx_ports_processed = *pi_tcp_rx_ports;
841  port_fsm = PORT_IDLE;
842  }
843  }
844  break;
845  case PORT_NEW_TCP_REP:
846  if(!sTcpPortsOpenFeedback.empty())
847  {
848  bool fed = sTcpPortsOpenFeedback.read();
849  if(fed)
850  {
851  tcp_rx_ports_processed |= ((ap_uint<32>) 1) << (new_relative_port_to_req_tcp);
852  printf("new tcp_rx_ports_processed: %#03x\n",(int) tcp_rx_ports_processed);
853  } else {
854  printf("[ERROR] TCP port opening failed.\n");
855  //TODO: add block list for ports? otherwise we will try it again and again
856  }
857  //in all cases
858  current_port_update = NalPortUpdate(TCP, tcp_rx_ports_processed);
859  port_fsm = PORT_SEND_UPDATE;
860  }
861  break;
862  case PORT_SEND_UPDATE:
863  if(!sPortUpdate.full())
864  {
865  sPortUpdate.write(current_port_update);
866  port_fsm = PORT_IDLE;
867  }
868  break;
869  }
870 }
871 
872 
873 
890  ap_uint<1> *layer_4_enabled,
891  ap_uint<1> *layer_7_enabled,
892  ap_uint<1> *role_decoupled,
893  ap_uint<1> *piNTS_ready,
894  stream<uint32_t> &mrt_version_update,
895  stream<bool> &inval_del_sig,
896  stream<bool> &cache_inval_0,
897  stream<bool> &cache_inval_1,
898  stream<bool> &cache_inval_2, //MUST be connected to TCP
899  stream<bool> &cache_inval_3 //MUST be connected to TCP
900  )
901 {
902  //-- DIRECTIVES FOR THIS PROCESS ------------------------------------------
903 #pragma HLS INLINE off
904 #pragma HLS pipeline II=1
905 
906  //-- STATIC CONTROL VARIABLES (with RESET) --------------------------------
907  static CacheInvalFsmStates cache_fsm = CACHE_WAIT_FOR_VALID;
908  static uint32_t mrt_version_current = 0;
909 
910 #pragma HLS RESET variable=cache_fsm
911 #pragma HLS RESET variable=mrt_version_current
912 
913  //-- STATIC DATAFLOW VARIABLES --------------------------------------------
914  static ap_uint<1> role_state;
915  //-- LOCAL DATAFLOW VARIABLES ---------------------------------------------
916 
917  //===========================================================
918 
919  switch (cache_fsm)
920  {
921  default:
923  if(*layer_4_enabled == 1 && *piNTS_ready == 1)
924  {
925  role_state = *role_decoupled;
926  cache_fsm = CACHE_VALID;
927  }
928  break;
929  case CACHE_VALID:
930  if(*layer_4_enabled == 0 || *piNTS_ready == 0 || *role_decoupled != role_state || *layer_7_enabled == 0)
931  {
932  if(*role_decoupled == 0 || *layer_4_enabled == 0 || *piNTS_ready == 0)
933  { //not layer_7_enabled == 0, since this would also be valid during PR
934  //role_decoupled == 0, if layer_7_enabled == 0 but no PR, so we invalidate the cache
935  //but wait until a PR is done
936 
937  //i.e. after a PR
938  cache_fsm = CACHE_INV_SEND_0;
939  printf("[pCacheInvalDetection] Detected cache invalidation condition!\n");
940  } else {
941  //not yet invalid
942  role_state = *role_decoupled;
943  }
944  } else if(!mrt_version_update.empty())
945  {
946  uint32_t tmp = mrt_version_update.read();
947  if(tmp != mrt_version_current)
948  {
949  mrt_version_current = tmp;
950  cache_fsm = CACHE_INV_SEND_0;
951  }
952  } else if(!inval_del_sig.empty())
953  {
954  bool sig = inval_del_sig.read();
955  if(sig)
956  {
957  cache_fsm = CACHE_INV_SEND_2;
958  //we only need to invalidate the Cache of the TCP processes
959  //(2 and 3)
960  }
961  }
962  break;
963  case CACHE_INV_SEND_0:
964  //UDP RX
965  if(!cache_inval_0.full())
966  {
967  cache_inval_0.write(true);
968  cache_fsm = CACHE_INV_SEND_1;
969  }
970  break;
971  case CACHE_INV_SEND_1:
972  //UDP TX
973  if(!cache_inval_1.full())
974  {
975  cache_inval_1.write(true);
976  cache_fsm = CACHE_INV_SEND_2;
977  }
978  break;
979  case CACHE_INV_SEND_2:
980  //TCP RDp
981  if(!cache_inval_2.full())
982  {
983  cache_inval_2.write(true);
984  cache_fsm = CACHE_INV_SEND_3;
985  }
986  break;
987  case CACHE_INV_SEND_3:
988  //TCP WRp
989  if(!cache_inval_3.full())
990  {
991  cache_inval_3.write(true);
992  cache_fsm = CACHE_WAIT_FOR_VALID;
993  }
994  break;
995  }
996 }
997 
998 
999 
1018  stream<SessionId> &sGetTripleFromSid_Req,
1019  stream<NalTriple> &sGetTripleFromSid_Rep,
1020  stream<NalTriple> &sGetSidFromTriple_Req,
1021  stream<SessionId> &sGetSidFromTriple_Rep,
1022  stream<NalNewTableEntry> &sAddNewTriple_TcpRrh,
1023  stream<NalNewTableEntry> &sAddNewTriple_TcpCon,
1024  stream<SessionId> &sDeleteEntryBySid,
1025  stream<bool> &inval_del_sig,
1026  stream<SessionId> &sMarkAsPriv,
1027  stream<bool> &sMarkToDel_unpriv,
1028  stream<bool> &sGetNextDelRow_Req,
1029  stream<SessionId> &sGetNextDelRow_Rep
1030  )
1031 {
1032  //-- DIRECTIVES FOR THIS PROCESS ------------------------------------------
1033 #pragma HLS INLINE off
1034 #pragma HLS pipeline II=1
1035 
1036  //-- STATIC CONTROL VARIABLES (with RESET) --------------------------------
1037  //static TableFsmStates agencyFsm = TAB_FSM_READ;
1038  static bool tables_initialized = false;
1039 
1040  //#pragma HLS RESET variable=agencyFsm
1041 #pragma HLS RESET variable=tables_initialized
1042  //-- STATIC DATAFLOW VARIABLES --------------------------------------------
1043  static NalTriple tripleList[MAX_NAL_SESSIONS];
1044  static SessionId sessionIdList[MAX_NAL_SESSIONS];
1045  static ap_uint<1> usedRows[MAX_NAL_SESSIONS];
1046  static ap_uint<1> rowsToDelete[MAX_NAL_SESSIONS];
1047  static ap_uint<1> privilegedRows[MAX_NAL_SESSIONS];
1048 
1049 #pragma HLS ARRAY_PARTITION variable=tripleList complete dim=1
1050 #pragma HLS ARRAY_PARTITION variable=sessionIdList complete dim=1
1051 #pragma HLS ARRAY_PARTITION variable=usedRows complete dim=1
1052 #pragma HLS ARRAY_PARTITION variable=rowsToDelete complete dim=1
1053 #pragma HLS ARRAY_PARTITION variable=privilegedRows complete dim=1
1054 
1055  //-- LOCAL DATAFLOW VARIABLES ---------------------------------------------
1056 
1057 
1058  if (!tables_initialized)
1059  {
1060  printf("init tables...\n");
1061  for(int i = 0; i<MAX_NAL_SESSIONS; i++)
1062  {
1063  //#pragma HLS unroll
1064  sessionIdList[i] = 0;
1065  tripleList[i] = 0;
1066  usedRows[i] = 0;
1067  rowsToDelete[i] = 0;
1068  privilegedRows[i] = 0;
1069  }
1070  tables_initialized = true;
1071  } else {
1072 
1073  //switch(agencyFsm)
1074  //{
1075  //case TAB_FSM_READ:
1076  if(!sGetTripleFromSid_Req.empty() && !sGetTripleFromSid_Rep.full())
1077  {
1078  SessionId sessionID = sGetTripleFromSid_Req.read();
1079  printf("searching for session: %d\n", (int) sessionID);
1080  uint32_t i = 0;
1082  bool found_smth = false;
1083  for(i = 0; i < MAX_NAL_SESSIONS; i++)
1084  {
1085  //#pragma HLS unroll factor=8
1086  if(sessionIdList[i] == sessionID && usedRows[i] == 1 && rowsToDelete[i] == 0)
1087  {
1088  ret = tripleList[i];
1089  printf("found triple entry: %d | %d | %llu\n",(int) i, (int) sessionID, (unsigned long long) ret);
1090  found_smth = true;
1091  break;
1092  }
1093  }
1094  if(!found_smth)
1095  {
1096  //unkown session TODO
1097  printf("[TcpAgency:INFO] Unknown session requested\n");
1098  }
1099  sGetTripleFromSid_Rep.write(ret);
1100  } else if(!sGetSidFromTriple_Req.empty() && !sGetSidFromTriple_Rep.full())
1101  {
1102  NalTriple triple = sGetSidFromTriple_Req.read();
1103  printf("Searching for triple: %llu\n", (unsigned long long) triple);
1104  uint32_t i = 0;
1106  bool found_smth = false;
1107  for(i = 0; i < MAX_NAL_SESSIONS; i++)
1108  {
1109  //#pragma HLS unroll factor=8
1110  if(tripleList[i] == triple && usedRows[i] == 1 && rowsToDelete[i] == 0)
1111  {
1112  ret = sessionIdList[i];
1113  found_smth = true;
1114  break;
1115  }
1116  }
1117  if(!found_smth)
1118  {
1119  //there is (not yet) a connection TODO
1120  printf("[TcpAgency:INFO] Unknown triple requested\n");
1121  }
1122  sGetSidFromTriple_Rep.write(ret);
1123  } else
1124  // agencyFsm = TAB_FSM_WRITE;
1125  // break;
1126  //case TAB_FSM_WRITE:
1127  if(!sAddNewTriple_TcpRrh.empty() || !sAddNewTriple_TcpCon.empty())
1128  {
1129  NalNewTableEntry ne_struct;
1130  if(!sAddNewTriple_TcpRrh.empty())
1131  {
1132  ne_struct = sAddNewTriple_TcpRrh.read();
1133  } else {
1134  ne_struct = sAddNewTriple_TcpCon.read();
1135  }
1136  SessionId sessionID = ne_struct.sessId;
1137  NalTriple new_entry = ne_struct.new_triple;
1138  printf("new tripple entry: %d | %llu\n",(int) sessionID, (unsigned long long) new_entry);
1139  //first check for duplicates!
1140  //ap_uint<64> test_tripple = getTrippleFromSessionId(sessionID);
1141  uint32_t i = 0;
1143  bool found_smth = false;
1144  for(i = 0; i < MAX_NAL_SESSIONS; i++)
1145  {
1146  //#pragma HLS unroll factor=8
1147  if(sessionIdList[i] == sessionID && usedRows[i] == 1 && rowsToDelete[i] == 0)
1148  {
1149  ret = tripleList[i];
1150  printf("found triple entry: %d | %d | %llu\n",(int) i, (int) sessionID, (unsigned long long) ret);
1151  found_smth = true;
1152  break;
1153  }
1154  }
1155  if(found_smth)
1156  {
1157  printf("session/triple already known, skipping. \n");
1158  //break; no break, because other may want to run too
1159  } else {
1160  bool stored = false;
1161  uint32_t i = 0;
1162  for(i = 0; i < MAX_NAL_SESSIONS; i++)
1163  {
1164  //#pragma HLS unroll factor=8
1165  if(usedRows[i] == 0)
1166  {//next free one, tables stay in sync
1167  sessionIdList[i] = sessionID;
1168  tripleList[i] = new_entry;
1169  usedRows[i] = 1;
1170  privilegedRows[i] = 0;
1171  printf("stored triple entry: %d | %d | %llu\n",(int) i, (int) sessionID, (unsigned long long) new_entry);
1172  stored = true;
1173  break;
1174  }
1175  }
1176  if(!stored)
1177  {
1178  //we run out of sessions... TODO
1179  //actually, should not happen, since we have same table size as TOE
1180  printf("[TcpAgency:ERROR] no free space left in table!\n");
1181  }
1182  }
1183  } else if(!sDeleteEntryBySid.empty() && !inval_del_sig.full())
1184  {
1185  SessionId sessionID = sDeleteEntryBySid.read();
1186  printf("try to delete session: %d\n", (int) sessionID);
1187  for(uint32_t i = 0; i < MAX_NAL_SESSIONS; i++)
1188  {
1189  //#pragma HLS unroll factor=8
1190  if(sessionIdList[i] == sessionID && usedRows[i] == 1)
1191  {
1192  usedRows[i] = 0;
1193  privilegedRows[i] = 0;
1194  printf("found and deleting session: %d\n", (int) sessionID);
1195  //notify cache invalidation
1196  inval_del_sig.write(true);
1197  break;
1198  }
1199  }
1200  //nothing to delete, nothing to do...
1201  } else if(!sMarkAsPriv.empty())
1202  {
1203  SessionId sessionID = sMarkAsPriv.read();
1204  printf("mark session as privileged: %d\n", (int) sessionID);
1205  for(uint32_t i = 0; i < MAX_NAL_SESSIONS; i++)
1206  {
1207  //#pragma HLS unroll factor=8
1208  if(sessionIdList[i] == sessionID && usedRows[i] == 1)
1209  {
1210  privilegedRows[i] = 1;
1211  rowsToDelete[i] = 0;
1212  return;
1213  }
1214  }
1215  //nothing found, nothing to do...
1216  } else if(!sMarkToDel_unpriv.empty())
1217  {
1218  if(sMarkToDel_unpriv.read())
1219  {
1220  for(uint32_t i = 0; i< MAX_NAL_SESSIONS; i++)
1221  {
1222  //#pragma HLS unroll factor=8
1223  if(privilegedRows[i] == 1)
1224  {
1225  continue;
1226  } else {
1227  rowsToDelete[i] = usedRows[i];
1228  }
1229  }
1230  }
1231  } else if(!sGetNextDelRow_Req.empty() && !sGetNextDelRow_Rep.full())
1232  {
1233  if(sGetNextDelRow_Req.read())
1234  {
1236  bool found_smth = false;
1237  for(uint32_t i = 0; i< MAX_NAL_SESSIONS; i++)
1238  {
1239  //#pragma HLS unroll factor=8
1240  if(rowsToDelete[i] == 1)
1241  {
1242  ret = sessionIdList[i];
1243  //sessionIdList[i] = 0x0; //not necessary
1244  //tripleList[i] = 0x0;
1245  usedRows[i] = 0;
1246  rowsToDelete[i] = 0;
1247  //privilegedRows[i] = 0; //not necessary
1248  printf("Closing session %d at table row %d.\n",(int) ret, (int) i);
1249  found_smth = true;
1250  break;
1251  }
1252  }
1253  if(!found_smth)
1254  {
1255  //Tables are empty
1256  printf("TCP tables are empty\n");
1257  }
1258  sGetNextDelRow_Rep.write(ret);
1259  }
1260  }
1261  //agencyFsm = TAB_FSM_READ;
1262  //break;
1263  //} //switch
1264  } // else
1265 }
1266 
1267 
ap_uint< 1 > layer_7_enabled
Definition: tb_fmc.cpp:68
ap_uint< 1 > layer_4_enabled
Definition: tb_fmc.cpp:66
bool tables_initialized
Definition: fmc.cpp:156
#define UNUSED_SESSION_ENTRY_VALUE
Definition: nal.hpp:202
#define NUMBER_CONFIG_WORDS
Definition: nal.hpp:191
ConfigBcastStates
Definition: nal.hpp:172
uint8_t selectConfigUpdatePropagation(uint16_t config_addr)
Definition: hss.cpp:45
void axi4liteProcessing(ap_uint< 32 > ctrlLink[64+16+16], stream< NalConfigUpdate > &sToPortLogic, stream< NalConfigUpdate > &sToUdpRx, stream< NalConfigUpdate > &sToTcpRx, stream< NalConfigUpdate > &sToStatusProc, stream< NalMrtUpdate > &sMrtUpdate, stream< uint32_t > &mrt_version_update_0, stream< uint32_t > &mrt_version_update_1, stream< NalStatusUpdate > &sStatusUpdate)
Contains the Axi4 Lite secondary endpoint and reads the MRT and configuration values from it as well ...
Definition: hss.cpp:79
AxiLiteFsmStates
Definition: nal.hpp:168
#define NUMBER_STATUS_WORDS
Definition: nal.hpp:192
#define NAL_CONFIG_SAVED_FMC_PORTS
Definition: nal.hpp:219
void pCacheInvalDetection(ap_uint< 1 > *layer_4_enabled, ap_uint< 1 > *layer_7_enabled, ap_uint< 1 > *role_decoupled, ap_uint< 1 > *piNTS_ready, stream< uint32_t > &mrt_version_update, stream< bool > &inval_del_sig, stream< bool > &cache_inval_0, stream< bool > &cache_inval_1, stream< bool > &cache_inval_2, stream< bool > &cache_inval_3)
Detects if the caches of the USS and TSS have to be invalidated and signals this to the concerned pro...
Definition: hss.cpp:889
#define UNUSED_TABLE_ENTRY_VALUE
Definition: nal.hpp:201
#define NAL_CONFIG_SAVED_TCP_PORTS
Definition: nal.hpp:218
void pTcpAgency(stream< SessionId > &sGetTripleFromSid_Req, stream< NalTriple > &sGetTripleFromSid_Rep, stream< NalTriple > &sGetSidFromTriple_Req, stream< SessionId > &sGetSidFromTriple_Rep, stream< NalNewTableEntry > &sAddNewTriple_TcpRrh, stream< NalNewTableEntry > &sAddNewTriple_TcpCon, stream< SessionId > &sDeleteEntryBySid, stream< bool > &inval_del_sig, stream< SessionId > &sMarkAsPriv, stream< bool > &sMarkToDel_unpriv, stream< bool > &sGetNextDelRow_Req, stream< SessionId > &sGetNextDelRow_Rep)
Contains the SessionId-Triple CAM for TCP sessions. It replies to stram requests.
Definition: hss.cpp:1017
#define MAX_MRT_SIZE
Definition: nal.hpp:94
ap_uint< 64 > NalTriple
Definition: nal.hpp:273
#define NAL_MMIO_STABILIZE_TIME
Definition: nal.hpp:199
CacheInvalFsmStates
Definition: nal.hpp:160
#define NAL_CONFIG_SAVED_UDP_PORTS
Definition: nal.hpp:217
PortFsmStates
Definition: nal.hpp:175
ap_uint< 32 > getRightmostBitPos(ap_uint< 32 > num)
Definition: nal.cpp:43
ap_uint< 1 > role_decoupled
Definition: tb_nal.cpp:134
#define NAL_CONFIG_MRT_VERSION
Definition: nal.hpp:216
#define NAL_CONFIG_OWN_RANK
Definition: nal.hpp:215
ap_uint< 16 > UdpPort
Definition: nal.hpp:249
ap_uint< 32 > ctrlLink[64+16+16]
Definition: tb_nal.cpp:137
void pMrtAgency(stream< NalMrtUpdate > &sMrtUpdate, stream< NodeId > &sGetIpReq_UdpTx, stream< Ip4Addr > &sGetIpRep_UdpTx, stream< NodeId > &sGetIpReq_TcpTx, stream< Ip4Addr > &sGetIpRep_TcpTx, stream< Ip4Addr > &sGetNidReq_UdpRx, stream< NodeId > &sGetNidRep_UdpRx, stream< Ip4Addr > &sGetNidReq_TcpRx, stream< NodeId > &sGetNidRep_TcpRx)
Can access the BRAM that contains the MRT and replies to lookup requests.
Definition: hss.cpp:386
#define MAX_NAL_SESSIONS
Definition: nal.hpp:186
void pPortLogic(ap_uint< 1 > *layer_4_enabled, ap_uint< 1 > *layer_7_enabled, ap_uint< 1 > *role_decoupled, ap_uint< 1 > *piNTS_ready, ap_uint< 16 > *piMMIO_FmcLsnPort, ap_uint< 32 > *pi_udp_rx_ports, ap_uint< 32 > *pi_tcp_rx_ports, stream< NalConfigUpdate > &sConfigUpdate, stream< UdpPort > &sUdpPortsToOpen, stream< UdpPort > &sUdpPortsToClose, stream< TcpPort > &sTcpPortsToOpen, stream< bool > &sUdpPortsOpenFeedback, stream< bool > &sTcpPortsOpenFeedback, stream< bool > &sMarkToDel_unpriv, stream< NalPortUpdate > &sPortUpdate, stream< bool > &sStartTclCls)
Translates the one-hot encoded open-port vectors from the Role (i.e. piUdpRxPorts and piTcpRxPorts) t...
Definition: hss.cpp:545
#define INVALID_MRT_VALUE
Definition: nal.hpp:203
@ CB_3_1
Definition: nal.hpp:172
@ CB_START
Definition: nal.hpp:172
@ CB_3_0
Definition: nal.hpp:172
@ CB_3_2
Definition: nal.hpp:172
@ CB_1
Definition: nal.hpp:172
@ CB_WAIT
Definition: nal.hpp:172
@ CB_2
Definition: nal.hpp:172
@ A4L_COPY_MRT
Definition: nal.hpp:170
@ A4L_COPY_STATUS
Definition: nal.hpp:170
@ A4L_WAIT_FOR_SUB_FSMS
Definition: nal.hpp:170
@ A4L_STATUS_UPDATE
Definition: nal.hpp:168
@ A4L_COPY_CONFIG_2
Definition: nal.hpp:168
@ A4L_COPY_CONFIG
Definition: nal.hpp:168
@ A4L_COPY_FINISH
Definition: nal.hpp:170
@ TCP
Definition: nal.hpp:179
@ UDP
Definition: nal.hpp:179
@ FMC
Definition: nal.hpp:179
@ CACHE_INV_SEND_1
Definition: nal.hpp:160
@ CACHE_INV_SEND_3
Definition: nal.hpp:160
@ CACHE_VALID
Definition: nal.hpp:160
@ CACHE_INV_SEND_2
Definition: nal.hpp:160
@ CACHE_INV_SEND_0
Definition: nal.hpp:160
@ CACHE_WAIT_FOR_VALID
Definition: nal.hpp:160
@ PORT_NEW_UDP_REP
Definition: nal.hpp:175
@ PORT_START_UDP_CLS
Definition: nal.hpp:177
@ PORT_L7_RESET
Definition: nal.hpp:176
@ PORT_START_TCP_CLS_1
Definition: nal.hpp:177
@ PORT_WAIT_PR
Definition: nal.hpp:177
@ PORT_START_TCP_CLS_2
Definition: nal.hpp:177
@ PORT_NEW_FMC_REP
Definition: nal.hpp:176
@ PORT_NEW_TCP_REP
Definition: nal.hpp:176
@ PORT_NEW_UDP_REQ
Definition: nal.hpp:175
@ PORT_SEND_UPDATE
Definition: nal.hpp:177
@ PORT_RESET
Definition: nal.hpp:175
@ PORT_NEW_FMC_REQ
Definition: nal.hpp:176
@ PORT_L4_RESET
Definition: nal.hpp:175
@ PORT_IDLE
Definition: nal.hpp:175
@ PORT_NEW_TCP_REQ
Definition: nal.hpp:176
ap_uint< 16 > SessionId
Definition: nts_types.hpp:136
ap_uint< 32 > Ip4Addr
Definition: AxisIp4.hpp:169
ap_uint< 16 > TcpPort
Definition: AxisTcp.hpp:105
: The cloudFPGA Network Abstraction Layer (NAL) between NTS and ROlE. The NAL core manages the NTS St...
ap_uint< 8 > NodeId
Definition: network.hpp:82
#define NAL_RX_MIN_PORT
Definition: network.hpp:89
ap_uint< 16 > config_addr
Definition: nal.hpp:291
ap_uint< 32 > update_value
Definition: nal.hpp:292
Ip4Addr ip4a
Definition: nal.hpp:299
NodeId nid
Definition: nal.hpp:298
NalTriple new_triple
Definition: nal.hpp:276
SessionId sessId
Definition: nal.hpp:277
ap_uint< 16 > status_addr
Definition: nal.hpp:305
ap_uint< 32 > new_value
Definition: nal.hpp:306
: The UDP Sub System (USS) of the NAL core.