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

Public Member Functions

 SimpleSwitchBackend (BMV2Options &options, P4::ReferenceMap *refMap, P4::TypeMap *typeMap, P4::ConvertEnums::EnumMapping *enumMap)
 
void convert (const IR::ToplevelBlock *tlb) override
 
void convertChecksum (const IR::BlockStatement *body, Util::JsonArray *checksums, Util::JsonArray *calculations, bool verify)
 
void createActions (ConversionContext *ctxt, V1ProgramStructure *structure)
 
void modelError (const char *format, const IR::Node *place) const
 
- Public Member Functions inherited from P4::BMV2::Backend
 Backend (BMV2Options &options, P4::ReferenceMap *refMap, P4::TypeMap *typeMap, P4::ConvertEnums::EnumMapping *enumMap)
 
void serialize (std::ostream &out) const
 

Protected Member Functions

cstring createCalculation (cstring algo, const IR::Expression *fields, Util::JsonArray *calculations, bool usePayload, const IR::Node *node)
 
void createRecirculateFieldsList (ConversionContext *ctxt, const IR::ToplevelBlock *tlb, cstring scalarName)
 

Additional Inherited Members

- Public Attributes inherited from P4::BMV2::Backend
P4::P4CoreLibrarycorelib
 
P4::ConvertEnums::EnumMapping * enumMap
 
BMV2::JsonObjectsjson
 
BMV2Optionsoptions
 
P4::ReferenceMaprefMap
 
const IR::ToplevelBlock * toplevel = nullptr
 
P4::TypeMaptypeMap
 

Member Function Documentation

◆ convert()

void P4::BMV2::SimpleSwitchBackend::convert ( const IR::ToplevelBlock * tlb)
overridevirtual

Declaration which introduces the user metadata. We expect this to be a struct type.

generate error types

Implements P4::BMV2::Backend.