P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::P4V1::TnaProgramStructure Class Reference

#include <programStructure.h>

Inheritance diagram for P4::P4V1::TnaProgramStructure:
[legend]

Public Member Functions

template<typename Func >
void forAllChecksums (std::vector< const IR::CalculatedField * > calculated_fields, Func function)
 
template<typename Func >
void forAllResidualChecksums (std::vector< const IR::CalculatedField * > calculated_fields, Func function)
 
gress_t getGress (cstring name)
 
- Public Member Functions inherited from P4::P4V1::ProgramStructure
const IR::AssignmentStatement * assign (Util::SourceInfo srcInfo, const IR::Expression *left, const IR::Expression *right, const IR::Type *type)
 
virtual const IR::Expression * convertFieldList (const IR::Expression *expression)
 
virtual const IR::Expression * convertHashAlgorithms (const IR::NameList *algorithm)
 
void createExterns ()
 
virtual const IR::Type_Struct * createFieldListType (const IR::Expression *expression)
 
void createTypes ()
 
const IR::Expression * explodeLabel (const IR::Constant *value, const IR::Constant *mask, const std::vector< const IR::Type::Bits * > &fieldTypes)
 
const IR::Type * explodeType (const std::vector< const IR::Type::Bits * > &fieldTypes)
 
virtual const IR::FieldListCalculation * getFieldListCalculation (const IR::Expression *)
 
virtual const IR::FieldList * getFieldLists (const IR::FieldListCalculation *flc)
 
void include (cstring filename, cstring ppoptions=cstring())
 
bool isFieldInList (cstring type, cstring field, const IR::FieldList *fl) const
 
bool isHeader (const IR::ConcreteHeaderRef *nhr) const
 
const IR::Expression * listIndex (const IR::Expression *fl) const
 
virtual const IR::Vector< IR::Expression > * listIndexes (cstring type, cstring field) const
 
cstring makeUniqueName (cstring base)
 
virtual const IR::Expression * paramReference (const IR::Parameter *param)
 
void populateOutputNames ()
 
const IR::Statement * sliceAssign (const IR::Primitive *prim, const IR::Expression *left, const IR::Expression *right, const IR::Expression *mask)
 
void tablesReferred (const IR::V1Control *control, std::vector< const IR::V1Table * > &out)
 

Static Public Member Functions

static ProgramStructurecreate ()
 

Public Attributes

std::map< cstring, BFN::LinearPathbridgedFieldInfo
 
ordered_set< cstringbridgedFields
 
std::map< gress_t, std::map< cstring, IR::Statement * > > checksumDepositToHeader
 
IR::Vector< IR::StatOrDecl > checksumVerify
 
std::map< unsigned long, unsigned > cloneIndexHashes [2]
 
std::map< cstring, std::vector< const IR::Parameter * > > controlParams
 
std::map< cstring, bitveccontrolParamUse
 
gress_t currentGress
 
std::map< cstring, std::map< unsigned, std::pair< std::optional< cstring >, const IR::Expression * > > > digestFieldLists
 
std::map< unsigned long, unsigned > digestIndexHashes
 
ordered_map< cstring, ordered_set< cstring > > ingressVerifyChecksumToStates
 
std::map< cstring, gress_t > mapControlToGress
 
std::map< unsigned long, unsigned > recirculateIndexHashes
 
assoc::map< const IR::FieldList *, cstringresidualChecksumNames
 
std::vector< ChecksumInforesidualChecksums
 
std::map< unsigned long, unsigned > resubmitIndexHashes
 
std::map< cstring, const IR::Type_StructLike * > tna_intr_md_types
 
std::vector< ChecksumInfoverifyChecksums
 
- Public Attributes inherited from P4::P4V1::ProgramStructure
NamedObjectInfo< const IR::ActionProfile * > action_profiles
 
NamedObjectInfo< const IR::ActionSelector * > action_selectors
 
NamedObjectInfo< const IR::ActionFunction * > actions
 
ordered_set< const IR::FieldList * > allFieldLists
 Field lists that appear in the program.
 
std::unordered_map< cstring, int > allNames
 
std::vector< const IR::CalculatedField * > calculated_fields
 
P4::CallGraph< cstringcalledActions
 
P4::CallGraph< cstringcalledControls
 
P4::CallGraph< cstringcalledCounters
 
P4::CallGraph< cstringcalledExterns
 
P4::CallGraph< cstringcalledMeters
 
P4::CallGraph< cstringcalledRegisters
 
NamedObjectInfo< const IR::V1Control * > controls
 
