P4C
The P4 Compiler
Loading...
Searching...
No Matches
runtime.h
1
19#ifndef BACKENDS_TOFINO_BF_P4C_CONTROL_PLANE_RUNTIME_H_
20#define BACKENDS_TOFINO_BF_P4C_CONTROL_PLANE_RUNTIME_H_
21
22#include "ir/ir.h"
23
24namespace P4 {
25namespace IR {
26class P4Program;
27} // namespace IR
28} // namespace P4
29
30using namespace P4;
31
32class BFN_Options;
33
34namespace BFN {
35
36/*
37 * Certain names are reserved for BF-RT and cannot be used on
38 * controls. Pass checks for control names overlapping restricted ones, append
39 * to the list as required.
40 */
42 std::set<cstring> reservedNames = {"snapshot"_cs};
43 bool preorder(const IR::Type_ArchBlock *b) override;
44
45 public:
47};
48
58class SetDefaultSize : public Modifier {
59 bool warn = false;
60 bool preorder(IR::P4Table *table) override;
61
62 public:
63 explicit SetDefaultSize(bool warn) : warn(warn) {}
64};
65
69void generateRuntime(const IR::P4Program *program, const BFN_Options &options);
70
71} // namespace BFN
72
73#endif /* BACKENDS_TOFINO_BF_P4C_CONTROL_PLANE_RUNTIME_H_ */
Definition runtime.h:41
Definition bf-p4c-options.h:28
Definition visitor.h:400
Definition visitor.h:372
Pass that sets default table size to 512 entries.
Definition runtime.h:58
The namespace encapsulating Barefoot/Intel-specific stuff.
Definition add_t2na_meta.cpp:21
void generateRuntime(const IR::P4Program *program, const BFN_Options &options)
Definition runtime.cpp:67
The namespace encapsulating IR node classes.
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24