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

Public Member Functions

 PnaProgramStructure (P4::ReferenceMap *refMap, P4::TypeMap *typeMap)
 
- Public Member Functions inherited from P4::PortableProgramStructure
 PortableProgramStructure (P4::ReferenceMap *refMap, P4::TypeMap *typeMap)
 
bool hasVisited (const IR::Type_StructLike *st)
 
- Public Member Functions inherited from P4::ProgramStructure

Static Public Member Functions

static bool isCounterMetadata (cstring ptName)
 
static bool isStandardMetadata (cstring ptName)
 

Public Attributes

ordered_map< const IR::Node *, pna_block_t > block_type
 Architecture related information.
 
- Public Attributes inherited from P4::PortableProgramStructure
unsigned bool_width = 1
 
ordered_map< cstring, const IR::P4Control * > deparsers
 
ordered_map< cstring, const IR::Type_Enum * > enums
 
ordered_map< cstring, const IR::Type_Error * > errors
 
ordered_map< cstring, const IR::Declaration_Instance * > extern_instances
 
ordered_map< cstring, cstringfield_aliases
 
std::vector< const IR::ExternBlock * > globals
 
ordered_map< cstring, const IR::Declaration_Variable * > header_stacks
 
ordered_map< cstring, const IR::Type_Header * > header_types
 
ordered_map< cstring, const IR::Type_HeaderUnion * > header_union_types
 
ordered_map< cstring, const IR::Declaration_Variable * > header_unions
 
ordered_map< cstring, const IR::Declaration_Variable * > headers
 
ordered_map< cstring, const IR::Declaration_Variable * > metadata
 
ordered_map< cstring, const IR::Type_Struct * > metadata_types
 
std::set< cstringnon_pipeline_controls
 
ordered_map< cstring, const IR::P4ValueSet * > parse_vsets
 
ordered_map< cstring, const IR::P4Parser * > parsers
 
std::set< cstringpipeline_controls
 
ordered_map< cstring, const IR::P4Control * > pipelines
 
P4::ReferenceMaprefMap
 
ordered_map< cstring, const IR::Declaration_Variable * > scalars
 
unsigned scalars_width = 0
 
P4::TypeMaptypeMap
 
- Public Attributes inherited from P4::ProgramStructure
ordered_map< const IR::P4Action *, const IR::P4Control * > actions
 Map action to parent control.
 
ordered_map< cstring, const IR::P4Table * > directCounterMap
 All the direct counters. (TODO: This should be PSA-specific or V1MODEL-specific.)
 
DirectMeterMap directMeterMap
 All the direct meters. (TODO: This should be PSA-specific or V1MODEL-specific.)
 
ordered_map< const IR::IDeclaration *, unsigned int > errorCodesMap
 All error codes.
 
ordered_map< const IR::P4Action *, unsigned > ids
 For each action its json id.
 
ordered_map< const IR::Parameter *, unsigned > index
 
std::set< cstringmatch_kinds
 All match kinds.
 
ordered_set< const IR::Parameter * > nonActionParameters
 Parameters of controls/parsers.
 
ResourceMap resourceMap
 map IR node to compile-time allocated resource blocks.
 
std::map< const IR::StructField *, cstringscalarMetadataFields
 
std::vector< const IR::Declaration_Variable * > variables
 All local variables.
 

Member Function Documentation

◆ isCounterMetadata()

static bool P4::BMV2::PnaProgramStructure::isCounterMetadata ( cstring ptName)
inlinestatic

Checks if a string is of type PNA_CounterType_t returns true if it is, false otherwise.

◆ isStandardMetadata()

static bool P4::BMV2::PnaProgramStructure::isStandardMetadata ( cstring ptName)
inlinestatic

Checks if a string is a pna metadata returns true if it is, false otherwise.