ConversionContextconversionContext = nullptr
 
std::map< cstring, const IR::Declaration_Instance * > counterMap
 
NamedObjectInfo< const IR::Counter * > counters
 
IR::Vector< IR::Node > * declarations
 
const int defaultRegisterWidth = 32
 
const IR::P4Control * deparser
 
std::map< cstring, cstringdirectCounters
 
std::map< cstring, const IR::Meter * > directMeters
 Maps table name to direct meter.
 
IR::Vector< IR::Type > * emptyTypeArguments = nullptr
 
std::map< const IR::Type_Extern *, const IR::Type_Extern * > extern_remap
 
NamedObjectInfo< const IR::Type_Extern * > extern_types
 
NamedObjectInfo< const IR::Declaration_Instance * > externs
 
std::map< cstring, IR::Vector< IR::Expression > > extracts
 
std::map< const IR::MethodCallExpression *, const IR::Type_Header * > extractsSynthesized
 
NamedObjectInfo< const IR::FieldListCalculation * > field_list_calculations
 
NamedObjectInfo< const IR::FieldList * > field_lists
 
cstring fieldListsEnum
 Name of the serializable enum that holds one id for each field list.
 
std::map< cstring, const IR::Type * > finalHeaderType
 
std::map< const IR::Node *, const IR::Declaration_Instance * > globalInstances
 
std::set< cstringheaderInstances
 
NamedObjectInfo< const IR::Header * > headers
 
std::set< cstringheaderTypes
 
const IR::V1Control * ingress
 
IR::ID ingressReference
 
const IR::Expression * latest
 Represents 'latest' P4-14 construct.
 
std::vector< const IR::Declaration * > localInstances
 extra local instances to control created by primitive translation
 
NamedObjectInfo< const IR::HeaderOrMetadata * > metadata
 
std::set< cstringmetadataInstances
 
std::set< cstringmetadataTypes
 
std::map< const IR::Meter *, const IR::Declaration_Instance * > meterMap
 
NamedObjectInfo< const IR::Meter * > meters
 
P4::P4CoreLibraryp4lib
 
std::set< cstringparameterTypes
 
std::map< cstring, const IR::ParserState * > parserEntryPoints
 
const IR::Parameter * parserHeadersOut = nullptr
 
const IR::Parameter * parserPacketIn = nullptr
 
P4::CallGraph< cstringparsers
 
NamedObjectInfo< const IR::V1Parser * > parserStates
 
std::map< cstring, cstringregisterLayoutType
 
NamedObjectInfo< const IR::Register * > registers
 
NamedObjectInfo< const IR::HeaderStack * > stacks
 
std::map< const IR::V1Table *, const IR::Apply * > tableInvocation
 
std::map< const IR::V1Table *, const IR::V1Control * > tableMapping
 
NamedObjectInfo< const IR::V1Table * > tables
 
NamedObjectInfo< const IR::Type_StructLike * > types
 
const IR::P4Control * updateChecksums
 
P4V1::V1Modelv1model
 
NamedObjectInfo< const IR::ParserValueSet * > value_sets
 
std::set< cstringvalue_sets_implemented
 
const IR::P4Control * verifyChecksums
 

Additional Inherited Members

- Protected Member Functions inherited from P4::P4V1::ProgramStructure
virtual const IR::P4Action * convertAction (const IR::ActionFunction *action, cstring newName, const IR::Meter *meterToAccess, cstring counterToAccess)
 
virtual const IR::Statement * convertParserStatement (const IR::Expression *expr)
 
virtual const IR::Statement * convertPrimitive (const IR::Primitive *primitive)
 
virtual void createChecksumUpdates ()
 
virtual void createChecksumVerifications ()
 
virtual void createControls ()
 
void createDeparserInternal (IR::ID deparserId, IR::Parameter *packetOut, IR::Parameter *headers, std::vector< IR::Parameter * >, IR::IndexedVector< IR::Declaration > controlLocals, std::function< IR::BlockStatement *(IR::BlockStatement *)>)
 
virtual void createStructures ()
 
virtual cstring createType (const IR::Type_StructLike *type, bool header, std::unordered_set< const IR::Type * > *converted)
 
const IR::PathExpression * getState (IR::ID dest)
 
- Static Protected Member Functions inherited from P4::P4V1::ProgramStructure
static IR::Vector< IR::Annotation > addGlobalNameAnnotation (cstring name, const IR::Vector< IR::Annotation > &annos)
 

Detailed Description

Extend P4V1::ProgramStructure with TNA-specific info