P4C
The P4 Compiler
Loading...
Searching...
No Matches
p4tools/modules/testgen/targets/pna/constants.h
1/*
2 * SPDX-FileCopyrightText: 2023 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_PNA_CONSTANTS_H_
8#define BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_PNA_CONSTANTS_H_
9
10#include "ir/ir.h"
11
13
14enum PacketDirection { NET_TO_HOST, HOST_TO_NET };
15
17 public:
19 static constexpr const char *MATCH_KIND_OPT = "optional";
21 static constexpr const char *MATCH_KIND_SELECTOR = "selector";
23 static constexpr const char *MATCH_KIND_RANGE = "range";
24
26 static const IR::Member DROP_VAR;
28 static const IR::Member OUTPUT_PORT_VAR;
30 static const IR::Member PARSER_ERROR;
32 static constexpr int PORT_BIT_WIDTH = 32;
33};
34
37 public:
39 static const IR::SymbolicVariable DIRECTION;
40};
41
42} // namespace P4::P4Tools::P4Testgen::Pna
43
44#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_PNA_CONSTANTS_H_ */
Definition p4tools/modules/testgen/targets/pna/constants.h:16
static const IR::Member DROP_VAR
PNA-internal drop variable.
Definition p4tools/modules/testgen/targets/pna/constants.h:26
static const IR::Member OUTPUT_PORT_VAR
PNA-internal egress port variable.
Definition p4tools/modules/testgen/targets/pna/constants.h:28
static constexpr const char * MATCH_KIND_RANGE
Entries that can match a range.
Definition p4tools/modules/testgen/targets/pna/constants.h:23
static constexpr const char * MATCH_KIND_SELECTOR
A match that is used as an argument for the selector.
Definition p4tools/modules/testgen/targets/pna/constants.h:21
static constexpr const char * MATCH_KIND_OPT
Match bits exactly or not at all.
Definition p4tools/modules/testgen/targets/pna/constants.h:19
static constexpr int PORT_BIT_WIDTH
Port width in bits.
Definition p4tools/modules/testgen/targets/pna/constants.h:32
static const IR::Member PARSER_ERROR
PNA-internal parser error label.
Definition p4tools/modules/testgen/targets/pna/constants.h:30
variabless are variables that can be controlled and set by P4Testgen.
Definition p4tools/modules/testgen/targets/pna/constants.h:36
static const IR::SymbolicVariable DIRECTION
The input direction.
Definition p4tools/modules/testgen/targets/pna/constants.h:39
Inja.
Definition pna/backend/metadata/metadata.cpp:28