P4C
The P4 Compiler
Loading...
Searching...
No Matches
modules/testgen/targets/bmv2/compiler_result.h
1#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_COMPILER_RESULT_H_
2#define BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_COMPILER_RESULT_H_
3
4#include "backends/p4tools/common/compiler/midend.h"
5#include "backends/p4tools/common/lib/variables.h"
6#include "control-plane/p4RuntimeSerializer.h"
7#include "frontends/common/options.h"
8
9#include "backends/p4tools/modules/testgen/core/compiler_result.h"
10#include "backends/p4tools/modules/testgen/targets/bmv2/map_direct_externs.h"
11#include "backends/p4tools/modules/testgen/targets/bmv2/p4_asserts_parser.h"
12
14
17 private:
19 P4::P4RuntimeAPI p4runtimeApi;
20
22 DirectExternMap directExternMap;
23
24 // Vector containing vectors of P4Constraints restrictions and nodes to which these restrictions
25 // apply.
26 ConstraintsVector p4ConstraintsRestrictions;
27
28 public:
30 P4::P4RuntimeAPI p4runtimeApi,
31 DirectExternMap directExternMap,
32 ConstraintsVector p4ConstraintsRestrictions);
33
35 [[nodiscard]] const P4::P4RuntimeAPI &getP4RuntimeApi() const;
36
38 // apply.
40
42 [[nodiscard]] const DirectExternMap &getDirectExternMap() const;
43
45};
46
47} // namespace P4::P4Tools::P4Testgen::Bmv2
48
49#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_COMPILER_RESULT_H_ */
Extends the CompilerResult with information specific to the V1Model running on BMv2.
Definition modules/testgen/targets/bmv2/compiler_result.h:16
const DirectExternMap & getDirectExternMap() const
Definition modules/testgen/targets/bmv2/compiler_result.cpp:41
ConstraintsVector getP4ConstraintsRestrictions() const
Definition modules/testgen/targets/bmv2/compiler_result.cpp:37
const P4::P4RuntimeAPI & getP4RuntimeApi() const
Definition modules/testgen/targets/bmv2/compiler_result.cpp:35
Extends the CompilerResult with the associated P4RuntimeApi.
Definition modules/testgen/core/compiler_result.h:11
Inja.
Definition targets/bmv2/cmd_stepper.cpp:33
std::map< cstring, const IR::P4Table * > DirectExternMap
Definition map_direct_externs.h:19
std::vector< const IR::Expression * > ConstraintsVector
Definition variables.h:17
Definition p4RuntimeSerializer.h:57