P4C
The P4 Compiler
Loading...
Searching...
No Matches
ixbar_realign.h
1
19#ifndef BF_P4C_MAU_IXBAR_REALIGN_H_
20#define BF_P4C_MAU_IXBAR_REALIGN_H_
21
22#include <array>
23
24#include "backends/tofino/bf-p4c/mau/mau_visitor.h"
25#include "backends/tofino/bf-p4c/mau/resource.h"
26#include "lib/safe_vector.h"
27
28using namespace P4;
29
30class IXBarVerify : public MauModifier {
31 const PhvInfo &phv;
32 const IR::MAU::Table *currentTable = nullptr;
33 profile_t init_apply(const IR::Node *) override;
34 bool preorder(IR::Expression *) override { return false; }
35 void postorder(IR::MAU::Table *) override;
36 void verify_format(const IXBar::Use *);
37 class GetCurrentUse;
38 // Array of Map of Stage -> Input Xbar
39 // Tofino 1/2 only uses ixbar[0] for both ingress and egress.
40 std::map<int, std::unique_ptr<IXBar>> ixbar[2];
41
42 public:
43 explicit IXBarVerify(const PhvInfo &phv) : phv(phv) {}
44};
45
46#endif /* BF_P4C_MAU_IXBAR_REALIGN_H_ */
Definition ixbar_realign.cpp:25
Definition ixbar_realign.h:30
Definition mau_visitor.h:45
Definition node.h:94
Definition visitor.h:78
Definition phv_fields.h:1095
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24
Definition input_xbar.h:191