P4C
The P4 Compiler
Loading...
Searching...
No Matches
tcAnnotations.h
1/*
2Copyright (C) 2023 Intel Corporation
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing,
11software distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions
14and limitations under the License.
15*/
16
17#ifndef BACKENDS_TC_TCANNOTATIONS_H_
18#define BACKENDS_TC_TCANNOTATIONS_H_
19
20#include "frontends/p4/parseAnnotations.h"
21#include "ir/ir.h"
22
23namespace P4::TC {
24
26 public:
27 // TC specific annotations
28 static const cstring defaultHit;
29 static const cstring defaultHitConst;
30 static const cstring tcType;
31 static const cstring numMask;
32 static const cstring tcMayOverride;
33 static const cstring tc_md_write;
34 static const cstring tc_md_read;
35 static const cstring tc_md_exec;
36 static const cstring tc_ControlPath;
37 static const cstring tc_key;
38 static const cstring tc_data;
39 static const cstring tc_data_scalar;
40 static const cstring tc_init_val;
41 static const cstring tc_numel;
42 static const cstring tc_acl;
45 "TC", true,
46 {PARSE_EMPTY(defaultHit), PARSE_EMPTY(defaultHitConst),
47 PARSE_CONSTANT_OR_STRING_LITERAL(tcType), PARSE_CONSTANT_OR_STRING_LITERAL(numMask),
48 PARSE_EMPTY(tcMayOverride), PARSE_CONSTANT_OR_STRING_LITERAL(tc_acl),
49 PARSE_EMPTY(tc_md_write), PARSE_EMPTY(tc_md_read), PARSE_EMPTY(tc_md_write),
50 PARSE_EMPTY(tc_md_exec), PARSE_EMPTY(tc_ControlPath), PARSE_EMPTY(tc_key),
51 PARSE_EMPTY(tc_data), PARSE_EMPTY(tc_data_scalar), PARSE_EMPTY(tc_init_val),
52 PARSE_EMPTY(tc_numel)}) {}
53};
54
55} // namespace P4::TC
56
57#endif /* BACKENDS_TC_TCANNOTATIONS_H_ */
Definition parseAnnotations.h:114
Definition tcAnnotations.h:25
Definition cstring.h:85
This file defines functions for the pass to generate the introspection file.
Definition tc/backend.cpp:24