P4C
The P4 Compiler
Loading...
Searching...
No Matches
pna/shared_program_info.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_SHARED_PROGRAM_INFO_H_
8#define BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_PNA_SHARED_PROGRAM_INFO_H_
9
10#include <cstddef>
11
12#include "ir/ir.h"
13#include "lib/cstring.h"
14#include "lib/ordered_map.h"
15
16#include "backends/p4tools/modules/testgen/core/program_info.h"
17
19
20class SharedPnaProgramInfo : public ProgramInfo {
21 private:
24
26 static const IR::Type_Bits PARSER_ERR_BITS;
27
28 public:
29 SharedPnaProgramInfo(const TestgenCompilerResult &compilerResult,
31
34 const;
35
36 [[nodiscard]] const IR::StateVariable &getTargetInputPortVar() const override;
37
38 [[nodiscard]] const IR::StateVariable &getTargetOutputPortVar() const override;
39
40 [[nodiscard]] const IR::Expression *dropIsActive() const override;
41
42 [[nodiscard]] const IR::Type_Bits *getParserErrorType() const override;
43
46 [[nodiscard]] const IR::PathExpression *getBlockParam(cstring blockLabel,
47 size_t paramIndex) const;
48
49 DECLARE_TYPEINFO(SharedPnaProgramInfo, ProgramInfo);
50};
51
52} // namespace P4::P4Tools::P4Testgen::Pna
53
54#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_PNA_SHARED_PROGRAM_INFO_H_ */
const IR::StateVariable & getTargetOutputPortVar() const override
Definition pna/shared_program_info.cpp:45
const IR::Expression * dropIsActive() const override
Definition pna/shared_program_info.cpp:49
const IR::PathExpression * getBlockParam(cstring blockLabel, size_t paramIndex) const
Definition pna/shared_program_info.cpp:53
const IR::StateVariable & getTargetInputPortVar() const override
Definition pna/shared_program_info.cpp:39
const ordered_map< cstring, const IR::Type_Declaration * > * getProgrammableBlocks() const
Definition pna/shared_program_info.cpp:35
Extends the CompilerResult with the associated P4RuntimeApi.
Definition modules/testgen/core/compiler_result.h:17
Definition cstring.h:85
Definition ordered_map.h:32
Inja.
Definition pna/backend/metadata/metadata.cpp:28