P4C
The P4 Compiler
Loading...
Searching...
No Matches
IXBar::FieldInfo Struct Reference

#include <input_xbar.h>

Public Member Functions

 FieldInfo (cstring n, int l, int h, int cl, std::optional< cstring > a)
 
int cont_hi () const
 
bitvec cont_loc () const
 
PHV::FieldSlice field_slice (const PhvInfo &phv) const
 
cstring get_use_name () const
 
bool operator!= (const FieldInfo &fi) const
 
bool operator< (const FieldInfo &fi) const
 
bool operator== (const FieldInfo &fi) const
 
le_bitrange range () const
 
std::string visualization_detail () const
 
int width () const
 

Public Attributes

std::optional< cstringaliasSource
 
int cont_lo
 
cstring field
 
int hi
 
int lo
 
int pragma_forced_ixbar_group = -1
 

Detailed Description

Information on a single stretch of field within a Input XBar Byte, which comes from the P4 program, i.e. say the following was a key:

key { hdr.nibble1 : exact;  hdr.nibble2 : exact; }

where hdr.nibble1 and hdr.nibble2 are both 4 bit fields in the same Container Byte, i.e. H0(0..7). Then each P4 field would have a FieldInfo, and the Use::Byte would have a vector of two FieldInfo objects.

Constructor & Destructor Documentation

◆ FieldInfo()

IXBar::FieldInfo::FieldInfo ( cstring n,
int l,
int h,
int cl,
std::optional< cstring > a )
inline

‍name of alias source field, if present

Member Data Documentation

◆ cont_lo

int IXBar::FieldInfo::cont_lo

‍hi field bit in that byte

◆ hi

int IXBar::FieldInfo::hi

‍lo field bit in that byte

◆ lo

int IXBar::FieldInfo::lo

‍name of the field

◆ pragma_forced_ixbar_group

int IXBar::FieldInfo::pragma_forced_ixbar_group = -1

‍mod 8 location in the container that the bitrange of field begins