cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
Return to the generic documentation of cloudFPGA
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;
57
unsigned
int
gMaxSimCycles
=
TB_STARTUP_DELAY
+
TB_MAX_SIM_CYCLES
;
58
59
//---------------------------------------------------------
60
//-- TESTBENCH MODES OF OPERATION
61
//---------------------------------------------------------
62
enum
TestMode
{
RX_MODE
=
'0'
,
TX_DGRM_MODE
=
'1'
,
TX_STRM_MODE
=
'2'
,
63
OPEN_MODE
=
'3'
,
BIDIR_MODE
=
'4'
,
ECHO_MODE
=
'5'
,
64
SPARE_MODE
=
'6'
,
DROP_MODE
=
'7'
};
65
66
#endif
67
TestMode
TestMode
Definition:
test_uoe.hpp:62
TB_STARTUP_DELAY
#define TB_STARTUP_DELAY
Definition:
test_uoe.hpp:46
TB_MAX_SIM_CYCLES
#define TB_MAX_SIM_CYCLES
Definition:
test_uoe.hpp:45
gMaxSimCycles
unsigned int gMaxSimCycles
Definition:
test_uoe.hpp:57
gSimCycCnt
unsigned int gSimCycCnt
Definition:
test_uoe.hpp:56
gTraceEvent
bool gTraceEvent
Definition:
test_uoe.hpp:54
gFatalError
bool gFatalError
Definition:
test_uoe.hpp:55
TX_DGRM_MODE
@ TX_DGRM_MODE
Definition:
test_uoe.hpp:62
OPEN_MODE
@ OPEN_MODE
Definition:
test_uoe.hpp:63
TX_STRM_MODE
@ TX_STRM_MODE
Definition:
test_uoe.hpp:62
SPARE_MODE
@ SPARE_MODE
Definition:
test_uoe.hpp:64
BIDIR_MODE
@ BIDIR_MODE
Definition:
test_uoe.hpp:63
DROP_MODE
@ DROP_MODE
Definition:
test_uoe.hpp:64
ECHO_MODE
@ ECHO_MODE
Definition:
test_uoe.hpp:63
RX_MODE
@ RX_MODE
Definition:
test_uoe.hpp:62
repos_for_Dox
cFDK
SRA
LIB
SHELL
LIB
hls
NTS
uoe
test
test_uoe.hpp
Generated on Sat Jul 15 2023 05:03:00 for cloudFPGA (cF) API by
1.9.1