P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::P4Tools::ControlPlaneState Namespace Reference

Functions

const IR::SymbolicVariable * getTableActionArgument (cstring tableName, cstring actionName, cstring parameterName, const IR::Type *type)
 
const IR::SymbolicVariable * getTableActionChoice (cstring tableName)
 
const IR::SymbolicVariable * getTableActive (cstring tableName)
 
const IR::SymbolicVariable * getTableKey (cstring tableName, cstring keyFieldName, const IR::Type *type)
 
const IR::SymbolicVariable * getTableMatchLpmPrefix (cstring tableName, cstring keyFieldName, const IR::Type *type)
 
const IR::SymbolicVariable * getTableTernaryMask (cstring tableName, cstring keyFieldName, const IR::Type *type)
 

Detailed Description

Defines accessors and utility functions for state that is managed by the control plane. This class can be extended by targets to customize initialization behavior and add target-specific utility functions.

Function Documentation

◆ getTableActionArgument()

const IR::SymbolicVariable * P4::P4Tools::ControlPlaneState::getTableActionArgument ( cstring tableName,
cstring actionName,
cstring parameterName,
const IR::Type * type )
Returns
the symbolic variable describing an action argument as part of a match-action call. The table, action and argument name are needed to generate a unique variable.

◆ getTableActionChoice()

const IR::SymbolicVariable * P4::P4Tools::ControlPlaneState::getTableActionChoice ( cstring tableName)
Returns
the symbolic variable listing the chosen action for a particular table.

◆ getTableActive()

const IR::SymbolicVariable * P4::P4Tools::ControlPlaneState::getTableActive ( cstring tableName)
Returns
the symbolic boolean variable describing whether a table is configured by the control plane.

◆ getTableKey()

const IR::SymbolicVariable * P4::P4Tools::ControlPlaneState::getTableKey ( cstring tableName,
cstring keyFieldName,
const IR::Type * type )
Returns
the symbolic variable describing a table match key. The table and field name are needed to generate a unique variable.

◆ getTableMatchLpmPrefix()

const IR::SymbolicVariable * P4::P4Tools::ControlPlaneState::getTableMatchLpmPrefix ( cstring tableName,
cstring keyFieldName,
const IR::Type * type )
Returns
the symbolic variable describing a table LPM prefix match. The symbolic prefix may be applied to the left and right-hand side of a key match (|x| << |lpm_prefix| == |y| << |lpm_prefix|). The table and field name are needed to generate a unique variable.

◆ getTableTernaryMask()

const IR::SymbolicVariable * P4::P4Tools::ControlPlaneState::getTableTernaryMask ( cstring tableName,
cstring keyFieldName,
const IR::Type * type )
Returns
the symbolic variable representing the mask for a table ternary match. The symbolic mask may be applied to the left and right-hand side of a key match (|x| & |mask|== |y| & |mask|). The table and field name are needed to generate a unique variable.