P4C
The P4 Compiler
Loading...
Searching...
No Matches
JBayPhvSpec Class Reference
Inheritance diagram for JBayPhvSpec:
[legend]

Public Member Functions

unsigned deparserGroupId (const PHV::Container &c) const override
 
bool hasParserExtractGroups () const override
 
const bitvecindividuallyAssignedContainers () const override
 
unsigned mauGroupId (const PHV::Container &c) const override
 
bitvec parserExtractGroup (unsigned id) const override
 
bitvec parserGroup (unsigned id) const override
 
unsigned parserGroupId (const PHV::Container &c) const override
 
unsigned physicalAddress (unsigned container_id, ArchBlockType_t interface) const override
 
AddressSpec & physicalAddressSpec (ArchBlockType_t interface) const override
 
- Public Member Functions inherited from PhvSpec
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
 
const std::pair< int, int > deparserGroupNumAndSize (const PHV::Type t) const
 
const bitvecegressOnly () 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.
 
PHV::Container idToContainer (unsigned id) const
 
PHV::Type idToContainerType (unsigned id) const
 
const bitvecingressOnly () const
 
bitvec ingressOrEgressOnlyContainers (const std::map< PHV::Size, std::vector< unsigned > > &gressOnlyMauGroupIds) const
 
bitvec mauGroup (unsigned container_id) const
 
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
 
unsigned physicalAddress (const PHV::Container &c, ArchBlockType_t interface) const
 
std::optional< PHV::ContainerphysicalAddressToContainer (unsigned address, ArchBlockType_t interface) const
 
const bitvecphysicalContainers () const
 
bitvec range (PHV::Type t, unsigned start, unsigned length) const
 
bitvec tagalongCollection (unsigned container_id) const
 
const std::vector< bitvec > & tagalongCollections () const
 

Additional Inherited Members

- Public Types inherited from PhvSpec
using AddressSpec = std::map<PHV::Type, RangeSpec>
 
enum  ArchBlockType_t { PARSER , MAU , DEPARSER }
 
- Protected Member Functions inherited from PhvSpec
void addType (PHV::Type t)
 
unsigned getContainersPerGroup (const std::map< PHV::Size, unsigned > &numContainersPerGroup) const
 Return the number of containers in an MAU group.
 
- Protected Attributes inherited from PhvSpec
unsigned containersPerGroup = 0
 
std::set< PHV::KinddefinedKinds
 All kinds of containers supported by the device.
 
std::set< PHV::SizedefinedSizes
 All sizes of containers supported by the device.
 
std::vector< PHV::TypedefinedTypes
 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, MauGroupTypemauGroupSpec
 
unsigned numPovBits = 0
 
unsigned numTagalongCollections = 0
 
bitvec physical_containers_i
 
std::map< PHV::Size, std::set< PHV::Type > > sizeToTypeMap
 
std::vector< bitvectagalong_collections_i
 
std::map< PHV::Type, unsigned > tagalongCollectionSpec
 
ordered_map< PHV::Type, unsigned > typeIdMap
 

Member Function Documentation

◆ deparserGroupId()

unsigned JBayPhvSpec::deparserGroupId ( const PHV::Container & c) const
overridevirtual
See also
PhvSpec::deparserGroupId(const PHV::Container &)

Implements PhvSpec.

◆ hasParserExtractGroups()

bool JBayPhvSpec::hasParserExtractGroups ( ) const
overridevirtual
See also
PhvSpec::hasParserExtractGroups().

Implements PhvSpec.

◆ individuallyAssignedContainers()

const bitvec & JBayPhvSpec::individuallyAssignedContainers ( ) const
overridevirtual
Returns
the ids of containers that can be assigned to a thread individually.

Implements PhvSpec.

◆ mauGroupId()

unsigned JBayPhvSpec::mauGroupId ( const PHV::Container & c) const
overridevirtual
See also
PhvSpec::mauGroupId(const PHV::Container &)

Implements PhvSpec.

◆ parserExtractGroup()

bitvec JBayPhvSpec::parserExtractGroup ( unsigned id) const
overridevirtual
See also
PhvSpec::parserExtractGroup(unsigned id).

Implements PhvSpec.

◆ parserGroup()

bitvec JBayPhvSpec::parserGroup ( unsigned id) const
overridevirtual
See also
PhvSpec::parserGroup(unsigned id).

Implements PhvSpec.

◆ parserGroupId()

unsigned JBayPhvSpec::parserGroupId ( const PHV::Container & c) const
overridevirtual
See also
PhvSpec::parserGroupId(const PHV::Container &)

Implements PhvSpec.

◆ physicalAddress()

unsigned JBayPhvSpec::physicalAddress ( unsigned container_id,
ArchBlockType_t interface ) const
overridevirtual
See also
PhvSpec::physicalAddress(unsigned container_id, BFN::ArchBlockType interface). For JBay, PARSER/DEPARSER have normal and mocha, MAU has additional darks

Implements PhvSpec.

◆ physicalAddressSpec()

AddressSpec & JBayPhvSpec::physicalAddressSpec ( ArchBlockType_t interface) const
inlineoverridevirtual
See also
PhvSpec::physicalAddressSpec(ArchBlockType_t)

Implements PhvSpec.