P4C
The P4 Compiler
Loading...
Searching...
No Matches
add_metadata_pov.h
1
19#ifndef BF_P4C_PARDE_ADD_METADATA_POV_H_
20#define BF_P4C_PARDE_ADD_METADATA_POV_H_
21
22#include "backends/tofino/bf-p4c/phv/phv_fields.h"
23#include "ir/ir.h"
24
35class AddMetadataPOV : public Transform {
36 const PhvInfo &phv;
37 const IR::BFN::Deparser *dp = nullptr;
38
39 bool equiv(const IR::Expression *a, const IR::Expression *b);
40 static IR::MAU::Primitive *create_pov_write(const IR::Expression *povBit, bool validate);
41 IR::Node *insert_deparser_param_pov_write(const IR::MAU::Primitive *p, bool validate);
42 IR::Node *insert_deparser_digest_pov_write(const IR::MAU::Primitive *p, bool validate);
43 IR::Node *insert_field_pov_read(const IR::MAU::Primitive *p);
44
45 IR::BFN::Pipe *preorder(IR::BFN::Pipe *pipe) override;
46
47 IR::BFN::DeparserParameter *postorder(IR::BFN::DeparserParameter *param) override;
48 IR::BFN::Digest *postorder(IR::BFN::Digest *digest) override;
49 IR::Node *postorder(IR::MAU::Primitive *p) override;
50 IR::Node *postorder(IR::BFN::Extract *e) override;
51
52 public:
53 explicit AddMetadataPOV(PhvInfo &p) : phv(p) {}
54};
55
56#endif /* BF_P4C_PARDE_ADD_METADATA_POV_H_ */
Definition node.h:94
Definition visitor.h:424
Definition phv_fields.h:1095
Create POV bits for output metadata (JBAY)
Definition add_metadata_pov.h:35