19#ifndef BF_P4C_MAU_ASM_HASH_OUTPUT_H_
20#define BF_P4C_MAU_ASM_HASH_OUTPUT_H_
29#include "action_data_bus.h"
30#include "backends/tofino/bf-p4c/common/alias.h"
31#include "backends/tofino/bf-p4c/common/ir_utils.h"
32#include "backends/tofino/bf-p4c/common/slice.h"
33#include "backends/tofino/bf-p4c/ir/tofino_write_context.h"
34#include "backends/tofino/bf-p4c/lib/error_type.h"
35#include "backends/tofino/bf-p4c/mau/asm_format_hash.h"
36#include "backends/tofino/bf-p4c/mau/asm_output.h"
37#include "backends/tofino/bf-p4c/mau/gateway.h"
38#include "backends/tofino/bf-p4c/mau/jbay_next_table.h"
39#include "backends/tofino/bf-p4c/mau/payload_gateway.h"
40#include "backends/tofino/bf-p4c/mau/resource.h"
41#include "backends/tofino/bf-p4c/mau/table_format.h"
42#include "backends/tofino/bf-p4c/parde/asm_output.h"
43#include "backends/tofino/bf-p4c/parde/phase0.h"
44#include "backends/tofino/bf-p4c/phv/asm_output.h"
45#include "boost/range/adaptor/reversed.hpp"
46#include "lib/algorithm.h"
47#include "lib/bitops.h"
48#include "lib/bitrange.h"
50#include "lib/indent.h"
51#include "lib/stringref.h"
55void emit_ixbar_gather_map(
const PhvInfo &phv, std::multimap<int, Slice> &match_data_map,
56 std::map<le_bitrange, const IR::Constant *> &constant_map,
68 bool preorder(
const IR::Concat *c)
override;
69 bool preorder(
const IR::BFN::SignExtend *c)
override;
70 bool preorder(
const IR::Constant *)
override;
71 bool preorder(
const IR::Expression *e)
override;
72 bool preorder(
const IR::MAU::HashGenExpression *hge)
override;
77 : phv(phv), out(out), indent(indent), bit(bit), match_data(match_data) {}
83 const ::IXBar::Use *use,
int hash_group);
84void ixbar_hash_exact_bitrange(
Slice ghost_slice,
int min_way_size,
le_bitrange non_rotated_slice,
86 safe_vector<std::pair<le_bitrange, Slice>> &ghost_positions);
87void ixbar_hash_exact_info(
int &min_way_size,
int &min_way_slice, const ::IXBar::Use *use,
88 int hash_group, std::map<int, bitvec> &slice_to_select_bits);
91 int &ident_bits_prev_alloc);
92void emit_ixbar_gather_map(
const PhvInfo &phv, std::multimap<int, Slice> &match_data_map,
93 std::map<le_bitrange, const IR::Constant *> &constant_map,
98 std::map<
int, std::map<int, Slice>> &sort,
99 std::map<
int, std::map<int, Slice>> &midbytes,
100 const IR::MAU::Table *tbl,
bool ternary,
bool atcam =
false);
103 std::map<
int, std::map<int, Slice>> &sort);
Definition asm_hash_output.h:61
Definition ltbitmatrix.h:25
Definition safe_vector.h:27
Definition phv_fields.h:1095
Definition common/asm_output.h:47
Definition mau/asm_output.h:223
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24