|
| FieldSliceExtractInfo (const ordered_map< const IR::BFN::ParserState *, unsigned > &state_bit_offsets, const std::map< unsigned, ordered_map< const IR::BFN::ParserState *, unsigned > > &stack_offset_state_bit_offsets, int min_packet_bit_offset, int max_packet_bit_offset, const PHV::Field *field) |
|
| FieldSliceExtractInfo (const ordered_map< const IR::BFN::ParserState *, unsigned > &state_bit_offsets, const std::map< unsigned, ordered_map< const IR::BFN::ParserState *, unsigned > > &stack_offset_state_bit_offsets, int min_packet_bit_offset, int max_packet_bit_offset, const PHV::FieldSlice *slice) |
|
const std::map< unsigned, StatePairSet > | bit_gaps (const CollectParserInfo &parserInfo, const FieldSliceExtractInfo *other) const |
|
unsigned | bit_in_byte_offset () const |
|
const std::map< unsigned, StatePairSet > | byte_gaps (const CollectParserInfo &parserInfo, const FieldSliceExtractInfo *other) const |
|
int | max_packet_bit_offset () const |
|
int | min_packet_bit_offset () const |
|
std::vector< const FieldSliceExtractInfo * > * | remove_conflicts (const CollectParserInfo &parserInfo, int preGapBits, const ClotCandidate *candidate, int postGapBits) const |
|
const PHV::FieldSlice * | slice () const |
|
unsigned | state_bit_offset (const IR::BFN::ParserState *state) const |
|
const ordered_map< const IR::BFN::ParserState *, unsigned > & | state_bit_offsets () const |
|
ordered_set< const IR::BFN::ParserState * > | states () const |
|
const FieldSliceExtractInfo * | trim (int lo_idx, int bits) const |
|
const FieldSliceExtractInfo * | trim_head_to_byte () const |
| Trims the start of the extract so that it is byte-aligned.
|
|
const FieldSliceExtractInfo * | trim_head_to_min_clot_pos () const |
| Trims the start of the extract so that it does not extend past the minimum CLOT position.
|
|
const FieldSliceExtractInfo * | trim_tail_to_byte () const |
| Trims the end of the extract so that it is byte-aligned.
|
|
const FieldSliceExtractInfo * | trim_tail_to_max_clot_pos () const |
| Trims the end of the extract so that it does not extend past the maximum CLOT position.
|
|
void | update (const IR::BFN::ParserState *state, unsigned stack_offset, unsigned state_bit_offset, int min_packet_bit_offset, int max_packet_bit_offset) |
|
Holds information relating to a field slice's extract.
Produces a map wherein the keys are all possible gap sizes, in bits, between the end of this extract and the start of another extract when this extract occurs before the other extract in the input packet.
Each possible gap size is mapped to the set of parser states that realize that gap. Each set member is a pair, wherein the first component is the state containing this extract, and the second component is the state containing other
.
Analogous to ClotCandidate::gaps. Produces a map wherein the keys are all possible gap sizes, in bits, between the end of this extract and the start of another extract when this extract occurs before the other extract in the input packet. An error occurs if any possible gap is not a multiple of 8 bits.
Each possible gap size is mapped to the set of parser states that realize that gap. Each set member is a pair, wherein the first component is the state containing this extract, and the second component is the state containing other
.
void FieldSliceExtractInfo::update |
( |
const IR::BFN::ParserState * | state, |
|
|
unsigned | stack_offset, |
|
|
unsigned | state_bit_offset, |
|
|
int | min_packet_offset, |
|
|
int | max_packet_offset ) |
Updates this object for this field being extracted in a newly discovered parser state.
- Parameters
-
state | the new parser state |
stack_offset | stack index offset |
state_bit_offset | the field's bit offset from the beginning of state |
min_packet_bit_offset | the minimum bit offset from the beginning of the packet of the field in the given state |
max_packet_bit_offset | the maximum bit offset from the beginning of the packet of the field in the given state |
Copyright (C) 2024 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0