cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
test_toe.hpp File Reference

: Testbench for the TCP Offload Engine (TOE) More...

#include <ap_shift_reg.h>
#include <cstdio>
#include <iostream>
#include <fstream>
#include <map>
#include <set>
#include <string>
#include <unistd.h>
#include "../../../NTS/nts_config.hpp"
#include "../../../NTS/nts_utils.hpp"
#include "../../../NTS/SimNtsUtils.hpp"
#include "../../../NTS/SimAppData.hpp"
#include "../../../NTS/SimIp4Packet.hpp"
#include "../../../NTS/toe/src/toe.hpp"
#include "../../../NTS/toe/src/toe_utils.hpp"
#include "../../../NTS/toe/test/dummy_memory/dummy_memory.hpp"
Include dependency graph for test_toe.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TB_STARTUP_DELAY   (TOE_SIZEOF_LISTEN_PORT_TABLE)
 
#define TB_GRACE_TIME   2500
 
#define TB_STARTUP_TIME   25
 
#define DEFAULT_FPGA_IP4_ADDR   0x0A0CC801
 
#define DEFAULT_FPGA_LSN_PORT   0x0057
 
#define DEFAULT_FPGA_SND_PORT   TOE_FIRST_EPHEMERAL_PORT_NUM
 
#define DEFAULT_HOST_IP4_ADDR   0x0A0CC832
 
#define DEFAULT_HOST_LSN_PORT   0x0058
 
#define DEFAULT_HOST_SND_PORT   0x8058
 
#define APP_RSP_LATENCY   10
 
#define MEM_RD_CMD_LATENCY   10
 
#define MEM_RD_DAT_LATENCY   10
 
#define MEM_RD_STS_LATENCY   10
 
#define MEM_WR_CMD_LATENCY   10
 
#define MEM_WR_DAT_LATENCY   10
 
#define MEM_WR_STS_LATENCY   10
 
#define CAM_LOOKUP_LATENCY   1
 
#define CAM_UPDATE_LATENCY   10
 
#define RTT_LINK   25
 
#define FPGA_CLIENT_CONNECT_TIMEOUT   250
 

Enumerations

enum  TestingMode {
  RX_MODE ='0' , TX_MODE ='1' , BIDIR_MODE ='2' , ECHO_MODE ='3' ,
  RX_MODE ='0' , TX_MODE ='1' , BIDIR_MODE ='2' , ECHO_MODE ='3' ,
  RX_MODE ='0' , TX_MODE ='1' , BIDIR_MODE ='2' , ECHO_MODE ='3'
}
 

Variables

bool gTraceEvent = false
 
bool gFatalError = false
 
unsigned int gSimCycCnt = 0
 
unsigned int gMaxSimCycles = ( 0x8000 ) + 2500
 
Ip4Addr gFpgaIp4Addr = 0x0A0CC801
 
TcpPort gFpgaLsnPort = 0x0057
 
TcpPort gFpgaSndPort = 0x8000
 
Ip4Addr gHostIp4Addr = 0x0A0CC832
 
TcpPort gHostLsnPort = 0x0058
 
bool gSortTaifGold = false
 
bool gTest_RcvdIp4Packet = true
 
bool gTest_RcvdIp4TotLen = true
 
bool gTest_RcvdIp4HdrCsum = true
 
bool gTest_RcvdUdpLen = true
 
bool gTest_RcvdLy4Csum = true
 
bool gTest_SentIp4TotLen = true
 
bool gTest_SentIp4HdrCsum = true
 
bool gTest_SentUdpLen = true
 
bool gTest_SentLy4Csum = true
 

Detailed Description

: Testbench for the TCP Offload Engine (TOE)

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:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. 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

Definition in file test_toe.hpp.