19#ifndef BF_P4C_PHV_MAU_BACKTRACKER_H_
20#define BF_P4C_PHV_MAU_BACKTRACKER_H_
22#include "backends/tofino/bf-p4c/mau/table_summary.h"
24#include "lib/ordered_map.h"
31 State::state_t &state;
32 static constexpr unsigned NUM_LOGICAL_TABLES_PER_STAGE = 16;
58 bool has_table_placement =
false;
64 bool metaInitDisable =
false;
67 bool ignorePackConflicts =
false;
70 bool firstRoundFit =
false;
83 bool backtrack(
trigger &)
override;
85 ordered_set<int> inSameStage(
const IR::MAU::Table *t1,
const IR::MAU::Table *t2,
91 ordered_set<int> inSameStage(
const IR::MAU::Table *t1,
const IR::MAU::Table *t2)
const;
110 bool happensBefore(
const IR::MAU::Table *t1,
const IR::MAU::Table *t2)
const;
120 return internalTables;
125 return mergedGateways;
137 : state(state), table_summary(table_summary) {}
Definition mau_backtracker.h:29
int numStages() const
Definition mau_backtracker.cpp:176
MauBacktracker(State::state_t &state= *(new State::state_t), TableSummary *table_summary=nullptr)
Definition mau_backtracker.h:135
bool hasTablePlacement() const
Definition mau_backtracker.cpp:139
const ordered_map< cstring, ordered_set< int > > & getInternalTablesInfo() const
Definition mau_backtracker.h:119
bool disableMetadataInitialization() const
Definition mau_backtracker.h:105
const ordered_map< cstring, std::pair< cstring, cstring > > & getMergedGatewaysInfo() const
Definition mau_backtracker.h:124
const TableSummary * get_table_summary() const
Definition mau_backtracker.h:116
bool didFirstRoundFit() const
Definition mau_backtracker.h:108
std::string printTableAlloc() const
Prints the table allocation received by MauBacktracker by means of the backtrack trigger.
Definition mau_backtracker.cpp:123
void clear()
Definition mau_backtracker.cpp:178
ordered_set< int > stage(const IR::MAU::Table *t, bool internal=false) const
Definition mau_backtracker.cpp:141
Definition ordered_map.h:32
Definition ordered_set.h:32
Definition table_summary.h:158