|
void | applyGlobalPragmas (const std::vector< const IR::Annotation * > &global_pragmas) const |
| apply global pragmas to cached info about available PHV containers
|
|
const std::set< PHV::Kind > & | containerKinds () const |
|
cstring | containerSetToString (const bitvec &set) const |
|
const std::set< PHV::Size > & | containerSizes () const |
|
unsigned | containerToId (PHV::Container container) const |
|
const std::vector< PHV::Type > & | containerTypes () const |
|
unsigned | containerTypeToId (PHV::Type type) const |
|
bitvec | deparserGroup (unsigned id) const |
|
virtual unsigned | deparserGroupId (const PHV::Container &c) const =0 |
|
const std::pair< int, int > | deparserGroupNumAndSize (const PHV::Type t) const |
|
const bitvec & | egressOnly () const |
|
bitvec | filterContainerSet (const bitvec &set, PHV::Kind kind) const |
| Filters a set of containers for a single container kind or type.
|
|
bitvec | filterContainerSet (const bitvec &set, PHV::Type type) const |
|
unsigned | getNumPovBits () const |
|
unsigned | getNumTagalongCollections () const |
|
unsigned | getTagalongCollectionId (PHV::Container c) const |
|
const std::map< PHV::Type, unsigned > | getTagalongCollectionSpec () const |
|
const std::map< PHV::Size, std::set< PHV::Type > > | groupsToTypes () const |
|
bool | hasContainerKind (PHV::Kind kind) const |
| Determines whether the device has the given kind of PHV container.
|
|
virtual bool | hasParserExtractGroups () const =0 |
|
PHV::Container | idToContainer (unsigned id) const |
|
PHV::Type | idToContainerType (unsigned id) const |
|
virtual const bitvec & | individuallyAssignedContainers () const =0 |
|
const bitvec & | ingressOnly () const |
|
bitvec | ingressOrEgressOnlyContainers (const std::map< PHV::Size, std::vector< unsigned > > &gressOnlyMauGroupIds) const |
|
bitvec | mauGroup (unsigned container_id) const |
|
virtual unsigned | mauGroupId (const PHV::Container &c) const =0 |
|
const std::pair< int, int > | mauGroupNumAndSize (const PHV::Type t) const |
|
const std::map< PHV::Size, std::vector< bitvec > > & | mauGroups () const |
|
const std::vector< bitvec > & | mauGroups (PHV::Size sz) const |
|
unsigned | numContainersInGroup () const |
|
unsigned | numContainerTypes () const |
|
virtual bitvec | parserExtractGroup (unsigned id) const =0 |
|
virtual bitvec | parserGroup (unsigned id) const =0 |
|
virtual unsigned | parserGroupId (const PHV::Container &c) const =0 |
|
unsigned | physicalAddress (const PHV::Container &c, ArchBlockType_t interface) const |
|
virtual unsigned | physicalAddress (unsigned container_id, ArchBlockType_t interface) const =0 |
|
virtual AddressSpec & | physicalAddressSpec (ArchBlockType_t interface) const =0 |
|
std::optional< PHV::Container > | physicalAddressToContainer (unsigned address, ArchBlockType_t interface) const |
|
const bitvec & | physicalContainers () const |
|
bitvec | range (PHV::Type t, unsigned start, unsigned length) const |
|
bitvec | tagalongCollection (unsigned container_id) const |
|
const std::vector< bitvec > & | tagalongCollections () const |
|
|
unsigned | containersPerGroup = 0 |
|
std::set< PHV::Kind > | definedKinds |
| All kinds of containers supported by the device.
|
|
std::set< PHV::Size > | definedSizes |
| All sizes of containers supported by the device.
|
|
std::vector< PHV::Type > | definedTypes |
| All types of containers supported by the device.
|
|
std::map< PHV::Type, unsigned > | deparserGroupSize |
|
std::map< PHV::Type, std::pair< unsigned, unsigned > > | deparserGroupSpec |
|
bitvec | egress_only_containers_i |
|
std::map< PHV::Size, std::vector< unsigned > > | egressOnlyMauGroupIds |
|
bitvec | individually_assigned_containers_i |
|
bitvec | ingress_only_containers_i |
|
std::map< PHV::Size, std::vector< unsigned > > | ingressOnlyMauGroupIds |
|
std::map< PHV::Size, std::vector< bitvec > > | mau_groups_i |
|
std::map< PHV::Size, MauGroupType > | mauGroupSpec |
|
unsigned | numPovBits = 0 |
|
unsigned | numTagalongCollections = 0 |
|
bitvec | physical_containers_i |
|
std::map< PHV::Size, std::set< PHV::Type > > | sizeToTypeMap |
|
std::vector< bitvec > | tagalong_collections_i |
|
std::map< PHV::Type, unsigned > | tagalongCollectionSpec |
|
ordered_map< PHV::Type, unsigned > | typeIdMap |
|
Add a PHV container type to the set of types which are available on this device. This should only be called inside the constructor of subclasses of PhvSpec; after a PhvSpec instance is constructed, its list of container types is considered immutable.
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
virtual bitvec PhvSpec::parserGroup |
( |
unsigned | id | ) |
const |
|
pure virtual |
The JBay parser treats the PHV as 256 x 16b containers, where each extractor can write to the upper/lower/both 8b segments of each 16b container. MAU, on the other hand, views PHV as groups of 8b, 16b, and 32b containers.
As a result, if an even/odd pair of 8b PHV containers holds extracted fields, then they need to be assigned to the same thread.
- Returns
- the ids of every container in the same parser group as the provided container.
Implemented in JBayPhvSpec, and TofinoPhvSpec.
Describes PHV groups for MAU in the device. E.g. if a device has two types of MAU groups, corresponding to 32-bit and 8-bit containers, and each type of group has 16 normal PHV containers of a given size, the mauGroupSpec will be: { { PHV::Size::b8, MauGroupType(4, { PHV::Type::B, 16 }) }, { PHV::Size::b32, MauGroupType(4, { PHV::Type::W, 16 }) } }.