P4C
The P4 Compiler
Loading...
Searching...
No Matches
p4runtime_translation.h
1/*
2 * SPDX-FileCopyrightText: 2024 Google LLC
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_P4RUNTIME_TRANSLATION_H_
8#define BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_P4RUNTIME_TRANSLATION_H_
9#include <functional>
10
11#include "frontends/p4/typeMap.h"
12#include "ir/ir.h"
13#include "ir/visitor.h"
14
16
17using namespace P4::literals;
18
21class PropagateP4RuntimeTranslation : public Transform {
24 std::reference_wrapper<const P4::TypeMap> _typeMap;
25
27 static std::vector<const IR::Annotation *> lookupP4RuntimeAnnotations(
28 const P4::TypeMap &typeMap, const IR::Type *type);
29
30 const IR::Parameter *preorder(IR::Parameter *parameter) override;
31 const IR::KeyElement *preorder(IR::KeyElement *keyElement) override;
32
33 public:
34 explicit PropagateP4RuntimeTranslation(const P4::TypeMap &typeMap);
35};
36
37} // namespace P4::P4Tools::P4Testgen::Bmv2
38
39#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_P4RUNTIME_TRANSLATION_H_ */
Definition typeMap.h:32
Inja.
Definition targets/bmv2/cmd_stepper.cpp:37