P4C
The P4 Compiler
Loading...
Searching...
No Matches
tcAnnotations.h
1/*
2 * Copyright (C) 2023 Intel Corporation
3 * SPDX-FileCopyrightText: 2023 Intel Corporation
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8#ifndef BACKENDS_TC_TCANNOTATIONS_H_
9#define BACKENDS_TC_TCANNOTATIONS_H_
10
11#include "frontends/p4/parseAnnotations.h"
12#include "ir/ir.h"
13
14namespace P4::TC {
15
16class ParseTCAnnotations : public P4::ParseAnnotations {
17 public:
18 // TC specific annotations
19 static const cstring defaultHit;
20 static const cstring defaultHitConst;
21 static const cstring tcType;
22 static const cstring numMask;
23 static const cstring tcMayOverride;
24 static const cstring tc_md_write;
25 static const cstring tc_md_read;
26 static const cstring tc_md_exec;
27 static const cstring tc_ControlPath;
28 static const cstring tc_key;
29 static const cstring tc_data;
30 static const cstring tc_data_scalar;
31 static const cstring tc_init_val;
32 static const cstring tc_numel;
33 static const cstring tc_acl;
34 ParseTCAnnotations()
36 "TC", true,
37 {PARSE_EMPTY(defaultHit), PARSE_EMPTY(defaultHitConst), PARSE_STRING_LITERAL(tcType),
38 PARSE_CONSTANT_OR_STRING_LITERAL(numMask), PARSE_EMPTY(tcMayOverride),
39 PARSE_STRING_LITERAL(tc_acl), PARSE_EMPTY(tc_md_write), PARSE_EMPTY(tc_md_read),
40 PARSE_EMPTY(tc_md_write), PARSE_EMPTY(tc_md_exec), PARSE_EMPTY(tc_ControlPath),
41 PARSE_EMPTY(tc_key), PARSE_EMPTY(tc_data), PARSE_EMPTY(tc_data_scalar),
42 PARSE_EMPTY(tc_init_val), PARSE_EMPTY(tc_numel)}) {}
43};
44
45} // namespace P4::TC
46
47#endif /* BACKENDS_TC_TCANNOTATIONS_H_ */
Definition parseAnnotations.h:111
Definition cstring.h:85
This file defines functions for the pass to generate the introspection file.
Definition tc/backend.cpp:17