cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
Testbench for the Address Resolution Protocol (ARS) server of the Network Transport Stack (NTS). More...
Macros | |
#define | THIS_NAME "TB" |
#define | TRACE_OFF 0x0000 |
#define | TRACE_CAM 1 << 1 |
#define | TRACE_CGF 1 << 2 |
#define | TRACE_EAC 1 << 3 |
#define | TRACE_EIT 1 << 4 |
#define | TRACE_ALL 0xFFFF |
#define | DEBUG_LEVEL (TRACE_OFF) |
#define | TB_MAX_SIM_CYCLES 25000 |
#define | TB_STARTUP_DELAY 0 |
#define | TB_GRACE_TIME 500 |
#define | CAM_LOOKUP_LATENCY 2 |
#define | CAM_UPDATE_LATENCY 10 |
Functions | |
int | createGoldenFile (string inpDAT_FileName, string outDAT_GoldName, EthAddr myMacAddress, Ip4Addr myIp4Address, map< Ip4Addr, EthAddr > &hostMap) |
Create the golden reference file from an input test file. More... | |
void | pEmulateCam (stream< RtlMacLookupRequest > &siARS_MacLkpReq, stream< RtlMacLookupReply > &soARS_MacLkpRep, stream< RtlMacUpdateRequest > &siARS_MacUpdReq, stream< RtlMacUpdateReply > &soARS_MacUpdRep) |
Emulate the behavior of the Content Addressable Memory (CAM). More... | |
void | arp_top_wrap (EthAddr piMMIO_MacAddress, Ip4Addr piMMIO_Ip4Address, stream< AxisEth > &siIPRX_Data, stream< AxisEth > &soETH_Data, stream< Ip4Addr > &siIPTX_MacLkpReq, stream< ArpLkpReply > &soIPTX_MacLkpRep, stream< RtlMacLookupRequest > &soCAM_MacLkpReq, stream< RtlMacLookupReply > &siCAM_MacLkpRep, stream< RtlMacUpdateRequest > &soCAM_MacUpdReq, stream< RtlMacUpdateReply > &siCAM_MacUpdRep) |
A wrapper for the Toplevel of the Address Resolution Protocol (ARP) Server. More... | |
int | main (int argc, char *argv[]) |
Main function. More... | |
Variables | |
const Ip4Addr | RESERVED_SENDER_PROTOCOL_ADDRESS = 0xCAFEFADE |
bool | gTraceEvent |
bool | gFatalError |
unsigned int | gSimCycCnt |
unsigned int | gMaxSimCycles |
Testbench for the Address Resolution Protocol (ARS) server of the Network Transport Stack (NTS).
#define CAM_LOOKUP_LATENCY 2 |
Definition at line 56 of file test_arp.hpp.
#define CAM_UPDATE_LATENCY 10 |
Definition at line 57 of file test_arp.hpp.
#define DEBUG_LEVEL (TRACE_OFF) |
Definition at line 49 of file test_arp.cpp.
#define TB_GRACE_TIME 500 |
Definition at line 54 of file test_arp.hpp.
#define TB_MAX_SIM_CYCLES 25000 |
Definition at line 52 of file test_arp.hpp.
#define TB_STARTUP_DELAY 0 |
Definition at line 53 of file test_arp.hpp.
#define THIS_NAME "TB" |
Definition at line 40 of file test_arp.cpp.
#define TRACE_ALL 0xFFFF |
Definition at line 47 of file test_arp.cpp.
#define TRACE_CAM 1 << 1 |
Definition at line 43 of file test_arp.cpp.
#define TRACE_CGF 1 << 2 |
Definition at line 44 of file test_arp.cpp.
#define TRACE_EAC 1 << 3 |
Definition at line 45 of file test_arp.cpp.
#define TRACE_EIT 1 << 4 |
Definition at line 46 of file test_arp.cpp.
#define TRACE_OFF 0x0000 |
Definition at line 42 of file test_arp.cpp.
void arp_top_wrap | ( | EthAddr | piMMIO_MacAddress, |
Ip4Addr | piMMIO_Ip4Address, | ||
stream< AxisEth > & | siIPRX_Data, | ||
stream< AxisEth > & | soETH_Data, | ||
stream< Ip4Addr > & | siIPTX_MacLkpReq, | ||
stream< ArpLkpReply > & | soIPTX_MacLkpRep, | ||
stream< RtlMacLookupRequest > & | soCAM_MacLkpReq, | ||
stream< RtlMacLookupReply > & | siCAM_MacLkpRep, | ||
stream< RtlMacUpdateRequest > & | soCAM_MacUpdReq, | ||
stream< RtlMacUpdateReply > & | siCAM_MacUpdRep | ||
) |
A wrapper for the Toplevel of the Address Resolution Protocol (ARP) Server.
[in] | piMMIO_MacAddress | The MAC address from MMIO (in network order). |
[in] | piMMIO_Ip4Address | The IPv4 address from MMIO (in network order). |
[in] | siIPRX_Data | Data stream from the IP Rx Handler (IPRX). |
[out] | soETH_Data | Data stream to Ethernet (ETH). |
[in] | siIPTX_MacLkpReq | MAC lookup request from [IPTX]. |
[out] | soIPTX_MacLkpRep | MAC lookup reply to [IPTX]. |
[out] | soCAM_MacLkpReq | MAC lookup request to [CAM]. |
[in] | siCAM_MacLkpRep | MAC lookup reply from [CAM]. |
[out] | soCAM_MacUpdReq | MAC update request to [CAM]. |
[in] | siCAM_MacUpdRep | MAC update reply from [CAM]. |
This process is a wrapper for the 'iprx_top' entity. It instantiates such an entity and further connects it with base 'AxisRaw' streams as expected by the 'iprx_top'.
Definition at line 397 of file test_arp.cpp.
int createGoldenFile | ( | string | inpDAT_FileName, |
string | outDAT_GoldName, | ||
EthAddr | myMacAddress, | ||
Ip4Addr | myIp4Address, | ||
map< Ip4Addr, EthAddr > & | hostMap | ||
) |
Create the golden reference file from an input test file.
[in] | inpDAT_FileName | the input DAT file to generate from. |
[in] | outDAT_GoldName | the output DAT gold file to create. |
[in] | myMacAddress | the MAC address of the FPGA. |
[in] | myIp4Address | the IPv4 address of the FPGA. |
[in] | hostMap | a ref to an associative container which holds the ARP binding addresses of the hosts involved in the current testbench run. |
Definition at line 78 of file test_arp.cpp.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Main function.
Main function for the test of the TOP of UDP Shell Interface (USIF).
Main function for the test of the UDP Application Flash (UAF) TOP.
Main function for the test of the TCP Shell Interface (TSIF) TOP.
Main function for the test of the TCP Application Flash (TAF) TOP.
[in] | inpFile,The | pathame of an input test vector. (e.g., ../../../../test/testVectors/siIPRX_Data_ArpFrame.dat) |
[in] | mode | The test mode (0=RX_MODE, 1=TX_MODE, 2=BIDIR_MODE, 3=ECHO_MODE). |
[in] | inpFile1 | The pathname of the input file containing the test vectors to be fed to the TOE: If (mode==0 || mode=2) inpFile1 = siIPRX_<TestName> Else inpFile1 = siTAIF_<TestName>. |
[in] | inpFile2 | The pathname of the second input file containing the test vectors to be fed to the TOE: inpFile2 == siTAIF_<TestName>. |
Main testbench for the user-application for MCEuropeanEngine on host. Server
This test take 0,1,2,3 or 4 parameters in the following order:
[in] | The | number of bytes to generate in 'Echo' or "Dump' mode [1:65535]. |
[in] | The | IPv4 address to open (must be in the range [0x00000000:0xFFFFFFFF]. |
[in] | The | TCP port number to open (must be in the range [0:65535]. |
[in] | The | number of bytes to generate in 'Tx' test mode [1:65535] or '0' to simply open a port w/o triggering the Tx test mode. |
[in] | The | number of bytes to generate in 'Echo' mode [1:65535]. |
[in] | The | IP4 destination address of the remote host. |
[in] | The | UDP destination port of the remote host. |
[in] | The | number of bytes to generate in or "Test' mode [1:65535]. |
@info Usage example --> "512 10.11.12.13 2718 1024"
Definition at line 445 of file test_arp.cpp.
void pEmulateCam | ( | stream< RtlMacLookupRequest > & | siARS_MacLkpReq, |
stream< RtlMacLookupReply > & | soARS_MacLkpRep, | ||
stream< RtlMacUpdateRequest > & | siARS_MacUpdReq, | ||
stream< RtlMacUpdateReply > & | soARS_MacUpdRep | ||
) |
Emulate the behavior of the Content Addressable Memory (CAM).
[in] | siARS_MacLkpReq | MAC lookup request from AddressResolutionServer (ARS). |
[out] | soARS_MacLkpRep | MAC lookup reply to [ARS]. |
[in] | siARS_MacUpdReq | MAC update request from [ARS]. |
[out] | soARS_MacUpdRep | MAC update reply to [ARS]. |
Definition at line 278 of file test_arp.cpp.
bool gFatalError |
Definition at line 67 of file test_arp.hpp.
unsigned int gMaxSimCycles |
Definition at line 69 of file test_arp.hpp.
unsigned int gSimCycCnt |
GLOBAL VARIABLES USED BY THE SIMULATION ENVIRONMENT
Definition at line 68 of file test_arp.hpp.
bool gTraceEvent |
HELPERS FOR THE DEBUGGING TRACES .e.g: DEBUG_LEVEL = (MDL_TRACE | IPS_TRACE)
Definition at line 66 of file test_arp.hpp.
const Ip4Addr RESERVED_SENDER_PROTOCOL_ADDRESS = 0xCAFEFADE |
Definition at line 59 of file test_arp.hpp.