P4C
The P4 Compiler
Loading...
Searching...
No Matches
table.h
1#ifndef BACKENDS_P4TOOLS_MODULES_SMITH_COMMON_TABLE_H_
2#define BACKENDS_P4TOOLS_MODULES_SMITH_COMMON_TABLE_H_
3#include <cstddef>
4
5#include "backends/p4tools/modules/smith/common/generator.h"
6#include "ir/ir.h"
7#include "lib/cstring.h"
8
9namespace P4::P4Tools::P4Smith {
10
11class TableGenerator : public Generator {
12 public:
13 explicit TableGenerator(const SmithTarget &target) : Generator(target) {}
14
15 virtual ~TableGenerator() = default;
16
17 virtual IR::P4Table *genTableDeclaration();
18
19 virtual IR::TableProperties *genTablePropertyList();
20
21 virtual IR::KeyElement *genKeyElement(IR::ID match_kind);
22
23 virtual IR::Key *genKeyElementList(size_t len);
24
25 virtual IR::Property *genKeyProperty();
26
27 virtual IR::MethodCallExpression *genTableActionCall(cstring method_name,
28 const IR::ParameterList &params);
29
30 virtual IR::ActionList *genActionList(size_t len);
31
32 IR::Property *genActionListProperty();
33};
34
35} // namespace P4::P4Tools::P4Smith
36
37#endif /* BACKENDS_P4TOOLS_MODULES_SMITH_COMMON_TABLE_H_ */
Definition generator.h:10
Definition p4tools/modules/smith/core/target.h:17
Definition cstring.h:85
Definition id.h:28