P4C
The P4 Compiler
Loading...
Searching...
No Matches
IXBar::Use Struct Referenceabstract

#include <input_xbar.h>

Inheritance diagram for IXBar::Use:
[legend]

Classes

struct  Byte
 
struct  GroupInfo
 
struct  TotalInfo
 
struct  Way
 

Public Types

enum  flags_t {
  NeedRange = 1 , NeedXor = 2 , Align16lo = 4 , Align16hi = 8 ,
  Align32lo = 16 , Align32hi = 32
}
 
typedef safe_vector< safe_vector< Byte > * > TotalBytes
 
enum  type_t {
  EXACT_MATCH , ATCAM_MATCH , TERNARY_MATCH , TRIE_MATCH ,
  GATEWAY , ACTION , PROXY_HASH , SELECTOR ,
  METER , STATEFUL_ALU , HASH_DIST , TYPES
}
 

Public Member Functions

virtual void add (const Use &alloc)
 
bool allocated ()
 
virtual TotalBytes atcam_match () const
 
virtual safe_vector< Byteatcam_partition (int *hash_group=nullptr) const
 
virtual safe_vector< TotalInfobits_per_search_bus () const
 
virtual void clear ()
 
virtual Useclone () const =0
 
virtual unsigned compute_hash_tables ()
 
virtual void dbprint (std::ostream &) const
 
virtual bool emit_gateway_asm (const MauAsmOutput &, std::ostream &, indent_t, const IR::MAU::Table *) const =0
 
virtual void emit_ixbar_asm (const PhvInfo &phv, std::ostream &out, indent_t indent, const TableMatch *fmt, const IR::MAU::Table *) const =0
 
virtual void emit_ixbar_hash_table (int hash_table, safe_vector< Slice > &match_data, safe_vector< Slice > &ghost, const TableMatch *fmt, std::map< int, std::map< int, Slice > > &sort) const =0
 
virtual void emit_salu_bytemasks (std::ostream &out, indent_t indent) const =0
 
virtual bool empty () const
 
int findBytesOnIxbar (const PHV::FieldSlice &sl) const
 
virtual bitvec galois_matrix_bits () const =0
 
virtual int gateway_group () const
 
virtual int groups () const
 
virtual const std::map< int, const IR::Expression * > & hash_computed_expressions () const =0
 
virtual int hash_dist_hash_group () const =0
 
virtual std::string hash_dist_used_for () const =0
 
virtual int hash_groups () const =0
 
virtual bool is_parity_enabled () const =0
 
virtual TotalBytes match_hash (safe_vector< int > *hash_groups=nullptr) const
 
virtual bitvec meter_bit_mask () const =0
 
virtual int search_buses_single () const
 
virtual int ternary_align (const Loc &) const =0
 
virtual int total_input_bits () const =0
 
virtual void update_resources (int, BFN::Resources::StageResources &) const
 
std::string used_for () const
 
virtual const char * way_source_kind () const =0
 

Public Attributes

enum IXBar::Use::type_t type = TYPES
 
safe_vector< Byteuse
 
std::string used_by
 
safe_vector< Wayway_use
 

Detailed Description

IXBar::Use tracks the input xbar use of a single table

Member Function Documentation

◆ atcam_match()

IXBar::Use::TotalBytes IXBar::Use::atcam_match ( ) const
virtual

Do not count partition indexes within the match bytes and double count repeated bytes

◆ atcam_partition()

safe_vector< IXBar::Use::Byte > IXBar::Use::atcam_partition ( int * hash_group = nullptr) const
virtual

Provides the bytes and hash group location of the partition index of an atcam table

Reimplemented in Tofino::IXBar::Use.

◆ bits_per_search_bus()

safe_vector< IXBar::Use::TotalInfo > IXBar::Use::bits_per_search_bus ( ) const
virtual

Provides information per search bus of how many bytes/bits a particular section of table uses in order to determine what section is the best candidate to ghost off

Reimplemented in Tofino::IXBar::Use.

◆ gateway_group()

int IXBar::Use::gateway_group ( ) const
virtual

Returns the ixbar group that the gateway is allocated to

◆ match_hash()

IXBar::Use::TotalBytes IXBar::Use::match_hash ( safe_vector< int > * hash_groups = nullptr) const
virtual

Returns each vector of match data. If multiple hash groups are used, then the allocation, per hash group is provided

Reimplemented in Tofino::IXBar::Use.

◆ search_buses_single()

int IXBar::Use::search_buses_single ( ) const
virtual

Base matching on search buses rather than ixbar groups, as potentially an input xbar group for an ATCAM table has multiple matches in it.

◆ used_for()

std::string IXBar::Use::used_for ( ) const

Visualization Information of Bytes and their corresponding Hash Matrix Bits