cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
test_uoe.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2016 -- 2021 IBM Corporation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
30 #ifndef _TEST_UOE_H_
31 #define _TEST_UOE_H_
32 
33 #include <set>
34 
35 #include "../src/uoe.hpp"
36 #include "../../../NTS/nts_utils.hpp"
37 #include "../../../NTS/SimNtsUtils.hpp"
38 #include "../../../NTS/SimUdpDatagram.hpp"
39 #include "../../../NTS/SimIp4Packet.hpp"
40 
41 //---------------------------------------------------------
42 //-- TESTBENCH GLOBAL DEFINES
43 // 'TB_TARTUP_DELAY' is used to delay the start of the [TB] functions.
44 //---------------------------------------------------------
45 #define TB_MAX_SIM_CYCLES 250000
46 #define TB_STARTUP_DELAY 0
47 #define TB_GRACE_TIME 1000 // Adds some cycles to drain the DUT before exiting
48 
49 //---------------------------------------------------------
50 //-- TESTBENCH GLOBAL VARIABLES
51 //-- These variables might be updated/overwritten by the
52 //-- content of a test-vector file.
53 //---------------------------------------------------------
54 bool gTraceEvent = false;
55 bool gFatalError = false;
56 unsigned int gSimCycCnt = 0;
58 
59 //---------------------------------------------------------
60 //-- TESTBENCH MODES OF OPERATION
61 //---------------------------------------------------------
64  SPARE_MODE='6', DROP_MODE='7' };
65 
66 #endif
67 
TestMode
Definition: test_uoe.hpp:62
#define TB_STARTUP_DELAY
Definition: test_uoe.hpp:46
#define TB_MAX_SIM_CYCLES
Definition: test_uoe.hpp:45
unsigned int gMaxSimCycles
Definition: test_uoe.hpp:57
unsigned int gSimCycCnt
Definition: test_uoe.hpp:56
bool gTraceEvent
Definition: test_uoe.hpp:54
bool gFatalError
Definition: test_uoe.hpp:55
@ TX_DGRM_MODE
Definition: test_uoe.hpp:62
@ OPEN_MODE
Definition: test_uoe.hpp:63
@ TX_STRM_MODE
Definition: test_uoe.hpp:62
@ SPARE_MODE
Definition: test_uoe.hpp:64
@ BIDIR_MODE
Definition: test_uoe.hpp:63
@ DROP_MODE
Definition: test_uoe.hpp:64
@ ECHO_MODE
Definition: test_uoe.hpp:63
@ RX_MODE
Definition: test_uoe.hpp:62