45 #pragma HLS INLINE off
46 ap_uint<32> one_hot = num & -num;
48 for (
int i = 0; i < 32; i++)
65 NalTriple new_entry = (((ap_uint<64>) ipRemoteAddres) << 32) | (((ap_uint<32>) tcpRemotePort) << 16) | tcpLocalPort;
73 ap_uint<32>
ret = ((ap_uint<32>) (triple >> 32)) & 0xFFFFFFFF;
81 ap_uint<16>
ret = ((ap_uint<16>) (triple >> 16)) & 0xFFFF;
89 ap_uint<16>
ret = (ap_uint<16>) (triple & 0xFFFF);
136 switch (currWord.
tkeep) {
181 stream<NalEventNotif> &internal_event_fifo,
184 stream<NalConfigUpdate> &sConfigUpdate,
185 stream<uint32_t> &mrt_version_update,
186 stream<NalPortUpdate> &sNalPortUpdate,
187 stream<NalStatusUpdate> &sStatusUpdate
191 #pragma HLS INLINE off
192 #pragma HLS pipeline II=1
194 static ap_uint<32> node_id_missmatch_RX_cnt = 0;
195 static NodeId last_rx_node_id = 0;
196 static NrcPort last_rx_port = 0;
197 static ap_uint<32> node_id_missmatch_TX_cnt = 0;
198 static NodeId last_tx_node_id = 0;
199 static NrcPort last_tx_port = 0;
200 static ap_uint<16> port_corrections_TX_cnt = 0;
201 static ap_uint<32> unauthorized_access_cnt = 0;
202 static ap_uint<32> authorized_access_cnt = 0;
203 static ap_uint<32> fmc_tcp_bytes_cnt = 0;
205 static ap_uint<32> packet_count_RX = 0;
206 static ap_uint<32> packet_count_TX = 0;
207 static NodeId own_rank = 0;
209 static ap_uint<16> tcp_new_connection_failure_cnt = 0;
213 static uint8_t status_update_i = 0;
215 #pragma HLS reset variable=node_id_missmatch_RX_cnt
216 #pragma HLS reset variable=node_id_missmatch_TX_cnt
217 #pragma HLS reset variable=port_corrections_TX_cnt
218 #pragma HLS reset variable=packet_count_RX
219 #pragma HLS reset variable=packet_count_TX
220 #pragma HLS reset variable=last_rx_node_id
221 #pragma HLS reset variable=last_rx_port
222 #pragma HLS reset variable=last_tx_node_id
223 #pragma HLS reset variable=last_tx_port
224 #pragma HLS reset variable=unauthorized_access_cnt
225 #pragma HLS reset variable=authorized_access_cnt
226 #pragma HLS reset variable=fmc_tcp_bytes_cnt
227 #pragma HLS reset variable=tcp_new_connection_failure_cnt
228 #pragma HLS reset variable=tables_initialized
229 #pragma HLS reset variable=status_update_i
230 #pragma HLS reset variable=own_rank
237 #pragma HLS ARRAY_PARTITION variable=status complete dim=1
238 #pragma HLS ARRAY_PARTITION variable=old_status complete dim=1
250 && (packet_count_TX > 0 || packet_count_RX > 0 )
254 packet_count_TX = 0x0;
255 packet_count_RX = 0x0;
257 last_rx_node_id = 0x0;
259 last_tx_node_id = 0x0;
260 }
else if(!sConfigUpdate.empty())
268 }
else if(!mrt_version_update.empty())
279 else if(!sNalPortUpdate.empty())
295 else if(!internal_event_fifo.empty())
310 port_corrections_TX_cnt += (ap_uint<16>) nevs.
update_value;
313 tcp_new_connection_failure_cnt += (ap_uint<16>) nevs.
update_value;
343 printf(
"[ERROR] Internal Event Processing received invalid event %d with update value %d\n", \
370 status[
NAL_STATUS_RX_NODEID_ERROR] = (((ap_uint<32>) port_corrections_TX_cnt) << 16) | ( 0xFFFF & ((ap_uint<16>) node_id_missmatch_RX_cnt));
373 status[
NAL_STATUS_TX_NODEID_ERROR] = (((ap_uint<32>) tcp_new_connection_failure_cnt) << 16) | ( 0xFFFF & ((ap_uint<16>) node_id_missmatch_TX_cnt));
384 if(!sStatusUpdate.full())
386 if(old_status[status_update_i] != status[status_update_i])
388 ap_uint<32> uv = status[status_update_i];
390 sStatusUpdate.write(su);
391 old_status[status_update_i] = status[status_update_i];
413 stream<NalEventNotif> &internal_event_fifo_0,
414 stream<NalEventNotif> &internal_event_fifo_1,
415 stream<NalEventNotif> &internal_event_fifo_2,
416 stream<NalEventNotif> &internal_event_fifo_3,
417 stream<NalEventNotif> &merged_fifo
421 #pragma HLS INLINE off
422 #pragma HLS pipeline II=1
429 if(!internal_event_fifo_0.empty() && !merged_fifo.full())
432 printf(
"[INFO] Internal Event Processing received event %d with update value %d from fifo_0\n", \
433 (
int)
tmp.type, (
int)
tmp.update_value);
434 merged_fifo.write(
tmp);
436 else if(!internal_event_fifo_1.empty() && !merged_fifo.full() )
439 printf(
"[INFO] Internal Event Processing received event %d with update value %d from fifo_1\n", \
440 (
int)
tmp.type, (
int)
tmp.update_value);
441 merged_fifo.write(
tmp);
443 else if(!internal_event_fifo_2.empty() && !merged_fifo.full())
446 printf(
"[INFO] Internal Event Processing received event %d with update value %d from fifo_2\n", \
447 (
int)
tmp.type, (
int)
tmp.update_value);
448 merged_fifo.write(
tmp);
450 else if(!internal_event_fifo_3.empty() && !merged_fifo.full())
453 printf(
"[INFO] Internal Event Processing received event %d with update value %d from fifo_3\n", \
454 (
int)
tmp.type, (
int)
tmp.update_value);
455 merged_fifo.write(
tmp);
472 ap_uint<1> *piNTS_ready,
474 ap_uint<16> *piMMIO_FmcLsnPort,
475 ap_uint<32> *piMMIO_CfrmIp4Addr,
480 ap_uint<32> *pi_udp_rx_ports,
481 stream<NetworkWord> &siUdp_data,
482 stream<NetworkWord> &soUdp_data,
487 ap_uint<32> *pi_tcp_rx_ports,
488 stream<NetworkWord> &siTcp_data,
489 stream<NetworkMetaStream> &siTcp_meta,
490 stream<NetworkWord> &soTcp_data,
491 stream<NetworkMetaStream> &soTcp_meta,
494 stream<NetworkWord> &siFMC_data,
495 stream<TcpSessId> &siFMC_SessId,
496 stream<NetworkWord> &soFMC_data,
497 stream<TcpSessId> &soFMC_SessId,
500 stream<UdpPort> &soUOE_LsnReq,
501 stream<StsBool> &siUOE_LsnRep,
502 stream<UdpPort> &soUOE_ClsReq,
503 stream<StsBool> &siUOE_ClsRep,
506 stream<UdpAppData> &siUOE_Data,
507 stream<UdpAppMeta> &siUOE_Meta,
508 stream<UdpAppDLen> &siUOE_DLen,
511 stream<UdpAppData> &soUOE_Data,
512 stream<UdpAppMeta> &soUOE_Meta,
513 stream<UdpAppDLen> &soUOE_DLen,
516 stream<TcpAppNotif> &siTOE_Notif,
517 stream<TcpAppRdReq> &soTOE_DReq,
518 stream<TcpAppData> &siTOE_Data,
519 stream<TcpAppMeta> &siTOE_SessId,
521 stream<TcpAppLsnReq> &soTOE_LsnReq,
522 stream<TcpAppLsnRep> &siTOE_LsnRep,
524 stream<TcpAppData> &soTOE_Data,
525 stream<TcpAppSndReq> &soTOE_SndReq,
526 stream<TcpAppSndRep> &siTOE_SndRep,
528 stream<TcpAppOpnReq> &soTOE_OpnReq,
529 stream<TcpAppOpnRep> &siTOE_OpnRep,
531 stream<TcpAppClsReq> &soTOE_ClsReq
536 #pragma HLS INTERFACE s_axilite depth=512 port=ctrlLink bundle=piFMC_NAL_ctrlLink_AXI
538 #pragma HLS INTERFACE axis register both port=siUdp_data
539 #pragma HLS INTERFACE axis register both port=soUdp_data
541 #pragma HLS INTERFACE axis register both port=siUdp_meta
542 #pragma HLS INTERFACE axis register both port=soUdp_meta
544 #pragma HLS INTERFACE axis register both port=soUOE_LsnReq
545 #pragma HLS INTERFACE axis register both port=siUOE_LsnRep
546 #pragma HLS INTERFACE axis register both port=soUOE_ClsReq
547 #pragma HLS INTERFACE axis register both port=siUOE_ClsRep
549 #pragma HLS INTERFACE axis register both port=siUOE_Data
550 #pragma HLS INTERFACE axis register both port=siUOE_Meta
551 #pragma HLS DATA_PACK variable=siUOE_Meta
552 #pragma HLS INTERFACE axis register both port=siUOE_DLen
554 #pragma HLS INTERFACE axis register both port=soUOE_Data
555 #pragma HLS INTERFACE axis register both port=soUOE_Meta
556 #pragma HLS DATA_PACK variable=soUOE_Meta
557 #pragma HLS INTERFACE axis register both port=soUOE_DLen
559 #pragma HLS INTERFACE axis register both port=siTcp_data
560 #pragma HLS INTERFACE axis register both port=soTcp_data
561 #pragma HLS INTERFACE axis register both port=siTcp_meta
562 #pragma HLS INTERFACE axis register both port=soTcp_meta
564 #pragma HLS INTERFACE axis register both port=siTOE_Notif
565 #pragma HLS DATA_PACK variable=siTOE_Notif
566 #pragma HLS INTERFACE axis register both port=soTOE_DReq
567 #pragma HLS DATA_PACK variable=soTOE_DReq
568 #pragma HLS INTERFACE axis register both port=siTOE_Data
569 #pragma HLS INTERFACE axis register both port=siTOE_SessId
571 #pragma HLS INTERFACE axis register both port=soTOE_LsnReq
572 #pragma HLS INTERFACE axis register both port=siTOE_LsnRep
574 #pragma HLS INTERFACE axis register both port=soTOE_Data
575 #pragma HLS INTERFACE axis register both port=soTOE_SndReq
576 #pragma HLS DATA_PACK variable=soTOE_SndReq
577 #pragma HLS INTERFACe axis register both port=siTOE_SndRep
578 #pragma HLS DATA_PACK variable=siTOE_SndRep
580 #pragma HLS INTERFACE axis register both port=soTOE_OpnReq
581 #pragma HLS DATA_PACK variable=soTOE_OpnReq
582 #pragma HLS INTERFACE axis register both port=siTOE_OpnRep
583 #pragma HLS DATA_PACK variable=siTOE_OpnRep
585 #pragma HLS INTERFACE axis register both port=soTOE_ClsReq
589 #pragma HLS INTERFACE ap_ctrl_none port=return
591 #pragma HLS INTERFACE ap_vld register port=layer_4_enabled name=piLayer4enabled
592 #pragma HLS INTERFACE ap_vld register port=layer_7_enabled name=piLayer7enabled
593 #pragma HLS INTERFACE ap_vld register port=role_decoupled name=piRoleDecoup_active
594 #pragma HLS INTERFACE ap_vld register port=piNTS_ready name=piNTS_ready
596 #pragma HLS INTERFACE ap_vld register port=myIpAddress name=piMyIpAddress
597 #pragma HLS INTERFACE ap_vld register port=pi_udp_rx_ports name=piROL_Udp_Rx_ports
598 #pragma HLS INTERFACE ap_vld register port=piMMIO_FmcLsnPort name=piMMIO_FmcLsnPort
599 #pragma HLS INTERFACE ap_vld register port=piMMIO_CfrmIp4Addr name=piMMIO_CfrmIp4Addr
601 #pragma HLS INTERFACE ap_vld register port=pi_tcp_rx_ports name=piROL_Tcp_Rx_ports
603 #pragma HLS INTERFACE ap_fifo port=siFMC_data
604 #pragma HLS INTERFACE ap_fifo port=soFMC_data
605 #pragma HLS INTERFACE ap_fifo port=siFMC_SessId
606 #pragma HLS INTERFACE ap_fifo port=soFMC_SessId
615 static stream<NalEventNotif> internal_event_fifo_0 (
"internal_event_fifo_0");
616 static stream<NalEventNotif> internal_event_fifo_1 (
"internal_event_fifo_1");
617 static stream<NalEventNotif> internal_event_fifo_2 (
"internal_event_fifo_2");
618 static stream<NalEventNotif> internal_event_fifo_3 (
"internal_event_fifo_3");
619 static stream<NalEventNotif> merged_fifo (
"sEvent_Merged_Fifo");
621 static stream<NalConfigUpdate> sA4lToPortLogic (
"sA4lToPortLogic");
622 static stream<NalConfigUpdate> sA4lToUdpRx (
"sA4lToUdpRx");
623 static stream<NalConfigUpdate> sA4lToTcpRx (
"sA4lToTcpRx");
624 static stream<NalConfigUpdate> sA4lToStatusProc (
"sA4lToStatusProc");
625 static stream<NalMrtUpdate> sA4lMrtUpdate (
"sA4lMrtUpdate");
626 static stream<NalStatusUpdate> sStatusUpdate (
"sStatusUpdate");
627 static stream<NodeId> sGetIpReq_UdpTx (
"sGetIpReq_UdpTx");
628 static stream<Ip4Addr> sGetIpRep_UdpTx (
"sGetIpRep_UdpTx");
629 static stream<NodeId> sGetIpReq_TcpTx (
"sGetIpReq_TcpTx");
630 static stream<Ip4Addr> sGetIpRep_TcpTx (
"sGetIpRep_TcpTx");
631 static stream<Ip4Addr> sGetNidReq_UdpRx (
"sGetNidReq_UdpRx");
632 static stream<NodeId> sGetNidRep_UdpRx (
"sGetNidRep_UdpRx");
633 static stream<Ip4Addr> sGetNidReq_TcpRx (
"sGetNidReq_TcpRx");
634 static stream<NodeId> sGetNidRep_TcpRx (
"sGetNidRep_TcpRx");
635 static stream<Ip4Addr> sGetNidReq_TcpTx (
"sGetNidReq_TcpTx");
636 static stream<NodeId> sGetNidRep_TcpTx (
"sGetNidRep_TcpTx");
638 static stream<UdpPort> sUdpPortsToClose (
"sUdpPortsToClose");
639 static stream<UdpPort> sUdpPortsToOpen (
"sUdpPortsToOpen");
640 static stream<TcpPort> sTcpPortsToOpen (
"sTcpPortsToOpen");
641 static stream<bool> sUdpPortsOpenFeedback (
"sUdpPortsOpenFeedback");
642 static stream<bool> sTcpPortsOpenFeedback (
"sTcpPortsOpenFeedback");
645 static stream<NetworkWord> sRoleTcpDataRx_buffer (
"sRoleTcpDataRx_buffer");
646 static stream<NetworkMetaStream> sRoleTcpMetaRx_buffer (
"sRoleTcpMetaRx_buffer");
647 static stream<TcpAppData> sTcpWrp2Wbu_data (
"sTcpWrp2Wbu_data");
648 static stream<TcpAppMeta> sTcpWrp2Wbu_sessId (
"sTcpWrp2Wbu_sessId");
649 static stream<TcpDatLen> sTcpWrp2Wbu_len (
"sTcpWrp2Wbu_len");
651 static stream<SessionId> sGetTripleFromSid_Req (
"sGetTripleFromSid_Req");
652 static stream<NalTriple> sGetTripleFromSid_Rep (
"sGetTripleFromSid_Rep");
653 static stream<NalTriple> sGetSidFromTriple_Req (
"sGetSidFromTriple_Req");
654 static stream<SessionId> sGetSidFromTriple_Rep (
"sGetSidFromTriple_Rep");
655 static stream<NalNewTableEntry> sAddNewTriple_TcpRrh (
"sAddNewTriple_TcpRrh");
656 static stream<NalNewTableEntry> sAddNewTriple_TcpCon (
"sAddNewTriple_TcpCon");
657 static stream<SessionId> sDeleteEntryBySid (
"sDeleteEntryBySid");
658 static stream<SessionId> sMarkAsPriv (
"sMarkAsPriv");
659 static stream<bool> sMarkToDel_unpriv (
"sMarkToDel_unpriv");
660 static stream<bool> sGetNextDelRow_Req (
"sGetNextDelRow_Req");
661 static stream<SessionId> sGetNextDelRow_Rep (
"sGetNextDelRow_Rep");
662 static stream<TcpAppRdReq> sRDp_ReqNotif (
"sRDp_ReqNotif");
664 static stream<NalTriple> sNewTcpCon_Req (
"sNewTcpCon_Req");
665 static stream<NalNewTcpConRep> sNewTcpCon_Rep (
"sNewTcpConRep");
666 static stream<TcpAppNotif> sTcpNotif_buffer (
"sTcpNotif_buffer");
670 static stream<uint32_t> sMrtVersionUpdate_0 (
"sMrtVersionUpdate_0");
671 static stream<uint32_t> sMrtVersionUpdate_1 (
"sMrtVersionUpdate_1");
673 static stream<bool> sCacheInvalSig_0 (
"sCacheInvalSig_0");
674 static stream<bool> sCacheInvalSig_1 (
"sCacheInvalSig_1");
675 static stream<bool> sCacheInvalSig_2 (
"sCacheInvalSig_2");
676 static stream<bool> sCacheInvalSig_3 (
"sCacheInvalSig_3");
678 static stream<PacketLen> sRoleFifoEmptySig (
"sRoleFifoEmptySig");
679 static stream<PacketLen> sFmcFifoEmptySig (
"sFmcFifoEmptySig");
681 static stream<bool> sStartTclCls_sig (
"sStartTclCls_sig");
682 static stream<NalPortUpdate> sNalPortUpdate (
"sNalPortUpdate");
684 static stream<NetworkWord> sRoleUdpDataRx_buffer (
"sRoleUdpDataRx_buffer");
685 static stream<NetworkMetaStream> sRoleUdpMetaRx_buffer (
"sRoleUdpMetaRx_buffer");
687 static stream<UdpAppData> sUoeTxBuffer_Data (
"sUoeTxBuffer_Data");
688 static stream<UdpAppMeta> sUoeTxBuffer_Meta (
"sUoeTxBuffer_Meta");
689 static stream<UdpAppDLen> sUoeTxBuffer_DLen (
"sUoeTxBuffer_DLen");
691 static stream<bool> sCacheInvalDel_Notif (
"sCacheInvalDel_Notif");
693 static stream<NetworkWord> sFmcTcpDataRx_buffer (
"sFmcTcpDataRx_buffer");
694 static stream<TcpSessId> sFmcTcpMetaRx_buffer (
"sFmcTcpMetaRx_buffer");
697 #pragma HLS STREAM variable=internal_event_fifo_0 depth=16
698 #pragma HLS STREAM variable=internal_event_fifo_1 depth=16
699 #pragma HLS STREAM variable=internal_event_fifo_2 depth=16
700 #pragma HLS STREAM variable=internal_event_fifo_3 depth=16
701 #pragma HLS STREAM variable=merged_fifo depth=64
704 #pragma HLS STREAM variable=sA4lToPortLogic depth=8
705 #pragma HLS STREAM variable=sA4lToUdpRx depth=8
706 #pragma HLS STREAM variable=sA4lToTcpRx depth=8
707 #pragma HLS STREAM variable=sA4lToStatusProc depth=8
708 #pragma HLS STREAM variable=sA4lMrtUpdate depth=16
709 #pragma HLS STREAM variable=sStatusUpdate depth=128
711 #pragma HLS STREAM variable=sGetIpReq_UdpTx depth=16
712 #pragma HLS STREAM variable=sGetIpRep_UdpTx depth=16
713 #pragma HLS STREAM variable=sGetIpReq_TcpTx depth=16
714 #pragma HLS STREAM variable=sGetIpRep_TcpTx depth=16
715 #pragma HLS STREAM variable=sGetNidReq_UdpRx depth=16
716 #pragma HLS STREAM variable=sGetNidRep_UdpRx depth=16
717 #pragma HLS STREAM variable=sGetNidReq_TcpRx depth=16
718 #pragma HLS STREAM variable=sGetNidRep_TcpRx depth=16
719 #pragma HLS STREAM variable=sGetNidReq_TcpTx depth=16
720 #pragma HLS STREAM variable=sGetNidRep_TcpTx depth=16
722 #pragma HLS STREAM variable=sUdpPortsToClose depth=4
723 #pragma HLS STREAM variable=sUdpPortsToOpen depth=4
724 #pragma HLS STREAM variable=sUdpPortsOpenFeedback depth=4
725 #pragma HLS STREAM variable=sTcpPortsToOpen depth=4
726 #pragma HLS STREAM variable=sTcpPortsOpenFeedback depth=4
729 #pragma HLS STREAM variable=sRoleTcpDataRx_buffer depth=252
730 #pragma HLS STREAM variable=sRoleTcpMetaRx_buffer depth=32
732 #pragma HLS STREAM variable=sTcpWrp2Wbu_data depth=252
733 #pragma HLS STREAM variable=sTcpWrp2Wbu_sessId depth=32
734 #pragma HLS STREAM variable=sTcpWrp2Wbu_len depth=32
737 #pragma HLS STREAM variable=sGetTripleFromSid_Req depth=8
738 #pragma HLS STREAM variable=sGetTripleFromSid_Rep depth=8
739 #pragma HLS STREAM variable=sGetSidFromTriple_Req depth=8
740 #pragma HLS STREAM variable=sGetSidFromTriple_Rep depth=8
741 #pragma HLS STREAM variable=sAddNewTriple_TcpRrh depth=8
742 #pragma HLS STREAM variable=sAddNewTriple_TcpCon depth=8
743 #pragma HLS STREAM variable=sDeleteEntryBySid depth=8
744 #pragma HLS STREAM variable=sMarkAsPriv depth=8
745 #pragma HLS STREAM variable=sMarkToDel_unpriv depth=8
746 #pragma HLS STREAM variable=sGetNextDelRow_Req depth=8
747 #pragma HLS STREAM variable=sGetNextDelRow_Rep depth=8
748 #pragma HLS STREAM variable=sRDp_ReqNotif depth=8
750 #pragma HLS STREAM variable=sNewTcpCon_Req depth=4
751 #pragma HLS STREAM variable=sNewTcpCon_Rep depth=4
754 #pragma HLS STREAM variable=sTcpNotif_buffer depth=8192
760 #pragma HLS STREAM variable=sMrtVersionUpdate_0 depth=4
761 #pragma HLS STREAM variable=sMrtVersionUpdate_1 depth=4
763 #pragma HLS STREAM variable=sCacheInvalSig_0 depth=4
764 #pragma HLS STREAM variable=sCacheInvalSig_1 depth=4
765 #pragma HLS STREAM variable=sCacheInvalSig_2 depth=4
766 #pragma HLS STREAM variable=sCacheInvalSig_3 depth=4
768 #pragma HLS STREAM variable=sRoleFifoEmptySig depth=8
769 #pragma HLS STREAM variable=sFmcFifoEmptySig depth=8
771 #pragma HLS STREAM variable=sStartTclCls_sig depth=4
772 #pragma HLS STREAM variable=sNalPortUpdate depth=8
776 #pragma HLS STREAM variable=sRoleUdpDataRx_buffer depth=512
777 #pragma HLS STREAM variable=sRoleUdpMetaRx_buffer depth=64
779 #pragma HLS STREAM variable=sUoeTxBuffer_Data depth=252
780 #pragma HLS STREAM variable=sUoeTxBuffer_Meta depth=32
781 #pragma HLS STREAM variable=sUoeTxBuffer_DLen depth=32
783 #pragma HLS STREAM variable=sCacheInvalDel_Notif depth=4
785 #pragma HLS STREAM variable=sFmcTcpDataRx_buffer depth=252
786 #pragma HLS STREAM variable=sFmcTcpMetaRx_buffer depth=32
794 sCacheInvalDel_Notif, sCacheInvalSig_0, sCacheInvalSig_1, sCacheInvalSig_2, sCacheInvalSig_3);
797 pi_udp_rx_ports, pi_tcp_rx_ports, sA4lToPortLogic, sUdpPortsToOpen, sUdpPortsToClose,
798 sTcpPortsToOpen, sUdpPortsOpenFeedback, sTcpPortsOpenFeedback, sMarkToDel_unpriv,
799 sNalPortUpdate, sStartTclCls_sig);
804 pUdpTX(siUdp_data,
siUdp_meta, sUoeTxBuffer_Data, sUoeTxBuffer_Meta, sUoeTxBuffer_DLen,
805 sGetIpReq_UdpTx, sGetIpRep_UdpTx,
806 myIpAddress, sCacheInvalSig_0, internal_event_fifo_0);
809 soUOE_Data, soUOE_Meta, soUOE_DLen);
814 pUdpLsn(soUOE_LsnReq, siUOE_LsnRep, sUdpPortsToOpen, sUdpPortsOpenFeedback);
817 siUOE_Data, siUOE_Meta, siUOE_DLen,
818 sA4lToUdpRx, sGetNidReq_UdpRx, sGetNidRep_UdpRx,
819 sCacheInvalSig_1, internal_event_fifo_1);
827 pUdpCls(soUOE_ClsReq, siUOE_ClsRep, sUdpPortsToClose);
831 pTcpLsn(soTOE_LsnReq, siTOE_LsnRep, sTcpPortsToOpen, sTcpPortsOpenFeedback);
839 soTOE_DReq, sAddNewTriple_TcpRrh, sMarkAsPriv, sDeleteEntryBySid, sRDp_ReqNotif,
840 sFmcFifoEmptySig, sRoleFifoEmptySig);
845 sFmcTcpDataRx_buffer, sFmcTcpMetaRx_buffer,
846 sRoleTcpDataRx_buffer, sRoleTcpMetaRx_buffer,
847 sA4lToTcpRx, sGetNidReq_TcpRx, sGetNidRep_TcpRx, sGetTripleFromSid_Req, sGetTripleFromSid_Rep,
850 sCacheInvalSig_2, internal_event_fifo_2);
852 pFmcTcpRxDeq(sFmcTcpDataRx_buffer, sFmcTcpMetaRx_buffer, soFMC_data, soFMC_SessId, sFmcFifoEmptySig);
859 sTcpWrp2Wbu_data, sTcpWrp2Wbu_sessId, sTcpWrp2Wbu_len,
860 sGetIpReq_TcpTx, sGetIpRep_TcpTx,
862 sGetSidFromTriple_Req, sGetSidFromTriple_Rep, sNewTcpCon_Req, sNewTcpCon_Rep,
863 sCacheInvalSig_3, internal_event_fifo_3);
866 soTOE_Data, soTOE_SndReq, siTOE_SndRep);
870 pTcpCOn(soTOE_OpnReq, siTOE_OpnRep, sAddNewTriple_TcpCon, sNewTcpCon_Req, sNewTcpCon_Rep);
874 pTcpCls(soTOE_ClsReq, sGetNextDelRow_Req, sGetNextDelRow_Rep, sStartTclCls_sig);
879 pTcpAgency(sGetTripleFromSid_Req, sGetTripleFromSid_Rep, sGetSidFromTriple_Req, sGetSidFromTriple_Rep,
880 sAddNewTriple_TcpRrh, sAddNewTriple_TcpCon, sDeleteEntryBySid, sCacheInvalDel_Notif,
881 sMarkAsPriv, sMarkToDel_unpriv, sGetNextDelRow_Req, sGetNextDelRow_Rep);
886 eventFifoMerge( internal_event_fifo_0, internal_event_fifo_1, internal_event_fifo_2, internal_event_fifo_3, merged_fifo);
893 sA4lToPortLogic, sA4lToUdpRx,
894 sA4lToTcpRx, sA4lToStatusProc,
897 sMrtVersionUpdate_0, sMrtVersionUpdate_1,
901 pMrtAgency(sA4lMrtUpdate, sGetIpReq_UdpTx, sGetIpRep_UdpTx, sGetIpReq_TcpTx, sGetIpRep_TcpTx, sGetNidReq_UdpRx, sGetNidRep_UdpRx, sGetNidReq_TcpRx, sGetNidRep_TcpRx);
LE_tKeep getLE_TKeep(int leHi=64/8-1, int leLo=0) const
ap_uint< 1 > layer_7_enabled
ap_uint< 1 > layer_4_enabled
void pUdpCls(stream< UdpPort > &soUOE_ClsReq, stream< StsBool > &siUOE_ClsRep, stream< UdpPort > &sUdpPortsToClose)
Asks the UOE to close UDP ports, based on the request from pPortLogic.
NalTriple newTriple(Ip4Addr ipRemoteAddres, TcpPort tcpRemotePort, TcpPort tcpLocalPort)
#define NUMBER_CONFIG_WORDS
#define NAL_STATUS_FMC_PORT_PROCESSED
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 ...
void pFmcTcpRxDeq(stream< NetworkWord > &sFmcTcpDataRx_buffer, stream< TcpSessId > &sFmcTcpMetaRx_buffer, stream< NetworkWord > &soFmc_data, stream< TcpSessId > &soFmc_meta, stream< PacketLen > &fmc_write_cnt_sig)
Terminates the internal TCP RX FIFOs and forwards packets to the FMC.
void pUdpTX(stream< NetworkWord > &siUdp_data, stream< NetworkMetaStream > &siUdp_meta, stream< UdpAppData > &soUOE_Data, stream< UdpAppMeta > &soUOE_Meta, stream< UdpAppDLen > &soUOE_DLen, stream< NodeId > &sGetIpReq_UdpTx, stream< Ip4Addr > &sGetIpRep_UdpTx, const ap_uint< 32 > *ipAddrBE, stream< bool > &cache_inval_sig, stream< NalEventNotif > &internal_event_fifo)
Processes the outgoing UDP packets (i.e. ROLE -> Network).
#define NAL_UNAUTHORIZED_ACCESS
#define NAL_STATUS_LAST_TX_NODE_ID
void pTcpLsn(stream< TcpAppLsnReq > &soTOE_LsnReq, stream< TcpAppLsnRep > &siTOE_LsnRep, stream< TcpPort > &sTcpPortsToOpen, stream< bool > &sTcpPortsOpenFeedback)
Request the TOE to start listening (LSn) for incoming connections on a specific port (....
#define NUMBER_STATUS_WORDS
void pTcpWRp(ap_uint< 1 > *layer_4_enabled, ap_uint< 1 > *piNTS_ready, stream< NetworkWord > &siFMC_data, stream< TcpSessId > &siFMC_SessId, stream< NetworkWord > &siTcp_data, stream< NetworkMetaStream > &siTcp_meta, stream< TcpAppData > &soTOE_Data, stream< TcpAppMeta > &soTOE_SessId, stream< TcpDatLen > &soTOE_len, stream< NodeId > &sGetIpReq_TcpTx, stream< Ip4Addr > &sGetIpRep_TcpTx, stream< NalTriple > &sGetSidFromTriple_Req, stream< SessionId > &sGetSidFromTriple_Rep, stream< NalTriple > &sNewTcpCon_Req, stream< NalNewTcpConRep > &sNewTcpCon_Rep, stream< bool > &cache_inval_sig, stream< NalEventNotif > &internal_event_fifo)
Write Path (WRp) - From ROLE or FMC to TOE. Process waits for a new data segment to write and forward...
void pRoleUdpRxDeq(ap_uint< 1 > *layer_7_enabled, ap_uint< 1 > *role_decoupled, stream< NetworkWord > &sRoleUdpDataRx_buffer, stream< NetworkMetaStream > &sRoleUdpMetaRx_buffer, stream< NetworkWord > &soUdp_data, stream< NetworkMetaStream > &soUdp_meta)
Terminates the internal UDP RX FIFOs and forwards packets to the Role.
stream< NetworkMetaStream > soUdp_meta("soUdp_meta")
void pTcpCOn(stream< TcpAppOpnReq > &soTOE_OpnReq, stream< TcpAppOpnRep > &siTOE_OpnRep, stream< NalNewTableEntry > &sAddNewTriple_TcpCon, stream< NalTriple > &sNewTcpCon_Req, stream< NalNewTcpConRep > &sNewTcpCon_Rep)
Client connection to remote HOST or FPGA socket (COn).
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...
void pTcpRxNotifEnq(ap_uint< 1 > *layer_4_enabled, ap_uint< 1 > *piNTS_ready, stream< TcpAppNotif > &siTOE_Notif, stream< TcpAppNotif > &sTcpNotif_buffer)
Enqueus the incoming notificiations from TOE into the internal buffer.
#define NAL_STATUS_RX_NODEID_ERROR
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.
#define NAL_STATUS_PACKET_CNT_TX
void pUdpLsn(stream< UdpPort > &soUOE_LsnReq, stream< StsBool > &siUOE_LsnRep, stream< UdpPort > &sUdpPortsToOpen, stream< bool > &sUdpPortsOpenFeedback)
Asks the UOE to open new UDP ports for listening, based on the request from pPortLogic.
#define NAL_STATUS_MRT_VERSION
uint8_t extractByteCnt(AxisRaw currWord)
#define NAL_STATUS_LAST_RX_NODE_ID
TcpPort getLocalPortFromTriple(NalTriple triple)
void eventFifoMerge(stream< NalEventNotif > &internal_event_fifo_0, stream< NalEventNotif > &internal_event_fifo_1, stream< NalEventNotif > &internal_event_fifo_2, stream< NalEventNotif > &internal_event_fifo_3, stream< NalEventNotif > &merged_fifo)
Merges multiple fifos, where the order of the fifo represents also the priorities.
void nal_main(ap_uint< 32 > ctrlLink[64+16+16], 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 > *piMMIO_CfrmIp4Addr, ap_uint< 32 > *myIpAddress, ap_uint< 32 > *pi_udp_rx_ports, stream< NetworkWord > &siUdp_data, stream< NetworkWord > &soUdp_data, stream< NetworkMetaStream > &siUdp_meta, stream< NetworkMetaStream > &soUdp_meta, ap_uint< 32 > *pi_tcp_rx_ports, stream< NetworkWord > &siTcp_data, stream< NetworkMetaStream > &siTcp_meta, stream< NetworkWord > &soTcp_data, stream< NetworkMetaStream > &soTcp_meta, stream< NetworkWord > &siFMC_data, stream< TcpSessId > &siFMC_SessId, stream< NetworkWord > &soFMC_data, stream< TcpSessId > &soFMC_SessId, stream< UdpPort > &soUOE_LsnReq, stream< StsBool > &siUOE_LsnRep, stream< UdpPort > &soUOE_ClsReq, stream< StsBool > &siUOE_ClsRep, stream< UdpAppData > &siUOE_Data, stream< UdpAppMeta > &siUOE_Meta, stream< UdpAppDLen > &siUOE_DLen, stream< UdpAppData > &soUOE_Data, stream< UdpAppMeta > &soUOE_Meta, stream< UdpAppDLen > &soUOE_DLen, stream< TcpAppNotif > &siTOE_Notif, stream< TcpAppRdReq > &soTOE_DReq, stream< TcpAppData > &siTOE_Data, stream< TcpAppMeta > &siTOE_SessId, stream< TcpAppLsnReq > &soTOE_LsnReq, stream< TcpAppLsnRep > &siTOE_LsnRep, stream< TcpAppData > &soTOE_Data, stream< TcpAppSndReq > &soTOE_SndReq, stream< TcpAppSndRep > &siTOE_SndRep, stream< TcpAppOpnReq > &soTOE_OpnReq, stream< TcpAppOpnRep > &siTOE_OpnRep, stream< TcpAppClsReq > &soTOE_ClsReq)
Main process of the Network Abstraction Layer (NAL)
void pTcpWBu(ap_uint< 1 > *layer_4_enabled, ap_uint< 1 > *piNTS_ready, stream< TcpAppData > &siWrp_Data, stream< TcpAppMeta > &siWrp_SessId, stream< TcpDatLen > &siWrp_len, stream< TcpAppData > &soTOE_Data, stream< TcpAppSndReq > &soTOE_SndReq, stream< TcpAppSndRep > &siTOE_SndRep)
Write Buffer (WBu) - From WRp to TOE. Process to synchronize with TOE's TX buffer (and it's available...
void pRoleTcpRxDeq(ap_uint< 1 > *layer_7_enabled, ap_uint< 1 > *role_decoupled, stream< NetworkWord > &sRoleTcpDataRx_buffer, stream< NetworkMetaStream > &sRoleTcpMetaRx_buffer, stream< NetworkWord > &soTcp_data, stream< NetworkMetaStream > &soTcp_meta, stream< PacketLen > &role_write_cnt_sig)
Terminates the internal TCP RX FIFOs and forwards packets to the Role.
Ip4Addr getRemoteIpAddrFromTriple(NalTriple triple)
ap_uint< 32 > getRightmostBitPos(ap_uint< 32 > num)
void pTcpRRh(ap_uint< 1 > *layer_4_enabled, ap_uint< 1 > *piNTS_ready, ap_uint< 32 > *piMMIO_CfrmIp4Addr, ap_uint< 16 > *piMMIO_FmcLsnPort, stream< TcpAppNotif > &siTOE_Notif, stream< TcpAppRdReq > &soTOE_DReq, stream< NalNewTableEntry > &sAddNewTriple_TcpRrh, stream< SessionId > &sMarkAsPriv, stream< SessionId > &sDeleteEntryBySid, stream< TcpAppRdReq > &sRDp_ReqNotif, stream< PacketLen > &fmc_write_cnt_sig, stream< PacketLen > &role_write_cnt_sig)
ReadRequestHandler (RRh). Waits for a notification indicating the availability of new data for the RO...
void pTcpCls(stream< TcpAppClsReq > &soTOE_ClsReq, stream< bool > &sGetNextDelRow_Req, stream< SessionId > &sGetNextDelRow_Rep, stream< bool > &sStartTclCls)
Asks the TOE to close Tcp connections, based on the request from pPortLogic.
TcpPort getRemotePortFromTriple(NalTriple triple)
ap_uint< 1 > role_decoupled
#define NAL_STATUS_PACKET_CNT_RX
stream< NetworkMetaStream > siUdp_meta("siUdp_meta")
#define NAL_STATUS_OWN_RANK
#define NAL_STATUS_GLOBAL_STATE
ap_uint< 32 > myIpAddress
#define NAL_CONFIG_OWN_RANK
ap_uint< 32 > ctrlLink[64+16+16]
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.
#define NAL_STATUS_OPEN_TCP_PORTS
void pUdpRx(ap_uint< 1 > *layer_7_enabled, ap_uint< 1 > *role_decoupled, stream< NetworkWord > &soUdp_data, stream< NetworkMetaStream > &soUdp_meta, stream< UdpAppData > &siUOE_Data, stream< UdpAppMeta > &siUOE_Meta, stream< UdpAppDLen > &siUOE_DLen, stream< NalConfigUpdate > &sConfigUpdate, stream< Ip4Addr > &sGetNidReq_UdpRx, stream< NodeId > &sGetNidRep_UdpRx, stream< bool > &cache_inval_sig, stream< NalEventNotif > &internal_event_fifo)
Processes the incoming UDP packets (i.e. Network -> ROLE ).
void pStatusMemory(stream< NalEventNotif > &internal_event_fifo, ap_uint< 1 > *layer_7_enabled, ap_uint< 1 > *role_decoupled, stream< NalConfigUpdate > &sConfigUpdate, stream< uint32_t > &mrt_version_update, stream< NalPortUpdate > &sNalPortUpdate, stream< NalStatusUpdate > &sStatusUpdate)
Maps the individual event notification of the USS/TSS processes to the status array as part of the Ax...
#define NAL_STATUS_TX_NODEID_ERROR
#define NAL_AUTHORIZED_ACCESS
#define NAL_STATUS_OPEN_UDP_PORTS
void pTcpRDp(ap_uint< 1 > *layer_4_enabled, ap_uint< 1 > *piNTS_ready, stream< TcpAppRdReq > &sRDp_ReqNotif, stream< TcpAppData > &siTOE_Data, stream< TcpAppMeta > &siTOE_SessId, stream< NetworkWord > &soFMC_data, stream< TcpSessId > &soFMC_SessId, stream< NetworkWord > &soTcp_data, stream< NetworkMetaStream > &soTcp_meta, stream< NalConfigUpdate > &sConfigUpdate, stream< Ip4Addr > &sGetNidReq_TcpRx, stream< NodeId > &sGetNidRep_TcpRx, stream< SessionId > &sGetTripleFromSid_Req, stream< NalTriple > &sGetTripleFromSid_Rep, ap_uint< 32 > *piMMIO_CfrmIp4Addr, ap_uint< 16 > *piMMIO_FmcLsnPort, ap_uint< 1 > *layer_7_enabled, ap_uint< 1 > *role_decoupled, stream< bool > &cache_inval_sig, stream< NalEventNotif > &internal_event_fifo)
Read Path (RDp) - From TOE to ROLE or FMC. Process waits for a new data segment to read and forwards ...
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...
void pUoeUdpTxDeq(ap_uint< 1 > *layer_4_enabled, ap_uint< 1 > *piNTS_ready, stream< UdpAppData > &sUoeTxBuffer_Data, stream< UdpAppMeta > &sUoeTxBuffer_Meta, stream< UdpAppDLen > &sUoeTxBuffer_DLen, stream< UdpAppData > &soUOE_Data, stream< UdpAppMeta > &soUOE_Meta, stream< UdpAppDLen > &soUOE_DLen)
Terminates the internal UDP TX FIFOs and forwards packets to the UOE.
: The cloudFPGA Network Abstraction Layer (NAL) between NTS and ROlE. The NAL core manages the NTS St...
ap_uint< 16 > config_addr
ap_uint< 32 > update_value
ap_uint< 32 > update_value