P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::BMV2::ExternConverter Class Reference

Public Member Functions

void addToFieldList (ConversionContext *ctxt, const IR::Expression *expr, Util::JsonArray *fl)
 
Util::IJsonconvertAssertAssume (ConversionContext *ctxt, const IR::MethodCallExpression *methodCall, const P4::ExternFunction *ef)
 
virtual Util::IJsonconvertExternFunction (ConversionContext *ctxt, const P4::ExternFunction *ef, const IR::MethodCallExpression *mc, const IR::StatOrDecl *s, const bool emitExterns)
 
virtual void convertExternInstance (ConversionContext *ctxt, const IR::Declaration *c, const IR::ExternBlock *eb, const bool &emitExterns)
 
virtual Util::IJsonconvertExternObject (ConversionContext *ctxt, const P4::ExternMethod *em, const IR::MethodCallExpression *mc, const IR::StatOrDecl *s, const bool &emitExterns)
 
cstring createCalculation (ConversionContext *ctxt, cstring algo, const IR::Expression *fields, Util::JsonArray *calculations, bool usePayload, const IR::Node *node)
 
int createFieldList (ConversionContext *ctxt, const IR::Expression *expr, cstring group, cstring listName, Util::JsonArray *field_lists)
 
void modelError (const char *format, const IR::Node *place) const
 

Static Public Member Functions

static cstring convertHashAlgorithm (cstring algorithm)
 
static Util::IJsoncvtExternFunction (ConversionContext *ctxt, const P4::ExternFunction *ef, const IR::MethodCallExpression *mc, const IR::StatOrDecl *s, const bool emitExterns)
 
static void cvtExternInstance (ConversionContext *ctxt, const IR::Declaration *c, const IR::ExternBlock *eb, const bool &emitExterns)
 
static Util::IJsoncvtExternObject (ConversionContext *ctxt, const P4::ExternMethod *em, const IR::MethodCallExpression *mc, const IR::StatOrDecl *s, const bool &emitExterns)
 
static ExternConverterget (const IR::ExternBlock *eb)
 
static ExternConverterget (const IR::Type_Extern *type)
 
static ExternConverterget (const P4::ExternFunction *ef)
 
static ExternConverterget (const P4::ExternMethod *em)
 
static ExternConverterget (cstring type)
 
static void registerExternConverter (cstring, ExternConverter *)
 

Member Function Documentation

◆ convertExternInstance()

void P4::BMV2::ExternConverter::convertExternInstance ( ConversionContext * ctxt,
const IR::Declaration * decl,
const IR::ExternBlock * eb,
const bool & emitExterns )
virtual

This method is invoked for all externs that do not have a registered conversion, i.e., unknown by the architecture.