P4C
The P4 Compiler
Loading...
Searching...
No Matches
shared_program_info.h
1#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_PNA_SHARED_PROGRAM_INFO_H_
2#define BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_PNA_SHARED_PROGRAM_INFO_H_
3
4#include <cstddef>
5
6#include "ir/ir.h"
7#include "lib/cstring.h"
8#include "lib/ordered_map.h"
9
10#include "backends/p4tools/modules/testgen/core/program_info.h"
11
13
15 private:
18
20 static const IR::Type_Bits PARSER_ERR_BITS;
21
22 public:
23 SharedPnaProgramInfo(const TestgenCompilerResult &compilerResult,
25
28 const;
29
30 [[nodiscard]] const IR::StateVariable &getTargetInputPortVar() const override;
31
32 [[nodiscard]] const IR::StateVariable &getTargetOutputPortVar() const override;
33
34 [[nodiscard]] const IR::Expression *dropIsActive() const override;
35
36 [[nodiscard]] const IR::Type_Bits *getParserErrorType() const override;
37
40 [[nodiscard]] const IR::PathExpression *getBlockParam(cstring blockLabel,
41 size_t paramIndex) const;
42
43 DECLARE_TYPEINFO(SharedPnaProgramInfo, ProgramInfo);
44};
45
46} // namespace P4::P4Tools::P4Testgen::Pna
47
48#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_PNA_SHARED_PROGRAM_INFO_H_ */
Definition shared_program_info.h:14
const IR::StateVariable & getTargetOutputPortVar() const override
Definition shared_program_info.cpp:41
const IR::Expression * dropIsActive() const override
Definition shared_program_info.cpp:45
const IR::PathExpression * getBlockParam(cstring blockLabel, size_t paramIndex) const
Definition shared_program_info.cpp:49
const IR::StateVariable & getTargetInputPortVar() const override
Definition shared_program_info.cpp:35
const ordered_map< cstring, const IR::Type_Declaration * > * getProgrammableBlocks() const
Definition shared_program_info.cpp:31
Stores target-specific information about a P4 program.
Definition core/program_info.h:21
Extends the CompilerResult with the associated P4RuntimeApi.
Definition modules/testgen/core/compiler_result.h:11
Definition cstring.h:85
Definition ordered_map.h:32
Inja.
Definition pna/backend/metadata/metadata.cpp:24