P4C
The P4 Compiler
Loading...
Searching...
No Matches
Tofino::IXBar::Use Struct Reference
Inheritance diagram for Tofino::IXBar::Use:
[legend]

Classes

struct  Bits
 
struct  HashDistHash
 
struct  MeterAluHash
 
struct  ProxyHashKey
 
struct  SaluInputSource
 

Public Member Functions

void add (const Use &alloc)
 
safe_vector< Byteatcam_partition (int *hash_group=nullptr) const override
 
safe_vector< TotalInfobits_per_search_bus () const override
 
void clear () override
 
Useclone () const override
 
unsigned compute_hash_tables () override
 
void dbprint (std::ostream &) const override
 
bool emit_gateway_asm (const MauAsmOutput &, std::ostream &, indent_t, const IR::MAU::Table *) const override
 
void emit_ixbar_asm (const PhvInfo &phv, std::ostream &out, indent_t indent, const TableMatch *fmt, const IR::MAU::Table *) const override
 
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 override
 
void emit_salu_bytemasks (std::ostream &out, indent_t indent) const override
 
bool empty () const override
 
bitvec galois_matrix_bits () const override
 
const std::map< int, const IR::Expression * > & hash_computed_expressions () const override
 
int hash_dist_hash_group () const override
 
std::string hash_dist_used_for () const override
 
int hash_groups () const override
 
bool is_parity_enabled () const override
 
TotalBytes match_hash (safe_vector< int > *hash_groups=nullptr) const override
 
bitvec meter_bit_mask () const override
 
bool search_data () const
 
int ternary_align (const Loc &) const override
 
int total_input_bits () const override
 
void update_resources (int, BFN::Resources::StageResources &) const override
 
const char * way_source_kind () const override
 
- Public Member Functions inherited from IXBar::Use
virtual void add (const Use &alloc)
 
bool allocated ()
 
virtual TotalBytes atcam_match () const
 
virtual bool emit_gateway_asm (const MauAsmOutput &, std::ostream &, indent_t, const IR::MAU::Table *) const =0
 
int findBytesOnIxbar (const PHV::FieldSlice &sl) const
 
virtual int gateway_group () const
 
virtual int groups () const
 
virtual int search_buses_single () const
 
std::string used_for () const
 

Public Attributes

safe_vector< Bitsbit_use
 
safe_vector< const IR::Expression * > field_list_order
 
bool gw_hash_group = false
 
bool gw_search_bus = false
 
int gw_search_bus_bytes = 0
 
struct Tofino::IXBar::Use::HashDistHash hash_dist_hash
 
HashDistDest_t hash_dist_type = HD_DESTS
 
bitvec hash_seed [HASH_GROUPS]
 
unsigned hash_table_inputs [HASH_GROUPS] = { 0 }
 
struct Tofino::IXBar::Use::MeterAluHash meter_alu_hash
 
parity_status_t parity = PARITY_NONE
 
struct Tofino::IXBar::Use::ProxyHashKey proxy_hash_key_use
 
struct Tofino::IXBar::Use::SaluInputSource salu_input_source
 
LTBitMatrix symmetric_keys
 
- Public Attributes inherited from IXBar::Use
enum IXBar::Use::type_t type = TYPES
 
safe_vector< Byteuse
 
std::string used_by
 
safe_vector< Wayway_use
 

Additional Inherited Members

- Public Types inherited from IXBar::Use
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
}
 

Member Function Documentation

◆ atcam_partition()

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

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

Reimplemented from IXBar::Use.

◆ bits_per_search_bus()

safe_vector< IXBar::Use::TotalInfo > Tofino::IXBar::Use::bits_per_search_bus ( ) const
overridevirtual

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 from IXBar::Use.

◆ clear()

void Tofino::IXBar::Use::clear ( )
inlineoverridevirtual

Reimplemented from IXBar::Use.

◆ clone()

Use * Tofino::IXBar::Use::clone ( ) const
inlineoverridevirtual

Implements IXBar::Use.

◆ compute_hash_tables()

unsigned IXBar::Use::compute_hash_tables ( )
overridevirtual

Reimplemented from IXBar::Use.

◆ dbprint()

void IXBar::Use::dbprint ( std::ostream & out) const
overridevirtual

Reimplemented from IXBar::Use.

◆ emit_ixbar_asm()

void Tofino::IXBar::Use::emit_ixbar_asm ( const PhvInfo & phv,
std::ostream & out,
indent_t indent,
const TableMatch * fmt,
const IR::MAU::Table * tbl ) const
overridevirtual

Implements IXBar::Use.

◆ emit_ixbar_hash_table()

void IXBar::Use::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
overridevirtual

Implements IXBar::Use.

◆ emit_salu_bytemasks()

void IXBar::Use::emit_salu_bytemasks ( std::ostream & out,
indent_t indent ) const
overridevirtual

Implements IXBar::Use.

◆ empty()

bool Tofino::IXBar::Use::empty ( ) const
inlineoverridevirtual

Reimplemented from IXBar::Use.

◆ galois_matrix_bits()

bitvec Tofino::IXBar::Use::galois_matrix_bits ( ) const
inlineoverridevirtual

Implements IXBar::Use.

◆ hash_computed_expressions()

const std::map< int, const IR::Expression * > & Tofino::IXBar::Use::hash_computed_expressions ( ) const
inlineoverridevirtual

Implements IXBar::Use.

◆ hash_dist_hash_group()

int Tofino::IXBar::Use::hash_dist_hash_group ( ) const
inlineoverridevirtual

Implements IXBar::Use.

◆ hash_dist_used_for()

std::string Tofino::IXBar::Use::hash_dist_used_for ( ) const
inlineoverridevirtual

Implements IXBar::Use.

◆ hash_groups()

int IXBar::Use::hash_groups ( ) const
overridevirtual

Implements IXBar::Use.

◆ is_parity_enabled()

bool Tofino::IXBar::Use::is_parity_enabled ( ) const
inlineoverridevirtual

Implements IXBar::Use.

◆ match_hash()

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

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

Reimplemented from IXBar::Use.

◆ meter_bit_mask()

bitvec Tofino::IXBar::Use::meter_bit_mask ( ) const
inlineoverridevirtual

Implements IXBar::Use.

◆ ternary_align()

int IXBar::Use::ternary_align ( const Loc & loc) const
overridevirtual

Implements IXBar::Use.

◆ total_input_bits()

int Tofino::IXBar::Use::total_input_bits ( ) const
inlineoverridevirtual

Implements IXBar::Use.

◆ update_resources()

void IXBar::Use::update_resources ( int stage,
BFN::Resources::StageResources & stageResource ) const
overridevirtual

Reimplemented from IXBar::Use.

◆ way_source_kind()

const char * Tofino::IXBar::Use::way_source_kind ( ) const
inlineoverridevirtual

Implements IXBar::Use.