P4C
The P4 Compiler
Loading...
Searching...
No Matches
BFN::Resources::XbarByteResource Struct Reference

#include <resources.h>

Public Member Functions

 XbarByteResource (const std::string &ub, const std::string &uf, const IXBar::Use::Byte &b)
 
bool operator< (const XbarByteResource &other) const
 

Public Attributes

IXBar::Use::Byte byte
 
std::string usedBy
 
std::string usedFor
 

Detailed Description

XBar bytes can be shared by multiple tables for different purposes. These cases can happen:

  • One table can use the same data for two purposes
  • Two tables can use the same data for whatever purposes
  • Each table use different slice of the byte for different purposes, slices do not overlap
    • (validity bits)
  • Mutually exclusive tables source mutually exclusive data from the same byte
  • Use might be duplicated (bug possibly?) This is why this structure is held inside set and implements < operator so we can deduplicate these cases.