P4C
The P4 Compiler
Loading...
Searching...
No Matches
bf-asm/tofino/gateway.h
1
17
18#ifndef BACKENDS_TOFINO_BF_ASM_TOFINO_GATEWAY_H_
19#define BACKENDS_TOFINO_BF_ASM_TOFINO_GATEWAY_H_
20
21#include "backends/tofino/bf-asm/tables.h"
22
23class Target::Tofino::GatewayTable : public ::GatewayTable {
24 friend class ::GatewayTable;
25 GatewayTable(int line, const char *n, gress_t gr, Stage *s, int lid)
26 : ::GatewayTable(line, n, gr, s, lid) {}
27
28 void pass1() override;
29 void pass2() override;
30 void pass3() override;
31
32 bool check_match_key(MatchKey &, const std::vector<MatchKey> &, bool) override;
33 int gw_memory_unit() const override { return layout[0].row * 2 + gw_unit; }
34 REGSETS_IN_CLASS(Tofino, TARGET_OVERLOAD, void write_next_table_regs, (mau_regs &), override)
35};
36
37template <class REGS>
38void enable_gateway_payload_exact_shift_ovr(REGS &regs, int bus);
39template <>
40void enable_gateway_payload_exact_shift_ovr(Target::Tofino::mau_regs &regs, int bus);
41
42#endif /* BACKENDS_TOFINO_BF_ASM_TOFINO_GATEWAY_H_ */
Definition stage.h:123
Definition tofino/action_data_bus.cpp:28