30 static int get_meter_alu_hash_bits() {
32 if (!BackendOptions().disable_gfm_parity)
return TofinoIXBarSpec::METER_ALU_HASH_BITS - 1;
33 return TofinoIXBarSpec::METER_ALU_HASH_BITS;
36 static int get_hash_single_bits() {
37 static bool disable_gfm_parity = BackendOptions().disable_gfm_parity;
39 if (!disable_gfm_parity)
return TofinoIXBarSpec::HASH_SINGLE_BITS - 1;
40 return TofinoIXBarSpec::HASH_SINGLE_BITS;
44 static int get_hash_matrix_size() {
45 return TofinoIXBarSpec::RAM_SELECT_BIT_START + get_hash_single_bits();
48 static int get_max_hash_bits() {
50 if (!BackendOptions().disable_gfm_parity)
return TofinoIXBarSpec::MAX_HASH_BITS - 1;
51 return TofinoIXBarSpec::MAX_HASH_BITS;
54 using Loc = ::IXBar::Loc;
55 using byte_speciality_t = ::IXBar::byte_speciality_t;
57 static constexpr auto NONE = ::IXBar::NONE;
58 static constexpr auto ATCAM_DOUBLE = ::IXBar::ATCAM_DOUBLE;
59 static constexpr auto ATCAM_INDEX = ::IXBar::ATCAM_INDEX;
60 static constexpr auto RANGE_LO = ::IXBar::RANGE_LO;
61 static constexpr auto RANGE_HI = ::IXBar::RANGE_HI;
62 static constexpr auto BYTE_SPECIALITIES = ::IXBar::BYTE_SPECIALITIES;
64 using FieldInfo = ::IXBar::FieldInfo;
65 using parity_status_t = ::IXBar::parity_status_t;
67 static constexpr auto PARITY_NONE = ::IXBar::PARITY_NONE;
68 static constexpr auto PARITY_ENABLED = ::IXBar::PARITY_ENABLED;
69 static constexpr auto PARITY_DISABLED = ::IXBar::PARITY_DISABLED;
75 TofinoIXBarSpec::EXACT_BYTES_PER_GROUP>
78 TofinoIXBarSpec::TERNARY_BYTES_PER_GROUP>
82 if (ternary)
return ternary_use;
86 std::multimap<PHV::Container, Loc> exact_fields;
87 std::multimap<PHV::Container, Loc> ternary_fields;
88 std::multimap<PHV::Container, Loc> &fields(
bool ternary) {
89 return ternary ? ternary_fields : exact_fields;
93 std::map<PHV::Container, std::set<cstring>> field_users;
98 unsigned hash_index_inuse[TofinoIXBarSpec::HASH_INDEX_GROUPS] = {0};
103 unsigned hash_single_bit_inuse[TofinoIXBarSpec::HASH_SINGLE_BITS] = {0};
105 unsigned hash_group_use[TofinoIXBarSpec::HASH_GROUPS] = {0};
108 bitvec hash_dist_inuse[TofinoIXBarSpec::HASH_TABLES] = {
bitvec()};
110 TofinoIXBarSpec::HASH_DIST_SLICES * TofinoIXBarSpec::HASH_DIST_BITS>
112 bitvec hash_dist_bit_inuse[TofinoIXBarSpec::HASH_TABLES] = {
bitvec()};
113 parity_status_t hash_group_parity_use[TofinoIXBarSpec::HASH_GROUPS] = {PARITY_NONE};
116 bitvec hash_used_per_function[TofinoIXBarSpec::HASH_GROUPS] = {
bitvec()};
118 int hash_dist_groups[TofinoIXBarSpec::HASH_DIST_UNITS] = {-1, -1};
119 friend class IXBarRealign;
126 get_byte_group_use() {
127 return byte_group_use;
131 unsigned toIXBarOutputByte(
bool ternary,
int group,
int byte) {
134 unsigned mid_byte_count = (group / 2) + (group % 2);
135 offset = (group / 2) * 10 + (group % 2) * 5 +
byte + mid_byte_count;
137 offset = group * 16 + byte;
143 std::set<cstring> dleft_updates;
146 using byte_type_t = ::IXBar::byte_type_t;
148 static constexpr auto NO_BYTE_TYPE = ::IXBar::NO_BYTE_TYPE;
149 static constexpr auto ATCAM = ::IXBar::ATCAM;
150 static constexpr auto PARTITION_INDEX = ::IXBar::PARTITION_INDEX;
151 static constexpr auto RANGE = ::IXBar::RANGE;
152 using HashDistDest_t = ::IXBar::HashDistDest_t;
154 static constexpr auto HD_IMMED_LO = ::IXBar::HD_IMMED_LO;
155 static constexpr auto HD_IMMED_HI = ::IXBar::HD_IMMED_HI;
156 static constexpr auto HD_STATS_ADR = ::IXBar::HD_STATS_ADR;
157 static constexpr auto HD_METER_ADR = ::IXBar::HD_METER_ADR;
158 static constexpr auto HD_ACTIONDATA_ADR = ::IXBar::HD_ACTIONDATA_ADR;
159 static constexpr auto HD_PRECOLOR = ::IXBar::HD_PRECOLOR;
160 static constexpr auto HD_HASHMOD = ::IXBar::HD_HASHMOD;
161 static constexpr auto HD_DESTS = ::IXBar::HD_DESTS;
164 bool gw_search_bus =
false;
165 int gw_search_bus_bytes = 0;
166 bool gw_hash_group =
false;
167 parity_status_t parity = PARITY_NONE;
169 bool search_data()
const {
return gw_search_bus || gw_hash_group; }
170 bool is_parity_enabled()
const override {
return parity == PARITY_ENABLED; }
172 HashDistDest_t hash_dist_type = HD_DESTS;
173 std::string hash_dist_used_for()
const override {
174 return IXBar::hash_dist_name(hash_dist_type);
178 unsigned hash_table_inputs[TofinoIXBarSpec::HASH_GROUPS] = {0};
180 bitvec hash_seed[TofinoIXBarSpec::HASH_GROUPS];
189 Bits(
cstring f,
int g,
int l,
int b,
int w)
190 : field(f), group(g), lo(l), bit(b), width(w), valid(
false) {}
191 Bits(
cstring f,
int g,
int l,
int b,
int w,
bool v)
192 : field(f), group(g), lo(l), bit(b), width(w), valid(v) {}
193 int hi()
const {
return lo + width - 1; }
199 bool allocated =
false;
203 std::map<int, const IR::Expression *> computed_expressions;
210 computed_expressions.clear();
213 const std::map<int, const IR::Expression *> &hash_computed_expressions()
const override {
214 return meter_alu_hash.computed_expressions;
219 bool allocated =
false;
221 bitvec galois_matrix_bits;
223 std::map<int, le_bitrange> galois_start_bit_to_p4_hash;
224 const IR::Expression *hash_gen_expr =
nullptr;
230 galois_matrix_bits.clear();
231 galois_start_bit_to_p4_hash.clear();
234 int hash_dist_hash_group()
const override {
return hash_dist_hash.group; }
237 bool allocated =
false;
247 } proxy_hash_key_use;
250 unsigned data_bytemask = 0;
251 unsigned hash_bytemask = 0;
253 void clear() { data_bytemask = hash_bytemask = 0; }
254 bool empty()
const {
return !data_bytemask && !hash_bytemask; }
261 void clear()
override {
262 ::IXBar::Use::clear();
263 gw_search_bus =
false;
264 gw_search_bus_bytes = 0;
265 gw_hash_group =
false;
266 parity = PARITY_NONE;
267 hash_dist_type = HD_DESTS;
268 for (
auto &ht : hash_table_inputs) ht = 0;
269 for (
auto &hs : hash_seed) hs.clear();
271 meter_alu_hash.clear();
272 hash_dist_hash.clear();
273 proxy_hash_key_use.clear();
274 salu_input_source.clear();
275 field_list_order.clear();
277 Use *clone()
const override {
return new Use(*
this); }
278 bool empty()
const override {
279 return ::IXBar::Use::empty() && bit_use.empty() && !meter_alu_hash.allocated &&
280 !hash_dist_hash.allocated && !proxy_hash_key_use.allocated &&
281 salu_input_source.empty();
283 void dbprint(std::ostream &)
const override;
285 void add(
const Use &alloc);
288 unsigned compute_hash_tables()
override;
290 const IR::MAU::Table *)
const override {
293 void emit_ixbar_asm(
const PhvInfo &phv, std::ostream &out, indent_t indent,
294 const TableMatch *fmt,
const IR::MAU::Table *)
const override;
295 void emit_salu_bytemasks(std::ostream &out, indent_t indent)
const override;
296 void emit_ixbar_hash_table(
int hash_table, safe_vector<Slice> &match_data,
297 safe_vector<Slice> &ghost,
const TableMatch *fmt,
298 std::map<
int, std::map<int, Slice>> &sort)
const override;
299 bitvec galois_matrix_bits()
const override {
return hash_dist_hash.galois_matrix_bits; }
300 int hash_groups()
const override;
301 TotalBytes
match_hash(safe_vector<int> *hash_groups =
nullptr)
const override;
302 bitvec meter_bit_mask()
const override {
return meter_alu_hash.bit_mask; }
303 int ternary_align(
const Loc &)
const override;
304 int total_input_bits()
const override {
306 for (
auto fl : field_list_order) {
307 rv += fl->type->width_bits();
311 void update_resources(
int, BFN::Resources::StageResources &)
const override;
312 const char *way_source_kind()
const override {
return "group"; }
314 static Use &getUse(autoclone_ptr<::IXBar::Use> &ac);
315 static const Use &getUse(
const autoclone_ptr<::IXBar::Use> &ac);
326 struct HashDistAllocPostExpand {
328 le_bitrange bits_in_use;
332 const IR::MAU::HashDist *created_hd;
336 bool chained_addr =
false;
337 bitvec possible_shifts()
const;
340 HashDistAllocPostExpand(
P4HashFunction *f, le_bitrange b, HashDistDest_t d,
int s)
341 : func(f), bits_in_use(b), dest(d), shift(s) {}
342 bool operator<(
const HashDistAllocPostExpand &hd)
const {
343 return std::tie(dest, shift, bits_in_use, chained_addr) <
344 std::tie(hd.dest, hd.shift, hd.bits_in_use, hd.chained_addr);
350 le_bitrange p4_hash_range;
353 const IR::MAU::HashDist *created_hd =
nullptr;
355 bool is_dynamic()
const {
return !dyn_hash_name.isNull(); }
368 std::set<cstring> outputs;
370 int hash_group()
const;
371 bitvec destinations()
const;
372 bitvec galois_matrix_bits()
const;
375 std::string used_for()
const;
379 ir_allocations.clear();
390 static unsigned hash_table_inputs(
const HashDistUse &hdu);
396 const IR::MAU::Table *tbl;
401 const attached_entries_t &attached_entries;
403 void build_action_data_req(
const IR::MAU::HashDist *hd);
404 void build_req(
const IR::MAU::HashDist *hd,
const IR::Node *rel_node,
405 bool created_hd =
false);
407 void build_function(
const IR::MAU::HashDist *hd,
P4HashFunction **func,
408 le_bitrange *bits =
nullptr);
409 bool preorder(
const IR::MAU::HashDist *)
override;
410 bool preorder(
const IR::MAU::TableSeq *)
override {
return false; }
411 bool preorder(
const IR::MAU::AttachedOutput *)
override {
return false; }
412 bool preorder(
const IR::MAU::StatefulCall *)
override {
return false; }
415 void immediate_inputs();
417 bool allocate_hash_dist();
418 XBarHashDist(IXBar &s,
const PhvInfo &p,
const IR::MAU::Table *t,
419 const ActionData::Format::Use *a,
const LayoutOption *l, TableResourceAlloc *r,
420 const attached_entries_t &ae)
421 : self(s), phv(p), tbl(t), af(a), lo(l), resources(r), attached_entries(ae) {}
425 enum AvailBytesPerRepeatingSect_t { AV_FULL = 1, AV_HALF = 2, AV_BYTE = 4 };
428 struct grp_use :
public IHasDbPrint {
429 enum type_t { MATCH, HASH_DIST, FREE };
451 std::array<bitvec, TofinoIXBarSpec::REPEATING_CONSTRAINT_SECT> _free = {{bitvec()}};
452 bitvec free(bitvec can_use)
const {
454 for (
auto bit : can_use) rv |= _free.at(bit);
458 bitvec max_free()
const {
459 return free(bitvec(0, TofinoIXBarSpec::REPEATING_CONSTRAINT_SECT));
461 bool attempted =
false;
462 bool hash_open[2] = {
true,
true};
463 type_t hash_table_type[2] = {FREE, FREE};
464 int range_index = -1;
466 bool hash_dist_avail(
int ht)
const {
467 return hash_table_type[ht] == HASH_DIST || hash_table_type[ht] == FREE;
470 bool hash_dist_only(
int ht)
const {
return hash_table_type[ht] == HASH_DIST; }
472 void dbprint(std::ostream &out)
const {
473 out << group <<
" found: 0x" << found <<
" free: 0x" << max_free();
476 int total_avail()
const {
return found.popcount() + max_free().popcount(); }
477 bool range_set()
const {
return range_index != -1; }
479 bool is_better_group(
const grp_use &b,
bool prefer_found,
int required_allocation_bytes,
480 std::map<int, int> &constraints_to_reqs)
const;
481 explicit grp_use(
int g) : group(g) {}
484 using mid_byte_use = grp_use;
487 struct hash_matrix_reqs {
490 int max_search_buses = -1;
491 int index_groups = 0;
493 bool hash_dist =
false;
494 bool requires_versioning =
false;
496 static hash_matrix_reqs max(
bool hd,
bool ternary =
false) {
498 if (ternary)
return rv;
501 rv.index_groups = TofinoIXBarSpec::HASH_DIST_SLICES;
503 rv.index_groups = TofinoIXBarSpec::HASH_INDEX_GROUPS;
504 rv.select_bits = IXBar::get_hash_single_bits();
509 bool fit_requirements(
bitvec hash_matrix_in_use)
const;
511 hash_matrix_reqs() {}
512 hash_matrix_reqs(
int ig,
int sb,
bool hd)
513 : index_groups(ig), select_bits(sb), hash_dist(hd) {}
525 std::map<cstring, bitvec> fields_needed;
526 const IR::MAU::Table *tbl;
528 profile_t init_apply(
const IR::Node *root)
override;
529 bool preorder(
const IR::MAU::StatefulAlu *)
override;
530 bool preorder(
const IR::MAU::SaluAction *)
override;
531 bool preorder(
const IR::Expression *e)
override;
532 bool preorder(
const IR::MAU::HashDist *)
override;
533 bool preorder(
const IR::MAU::IXBarExpression *)
override;
535 bool preorder(
const IR::Annotation *)
override {
return false; }
536 bool preorder(
const IR::Declaration_Instance *)
override {
return false; }
537 bool preorder(
const IR::MAU::Selector *)
override {
return false; }
539 static void collapse_contained(std::map<le_bitrange, const IR::Expression *> &m);
543 safe_vector<const IR::Expression *> &flo,
const IR::MAU::Table *t)
544 : phv(phv), map_alloc(ma), field_list_order(flo), tbl(t) {}
546 ordered_map<const PHV::Field *, std::map<le_bitrange, const IR::Expression *>> phv_sources;
547 std::vector<const IR::MAU::IXBarExpression *> hash_sources;
552 bool allocMatch(
bool ternary,
const IR::MAU::Table *tbl,
const PhvInfo &phv,
Use &alloc,
554 bool allocPartition(
const IR::MAU::Table *tbl,
const PhvInfo &phv,
Use &alloc,
bool second_try);
555 int getHashGroup(
unsigned hash_table_input,
const hash_matrix_reqs *hm_reqs =
nullptr);
556 void getHashDistGroups(
unsigned hash_table_input,
557 int hash_group_opt[TofinoIXBarSpec::HASH_DIST_UNITS]);
558 bool allocProxyHash(
const IR::MAU::Table *tbl,
const PhvInfo &phv,
const LayoutOption *lo,
559 Use &alloc,
Use &proxy_hash_alloc);
560 bool allocProxyHashKey(
const IR::MAU::Table *tbl,
const PhvInfo &phv,
const LayoutOption *lo,
563 bool allocAllHashWays(
bool ternary,
const IR::MAU::Table *tbl,
Use &alloc,
564 const LayoutOption *layout_option,
size_t start,
size_t last,
566 bool allocHashWay(
const IR::MAU::Table *tbl,
const LayoutOption *layout_option,
size_t index,
567 std::map<int, bitvec> &slice_to_select_bits,
Use &alloc,
568 unsigned local_hash_table_input,
unsigned hf_hash_table_input,
570 bool allocGateway(
const IR::MAU::Table *,
const PhvInfo &phv,
Use &alloc,
571 const LayoutOption *lo,
bool second_try);
572 bool allocSelector(
const IR::MAU::Selector *,
const IR::MAU::Table *,
const PhvInfo &phv,
573 Use &alloc, cstring name);
574 bool allocStateful(
const IR::MAU::StatefulAlu *,
const IR::MAU::Table *,
const PhvInfo &phv,
575 Use &alloc,
bool on_search_bus);
576 bool allocMeter(
const IR::MAU::Meter *,
const IR::MAU::Table *,
const PhvInfo &phv,
Use &alloc,
579 bool allocTable(
const IR::MAU::Table *tbl,
const PhvInfo &phv, TableResourceAlloc &alloc,
580 const LayoutOption *lo,
const ActionData::Format::Use *af,
581 const attached_entries_t &ae);
582 bool allocTable(
const IR::MAU::Table *tbl,
const IR::MAU::Table *gw,
const PhvInfo &phv,
583 TableResourceAlloc &alloc,
const LayoutOption *lo,
584 const ActionData::Format::Use *af,
const attached_entries_t &ae)
override;
586 void update(cstring name, const ::IXBar::Use &alloc)
override;
587 void update(cstring name,
const HashDistUse &hash_dist_alloc);
588 void update(
const IR::MAU::Table *tbl,
const TableResourceAlloc *rsrc)
override;
589 void update(
const IR::MAU::Table *tbl)
override;
590 void add_collisions()
override;
591 void verify_hash_matrix()
const override;
592 void dbprint(std::ostream &)
const override;
594 const Loc *findExactByte(PHV::Container c,
int byte)
const {
595 for (
auto &p : Values(exact_fields.equal_range(c)))
596 if (exact_use.at(p.group, p.byte).second / 8 ==
byte)
return &p;
600 unsigned find_balanced_group(
Use &alloc,
int way_size);
603 bool find_alloc(safe_vector<IXBar::Use::Byte> &alloc_use,
bool ternary,
605 unsigned byte_mask = ~0U);
608 bitvec can_use_from_flags(
int flags)
const;
609 int groups(
bool ternary)
const;
610 int mid_bytes(
bool ternary)
const;
611 int bytes_per_group(
bool ternary)
const;
613 void increase_ternary_ixbar_space(
int &groups_needed,
int &nibbles_needed,
614 bool requires_versioning);
615 bool calculate_sizes(safe_vector<Use::Byte> &alloc_use,
bool ternary,
int &total_bytes_needed,
616 int &groups_needed,
int &mid_bytes_needed,
bool requires_versioning);
617 void initialize_orders(safe_vector<grp_use> &order, safe_vector<mid_byte_use> &mid_byte_order,
619 void setup_byte_vectors(safe_vector<Use::Byte> &alloc_use,
bool ternary,
620 safe_vector<Use::Byte *> &unalloced, safe_vector<Use::Byte *> &alloced,
621 safe_vector<grp_use> &order, safe_vector<mid_byte_use> &mid_byte_order,
624 void print_groups(safe_vector<grp_use> &order, safe_vector<mid_byte_use> &mid_byte_order,
626 void fill_out_use(safe_vector<IXBar::Use::Byte *> &alloced,
bool ternary);
627 void calculate_available_groups(safe_vector<grp_use> &order,
hash_matrix_reqs &hm_reqs);
628 void calculate_available_hash_dist_groups(safe_vector<grp_use> &order,
630 grp_use::type_t is_group_for_hash_dist(
int hash_table);
631 bool violates_hash_constraints(safe_vector<grp_use> &order,
bool hash_dist,
int group,
633 void reset_orders(safe_vector<grp_use> &order, safe_vector<mid_byte_use> &mid_byte_order);
634 void calculate_found(safe_vector<Use::Byte *> &unalloced, safe_vector<grp_use> &order,
635 safe_vector<mid_byte_use> &mid_byte_order,
bool ternary,
bool hash_dist,
637 void calculate_free(safe_vector<grp_use> &order, safe_vector<mid_byte_use> &mid_byte_order,
638 bool ternary,
bool hash_dist,
unsigned byte_mask);
639 void found_bytes(grp_use *grp, safe_vector<IXBar::Use::Byte *> &unalloced,
bool ternary,
640 int &match_bytes_placed,
int search_bus);
641 void found_mid_bytes(mid_byte_use *mb_grp, safe_vector<Use::Byte *> &unalloced,
bool ternary,
642 int &match_bytes_placed,
int search_bus,
bool &prefer_half_bytes,
643 bool only_alloc_nibble);
644 void free_bytes(grp_use *grp, safe_vector<Use::Byte *> &unalloced,
645 safe_vector<Use::Byte *> &alloced,
bool ternary,
bool hash_dist,
646 int &match_bytes_placed,
int search_bus);
647 void free_mid_bytes(mid_byte_use *mb_grp, safe_vector<Use::Byte *> &unalloced,
648 safe_vector<Use::Byte *> &alloced,
int &match_bytes_placed,
int search_bus,
649 bool &prefer_half_bytes,
bool only_alloc_nibble);
650 void allocate_byte(bitvec *bv, safe_vector<IXBar::Use::Byte *> &unalloced,
651 safe_vector<IXBar::Use::Byte *> *alloced, IXBar::Use::Byte &need,
int group,
652 int byte,
size_t &index,
int &free_bytes,
int &ixbar_bytes_placed,
653 int &match_bytes_placed,
int search_bus,
int *range_index);
654 void allocate_mid_bytes(safe_vector<Use::Byte *> &unalloced, safe_vector<Use::Byte *> &alloced,
655 bool ternary,
bool prefer_found, safe_vector<grp_use> &order,
656 safe_vector<mid_byte_use> &mid_byte_order,
int nibbles_needed,
657 int &bytes_to_allocate);
659 int determine_best_group(safe_vector<Use::Byte *> &unalloced, safe_vector<grp_use> &order,
660 bool ternary,
bool prefer_found,
int required_allocation_bytes);
662 void allocate_groups(safe_vector<Use::Byte *> &unalloced, safe_vector<Use::Byte *> &alloced,
663 bool ternary,
bool prefer_found, safe_vector<grp_use> &order,
664 safe_vector<mid_byte_use> &mid_byte_order,
int &bytes_to_allocate,
665 int groups_needed,
bool hash_dist,
unsigned byte_mask);
666 bool handle_pragma_ixbar_group_num(safe_vector<Use::Byte *> &unalloced,
667 safe_vector<Use::Byte *> &alloced,
bool ternary,
668 safe_vector<grp_use> &order,
669 safe_vector<mid_byte_use> &mid_byte_order,
670 int &bytes_to_allocate,
bool hash_dist,
unsigned byte_mask,
673 hash_matrix_reqs match_hash_reqs(
const LayoutOption *lo,
size_t start,
size_t end,
675 void layout_option_calculation(
const LayoutOption *layout_option,
size_t &start,
size_t &last);
677 int max_bit_to_byte(bitvec bit_mask);
678 int max_index_group(
int max_bit);
679 int max_index_single_bit(
int max_bit);
680 unsigned index_groups_used(bitvec bv)
const;
681 unsigned select_bits_used(bitvec bv)
const;
682 bool hash_use_free(
int max_group,
int max_single_bit,
unsigned hash_table_input);
683 void write_hash_use(
int max_group,
int max_single_bit,
unsigned hash_table_input, cstring name);
684 bool can_allocate_on_search_bus(
Use &alloc,
const PHV::Field *field, le_bitrange range,
686 bool setup_stateful_search_bus(
const IR::MAU::StatefulAlu *salu,
Use &alloc,
687 const FindSaluSources &sources,
unsigned &byte_mask);
688 bool setup_stateful_hash_bus(
const PhvInfo &,
const IR::MAU::StatefulAlu *salu,
Use &alloc,
689 const FindSaluSources &sources);
691 bitvec determine_final_xor(
const IR::MAU::HashFunction *hf,
const PhvInfo &phv,
692 std::map<int, le_bitrange> &bit_starts,
693 safe_vector<const IR::Expression *> field_list,
694 int total_input_bits);
695 void determine_proxy_hash_alg(
const PhvInfo &,
const IR::MAU::Table *tbl,
Use &use,
int group);
697 bool isHashDistAddress(HashDistDest_t dest)
const;
699 void determineHashDistInUse(
int hash_group, bitvec &units_in_use, bitvec &hash_bits_in_use);
701 IXBar::Use &all_reqs,
const PhvInfo &phv,
int hash_group,
702 bitvec hash_bits_used, bitvec total_post_expand_bits,
703 const IR::MAU::Table *tbl, cstring name);
704 void lockInHashDistArrays(safe_vector<Use::Byte *> *alloced,
int hash_group,
705 unsigned hash_table_input,
int asm_unit, bitvec hash_bits_used,
706 HashDistDest_t dest, cstring name);
708 bool allocHashDistSection(bitvec post_expand_bits, bitvec possible_shifts,
int hash_group,
709 int &unit_allocated, bitvec &hash_bits_allocated);
710 bool allocHashDistWideAddress(bitvec post_expand_bits, bitvec possible_shifts,
int hash_group,
711 bool chained_addr,
int &unit_allocated,
712 bitvec &hash_bits_allocated);
713 bool allocHashDist(safe_vector<HashDistAllocPostExpand> &alloc_reqs,
HashDistUse &use,
714 const PhvInfo &phv, cstring name,
const IR::MAU::Table *tbl,
718 void update_hash_parity(IXBar::Use &use,
int hash_group);
719 parity_status_t update_hash_parity(
int hash_group);