P4C
The P4 Compiler
Toggle main menu visibility
Main Page
P4C Repository Organization
Getting Started
P4C Intermediate Representation (IR)
Frontend
Midend
Backends
Behavioral Model Backend
DPDK Backend
eBPF Backend
TC Backend
uBPF Backend
P4test Backend
Graphs Backend
p4fmt (P4 Formatter)
P4Tools
P4Smith
P4Testgen
Contribute to the P4 Compiler Project
Releases
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
w
x
z
Functions
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
w
x
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Typedefs
Enumerations
Enumerator
Related Symbols
►
P4 Compiler Documentation (P4C)
•
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
Loading...
Searching...
No Matches
p4tools/modules/smith/core/target.h
1
#ifndef BACKENDS_P4TOOLS_MODULES_SMITH_CORE_TARGET_H_
2
#define BACKENDS_P4TOOLS_MODULES_SMITH_CORE_TARGET_H_
3
4
#include <ostream>
5
#include <string>
6
7
#include "backends/p4tools/common/compiler/compiler_target.h"
8
#include "backends/p4tools/modules/smith/common/declarations.h"
9
#include "backends/p4tools/modules/smith/common/expressions.h"
10
#include "backends/p4tools/modules/smith/common/parser.h"
11
#include "backends/p4tools/modules/smith/common/statements.h"
12
#include "backends/p4tools/modules/smith/common/table.h"
13
#include "ir/ir.h"
14
15
namespace
P4::P4Tools::P4Smith {
16
17
class
SmithTarget :
public
CompilerTarget {
18
public
:
20
static
const
SmithTarget &
get
();
21
24
[[nodiscard]]
virtual
int
writeTargetPreamble
(std::ostream *ostream)
const
= 0;
25
26
[[nodiscard]]
virtual
const
IR::P4Program *generateP4Program()
const
= 0;
27
28
[[nodiscard]]
virtual
DeclarationGenerator
&declarationGenerator()
const
= 0;
29
[[nodiscard]]
virtual
ExpressionGenerator
&expressionGenerator()
const
= 0;
30
[[nodiscard]]
virtual
StatementGenerator
&statementGenerator()
const
= 0;
31
[[nodiscard]]
virtual
ParserGenerator
&parserGenerator()
const
= 0;
32
[[nodiscard]]
virtual
TableGenerator
&tableGenerator()
const
= 0;
33
34
[[nodiscard]]
ICompileContext
*
makeContext
()
const override
;
35
36
protected
:
37
explicit
SmithTarget(
const
std::string &deviceName,
const
std::string &archName);
38
39
private
:
40
};
17
class
SmithTarget :
public
CompilerTarget {
…
};
41
42
}
// namespace P4::P4Tools::P4Smith
43
44
#endif
/* BACKENDS_P4TOOLS_MODULES_SMITH_CORE_TARGET_H_ */
P4::ICompileContext
Definition
compile_context.h:32
P4::P4Tools::P4Smith::DeclarationGenerator
Definition
declarations.h:13
P4::P4Tools::P4Smith::ExpressionGenerator
Definition
common/expressions.h:48
P4::P4Tools::P4Smith::ParserGenerator
Definition
p4tools/modules/smith/common/parser.h:12
P4::P4Tools::P4Smith::SmithTarget::writeTargetPreamble
virtual int writeTargetPreamble(std::ostream *ostream) const =0
P4::P4Tools::P4Smith::SmithTarget::makeContext
ICompileContext * makeContext() const override
Definition
p4tools/modules/smith/core/target.cpp:15
P4::P4Tools::P4Smith::SmithTarget::get
static const SmithTarget & get()
Definition
p4tools/modules/smith/core/target.cpp:19
P4::P4Tools::P4Smith::StatementGenerator
Definition
statements.h:10
P4::P4Tools::P4Smith::TableGenerator
Definition
table.h:11
backends
p4tools
modules
smith
core
target.h
Generated by
1.13.0