124 static constexpr int EXACT_GROUPS = 8;
125 static constexpr int EXACT_BYTES_PER_GROUP = 16;
126 static constexpr int HASH_TABLES = 16;
127 static constexpr int HASH_GROUPS = 8;
128 static constexpr int HASH_INDEX_GROUPS = 4;
129 static constexpr int HASH_SINGLE_BITS = 12;
130 static constexpr int HASH_PARITY_BIT = 51;
131 static constexpr int RAM_SELECT_BIT_START = 40;
132 static constexpr int RAM_LINE_SELECT_BITS = 10;
133 static constexpr int HASH_MATRIX_SIZE = RAM_SELECT_BIT_START + HASH_SINGLE_BITS;
134 static constexpr int HASH_DIST_SLICES = 3;
135 static constexpr int HASH_DIST_BITS = 16;
136 static constexpr int HASH_DIST_EXPAND_BITS = 7;
137 static constexpr int HASH_DIST_MAX_MASK_BITS = HASH_DIST_BITS + HASH_DIST_EXPAND_BITS;
138 static constexpr int HASH_DIST_UNITS = 2;
139 static constexpr int TOFINO_METER_ALU_BYTE_OFFSET = 8;
140 static constexpr int LPF_INPUT_BYTES = 4;
141 static constexpr int TERNARY_GROUPS = StageUse::MAX_TERNARY_GROUPS;
142 static constexpr int BYTE_GROUPS = StageUse::MAX_TERNARY_GROUPS / 2;
143 static constexpr int TERNARY_BYTES_PER_GROUP = 5;
144 static constexpr int TERNARY_BYTES_PER_BIG_GROUP = 11;
145 static constexpr int GATEWAY_SEARCH_BYTES = 4;
146 static constexpr int RESILIENT_MODE_HASH_BITS = 51;
147 static constexpr int FAIR_MODE_HASH_BITS = 14;
148 static constexpr int METER_ALU_HASH_BITS = 52;
149 static constexpr int METER_ALU_HASH_PARITY_BYTE_START = 48;
150 static constexpr int METER_PRECOLOR_SIZE = 2;
151 static constexpr int REPEATING_CONSTRAINT_SECT = 4;
152 static constexpr int MAX_HASH_BITS = 52;
154 P4::le_bitrange(RAM_SELECT_BIT_START, METER_ALU_HASH_BITS - 1);
155 static constexpr P4::le_bitrange INDEX_BIT_RANGE(
int group) {
156 return {group * RAM_LINE_SELECT_BITS, (group + 1) * RAM_LINE_SELECT_BITS - 1};
158 static constexpr int INDEX_RANGE_SUBGROUP(P4::le_bitrange r) {
159 return r.
lo / RAM_LINE_SELECT_BITS;
164 int byteGroups()
const override;
166 int hashDistMaxMaskBits()
const override;
168 int hashMatrixSize()
const override;
170 int ternaryGroups()
const override;
172 int exactBytesPerGroup()
const override;
173 int exactGroups()
const override;
174 int fairModeHashBits()
const override;
175 int gatewaySearchBytes()
const override;
176 int hashDistBits()
const override;
177 int hashDistExpandBits()
const override;
178 int hashDistSlices()
const override;
179 int hashDistUnits()
const override;
180 int hashGroups()
const override;
182 int hashIndexGroups()
const override;
185 int hashParityBit()
const override;
188 int hashSingleBits()
const override;
191 int hashTables()
const override;
192 int lpfInputBytes()
const override;
193 int maxHashBits()
const override;
194 int meterAluHashBits()
const override;
195 int meterAluHashParityByteStart()
const override;
196 int meterPrecolorSize()
const override;
197 int ramLineSelectBits()
const override;
198 int ramSelectBitStart()
const override;
199 int repeatingConstraintSect()
const override;
200 int resilientModeHashBits()
const override;
201 int ternaryBytesPerBigGroup()
const override;
202 int ternaryBytesPerGroup()
const override;
203 int tofinoMeterAluByteOffset()
const override;
206 int tcam_rows()
const override;
207 int tcam_columns()
const override;
209 int getExactOrdBase(
int group)
const override;
210 int getTernaryOrdBase(
int group)
const override;
212 int exactMatchTotalBytes()
const override;
213 int ternaryMatchTotalBytes()
const override;
214 int xcmpMatchTotalBytes()
const override;