cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
Testbench for the IP Receiver packet handler (IPRX) of the Network Transport Stack (NTS). More...
Macros | |
#define | THIS_NAME "TB" |
#define | TRACE_OFF 0x0000 |
#define | TRACE_CGF 1 << 1 |
#define | TRACE_ALL 0xFFFF |
#define | DEBUG_LEVEL (TRACE_OFF) |
#define | TB_MAX_SIM_CYCLES 250000 |
#define | TB_STARTUP_DELAY 0 |
#define | TB_GRACE_TIME 5000 |
Functions | |
void | stepSim () |
Increment the simulation counter. More... | |
int | createGoldenFiles (EthAddr myMacAddress, string inpDAT_FileName, string outARP_GoldName, string outICMP_GoldName, string outTOE_GoldName, string outUOE_GoldName) |
Create the golden reference files from an input test file. More... | |
void | iprx_top_wrap (EthAddr piMMIO_MacAddress, Ip4Addr piMMIO_Ip4Address, stream< AxisEth > &siETH_Data, stream< AxisArp > &soARP_Data, stream< AxisIp4 > &soICMP_Data, stream< AxisIp4 > &soICMP_Derr, stream< AxisIp4 > &soUOE_Data, stream< AxisIp4 > &soTOE_Data) |
A wrapper for the Toplevel of the IP Receive handler (IPRX). More... | |
int | main (int argc, char *argv[]) |
Main function. More... | |
Variables | |
bool | gTraceEvent |
bool | gFatalError |
unsigned int | gSimCycCnt |
unsigned int | gMaxSimCycles |
Testbench for the IP Receiver packet handler (IPRX) of the Network Transport Stack (NTS).
#define DEBUG_LEVEL (TRACE_OFF) |
Definition at line 44 of file test_iprx.cpp.
#define TB_GRACE_TIME 5000 |
Definition at line 49 of file test_iprx.hpp.
#define TB_MAX_SIM_CYCLES 250000 |
Definition at line 47 of file test_iprx.hpp.
#define TB_STARTUP_DELAY 0 |
Definition at line 48 of file test_iprx.hpp.
#define THIS_NAME "TB" |
Definition at line 39 of file test_iprx.cpp.
#define TRACE_ALL 0xFFFF |
Definition at line 43 of file test_iprx.cpp.
#define TRACE_CGF 1 << 1 |
Definition at line 42 of file test_iprx.cpp.
#define TRACE_OFF 0x0000 |
Definition at line 41 of file test_iprx.cpp.
int createGoldenFiles | ( | EthAddr | myMacAddress, |
string | inpDAT_FileName, | ||
string | outARP_GoldName, | ||
string | outICMP_GoldName, | ||
string | outTOE_GoldName, | ||
string | outUOE_GoldName | ||
) |
Create the golden reference files from an input test file.
[in] | myMacAddress | The MAC address of the FPGA. |
[in] | inpDAT_FileName | The input DAT file to generate from. |
[in] | outARP_GoldName | The ARP gold file to create. |
[in] | outICMP_GoldName | The ICMP gold file. |
[in] | outTOE_GoldName | The TOE gold file. |
[in] | outUOE_GoldName | The UOE gold file. |
Definition at line 72 of file test_iprx.cpp.
void iprx_top_wrap | ( | EthAddr | piMMIO_MacAddress, |
Ip4Addr | piMMIO_Ip4Address, | ||
stream< AxisEth > & | siETH_Data, | ||
stream< AxisArp > & | soARP_Data, | ||
stream< AxisIp4 > & | soICMP_Data, | ||
stream< AxisIp4 > & | soICMP_Derr, | ||
stream< AxisIp4 > & | soUOE_Data, | ||
stream< AxisIp4 > & | soTOE_Data | ||
) |
A wrapper for the Toplevel of the IP Receive handler (IPRX).
[in] | piMMIO_MacAddress | The MAC address from MMIO (in network order). |
[in] | piMMIO_Ip4Address | The IPv4 address from MMIO (in network order). |
[in] | siETH_Data | Data stream from ETHernet MAC layer (ETH). |
[out] | soARP_Data | Data stream to Address Resolution Protocol (ARP) server. |
[out] | soICMP_Data | Data stream to Internet Control Message Protocol (ICMP) engine. |
[out] | soICMP_Derr | Data stream in error to [ICMP]. |
[out] | soUOE_Data | Data stream to UDP Offload Engine (UOE). |
[out] | soTOE_Data | Data stream to TCP Offload Engine (TOE). |
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 281 of file test_iprx.cpp.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Main function.
[in] | inpFile | The pathname of the input test vector file. |
Definition at line 333 of file test_iprx.cpp.
void stepSim | ( | ) |
Increment the simulation counter.
Definition at line 49 of file test_iprx.cpp.
bool gFatalError |
Definition at line 57 of file test_iprx.hpp.
unsigned int gMaxSimCycles |
Definition at line 59 of file test_iprx.hpp.
unsigned int gSimCycCnt |
GLOBAL VARIABLES USED BY THE SIMULATION ENVIRONMENT
Definition at line 58 of file test_iprx.hpp.
bool gTraceEvent |
HELPERS FOR THE DEBUGGING TRACES .e.g: DEBUG_LEVEL = (MDL_TRACE | IPS_TRACE)
Definition at line 56 of file test_iprx.hpp.