cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
: Dynamic Host Configuration Protocol (DHCP) client. More...
#include "dhcp_client.hpp"
Go to the source code of this file.
Macros | |
#define | USE_DEPRECATED_DIRECTIVES |
Functions | |
void | pOpnComm (ap_uint< 1 > &piMMIO_Enable, stream< ap_uint< 16 > > &soUDMX_OpnReq, stream< bool > &siUDMX_OpnAck, stream< SigOpn > &soFsm_Signal) |
Open a communication end point. This corresponds somehow to the creation of a UDP socket at the client side. More... | |
void | pRcvMessage (stream< UdpWord > &siUDMX_Data, stream< UdpMeta > &siUDMX_Meta, stream< DhcpMetaRep > &soFsm_MetaRepFifo, ap_uint< 48 > piMMIO_MacAddr) |
Receive a message from the DHCP server and generate a meta-reply information for the FSM control process. More... | |
void | pSndMessage (stream< DhcpMetaReq > &siFsm_MetaReqFifo, stream< UdpWord > &soUDMX_Data, stream< UdpMeta > &soUDMX_Meta, stream< UdpPLen > &soUDMX_PLen, ap_uint< 48 > piMMIO_MacAddr) |
Build a DHCP message from a meta-request information and send it out to the DHCP server. More... | |
void | pFsmCtrl (stream< SigOpn > &siOpn_Signal, ap_uint< 1 > &piMMIO_Enable, stream< DhcpMetaRep > &siRcv_MsgFifo, stream< DhcpMetaReq > &soSnd_MsgFifo, ap_uint< 32 > &poNts_IpAddress) |
Final state machine that controls the sending and reception of DHCP messages. to the. More... | |
void | dhcp_client (ap_uint< 1 > &piMMIO_This_Enable, ap_uint< 48 > &piMMIO_This_MacAddress, ap_uint< 32 > &poTHIS_Nts_IpAddress, stream< AxisAck > &siUDMX_This_OpnAck, stream< UdpPort > &soTHIS_Udmx_OpnReq, stream< UdpWord > &siUDMX_This_Data, stream< UdpMeta > &siUDMX_This_Meta, stream< UdpWord > &soTHIS_Udmx_Data, stream< UdpMeta > &soTHIS_Udmx_Meta, stream< UdpPort > &soTHIS_Udmx_PLen) |
Main process of the DHCP-client. More... | |
: Dynamic Host Configuration Protocol (DHCP) client.
Copyright 2016 – 2021 IBM Corporation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Copyright (c) 2015, Xilinx, Inc.
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
System: : cloudFPGA Component : Shell, Network Transport Stack (NTS) Language : Vivado HLS
: This process implement a DHCP client which queries an IP address from a server immediately after the power-on sequence of the FPGA.
Definition in file dhcp_client.cpp.
#define USE_DEPRECATED_DIRECTIVES |
Definition at line 62 of file dhcp_client.cpp.
void dhcp_client | ( | ap_uint< 1 > & | piMMIO_This_Enable, |
ap_uint< 48 > & | piMMIO_This_MacAddress, | ||
ap_uint< 32 > & | poTHIS_Nts_IpAddress, | ||
stream< AxisAck > & | siUDMX_This_OpnAck, | ||
stream< UdpPort > & | soTHIS_Udmx_OpnReq, | ||
stream< UdpWord > & | siUDMX_This_Data, | ||
stream< UdpMeta > & | siUDMX_This_Meta, | ||
stream< UdpWord > & | soTHIS_Udmx_Data, | ||
stream< UdpMeta > & | soTHIS_Udmx_Meta, | ||
stream< UdpPort > & | soTHIS_Udmx_PLen | ||
) |
Main process of the DHCP-client.
[in] | piMMIO_This_Enable | Enable signal from MMIO. |
[in] | piMMIO_This_MacAddress | MAC address from MMIO. |
[out] | poTHIS_Nts_IpAddress | IPv4 address from this DHCP. |
[in] | siUDMX_This_OpnAck | Open port acknowledgment from UDP-Mux. |
[out] | soTHIS_Udmx_OpnReq | Open port request to UDP-Mux. |
[in] | siUDMX_This_Data | Data path from the UDP-Mux. |
[in] | siUDMX_This_Meta | Metadata from the UDP-Mux. |
[out] | soTHIS_Udmx_Data | Data path to the UDP-Mux. |
[out] | soTHIS_Udmx_Meta | Metadata to the UDP-Mux. |
[out] | soTHIS_Udmx_PLen | Payload length to the UDP-Mux. |
Definition at line 474 of file dhcp_client.cpp.
void pFsmCtrl | ( | stream< SigOpn > & | siOpn_Signal, |
ap_uint< 1 > & | piMMIO_Enable, | ||
stream< DhcpMetaRep > & | siRcv_MsgFifo, | ||
stream< DhcpMetaReq > & | soSnd_MsgFifo, | ||
ap_uint< 32 > & | poNts_IpAddress | ||
) |
Final state machine that controls the sending and reception of DHCP messages. to the.
[in] | siOpen_Signal,a | signal indicating that the communication socket is open. |
[in] | piMMIO_Enable,enable | signal from MMIO. |
[in] | siRcv_MsgFifo,the | Fifo with messages from the DHCP server. |
[out] | soSnd_MsgFifo,the | Fifo with message to the DHCP server. |
[out] | poNts_IpAddress,the | IPv4 address received from the DHCP server. |
Definition at line 354 of file dhcp_client.cpp.
void pOpnComm | ( | ap_uint< 1 > & | piMMIO_Enable, |
stream< ap_uint< 16 > > & | soUDMX_OpnReq, | ||
stream< bool > & | siUDMX_OpnAck, | ||
stream< SigOpn > & | soFsm_Signal | ||
) |
Open a communication end point. This corresponds somehow to the creation of a UDP socket at the client side.
[in] | piMMIO_Enable,enable | signal from MMIO. |
[out] | soUDMX_OpnReq,open | port request to UDP-mux. |
[in] | siUDMX_OpnAck,open | port acknowledgment from UDP-mux. |
[out] | soFsm_Signal,a | signal indicating that the communication socket is open. |
Definition at line 77 of file dhcp_client.cpp.
void pRcvMessage | ( | stream< UdpWord > & | siUDMX_Data, |
stream< UdpMeta > & | siUDMX_Meta, | ||
stream< DhcpMetaRep > & | soFsm_MetaRepFifo, | ||
ap_uint< 48 > | piMMIO_MacAddr | ||
) |
Receive a message from the DHCP server and generate a meta-reply information for the FSM control process.
[in] | siUDMX_Data,data | from the UDP-mux. |
[in] | siUDMX_Meta,metadata | from the UDP-mux. param[out] soFsm_MetaRepFifo, a FiFo with meta-reply info for the FSM. |
[in] | piMMIO_MacAddr,the | MAC address from the MMIO. |
Definition at line 125 of file dhcp_client.cpp.
void pSndMessage | ( | stream< DhcpMetaReq > & | siFsm_MetaReqFifo, |
stream< UdpWord > & | soUDMX_Data, | ||
stream< UdpMeta > & | soUDMX_Meta, | ||
stream< UdpPLen > & | soUDMX_PLen, | ||
ap_uint< 48 > | piMMIO_MacAddr | ||
) |
Build a DHCP message from a meta-request information and send it out to the DHCP server.
[in] | siFsm_MetaReqFifo,a | FiFo with meta-request information. |
[out] | soUDMX_Data,data | to the UDP-mux. |
[out] | soUDMX_Meta,metadata | to the UDP-mux. |
[out] | soUDMX_PLen,packet | length to UDP-mux. |
[in] | piMMIO_MacAddr,the | MAC address from the MMIO. |
Definition at line 225 of file dhcp_client.cpp.