19#ifndef BF_P4C_ARCH_CHECK_EXTERN_INVOCATION_H_
20#define BF_P4C_ARCH_CHECK_EXTERN_INVOCATION_H_
22#include "bf-p4c/arch/arch.h"
23#include "frontends/p4/methodInstance.h"
25#include "ir/visitor.h"
26#include "midend/checkExternInvocationCommon.h"
37 int genIndex(gress_t gress, ArchBlock_t block) {
38 return gress * ArchBlock_t::BLOCK_TYPE + block;
41 static const char *lookup[] = {
"parser",
"control (MAU)",
"deparser"};
42 BUG_CHECK(
sizeof(lookup) /
sizeof(lookup[0]) == ArchBlock_t::BLOCK_TYPE,
44 return cstring(lookup[bit % ArchBlock_t::BLOCK_TYPE]);
46 void initCommonPipeConstraints();
48 const IR::MethodCallExpression *expr)
override;
54 void initPipeConstraints()
override;
59 initPipeConstraints();
64 void initPipeConstraints()
override;
69 initPipeConstraints();
cstring getBlockName(int bit) override
Get the name of the block which is represented in bit vector (bitvec) by bit with index given by 'bit...
Definition check_extern_invocation.h:40
void checkExtern(const P4::ExternMethod *extMethod, const IR::MethodCallExpression *expr) override
Method for checking constraints of extern method given by parameters.
Definition check_extern_invocation.h:63
Definition check_extern_invocation.h:53
Base class which can be used to prepare classes for checking constraints for invocations of externs (...
Definition checkExternInvocationCommon.h:41
Definition methodInstance.h:168
Class used to encode maps from paths to declarations.
Definition referenceMap.h:66
The namespace encapsulating Barefoot/Intel-specific stuff.
Definition add_t2na_meta.cpp:21
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24