P4C
The P4 Compiler
Loading...
Searching...
No Matches
PHV::v2::Vision Struct Reference

#include <greedy_tx_score.h>

Public Types

enum class  ContGress { ingress , egress , unassigned }
 ContGress represents the hardware gress constraint of a container.
 

Public Member Functions

int bits_demand (const PHV::Kind &k) const
 supply vs demand in terms of bits.
 
int bits_supply (const PHV::Kind &k) const
 
bool has_more_than_enough (const PHV::Kind &k) const
 

Public Attributes

ordered_map< ContGress, KindSizeIndexedMapcont_available
 
ordered_map< gress_t, KindSizeIndexedMapcont_required
 
ordered_map< const SuperCluster *, KindSizeIndexedMapsc_cont_required
 
StageIxbarContBytesMap stage_sram_ixbar_cont_bytes
 
StageIxbarContBytesMap stage_tcam_ixbar_cont_bytes
 
TableIxbarContBytesMap table_ixbar_cont_bytes
 maps table to allocated match key positions.
 

Detailed Description

Vision stores (1) available bits in the PHV v.s. unallocated candidates. (2) TODO: table layout status.

Member Data Documentation

◆ cont_available

ordered_map<ContGress, KindSizeIndexedMap> PHV::v2::Vision::cont_available

Available empty containers. Container without gress assignments will be counted twice as in ingress and in egress.

◆ cont_required

ordered_map<gress_t, KindSizeIndexedMap> PHV::v2::Vision::cont_required

The estimated number of containers that will be required for unallocated super clusters, by gress and size.

◆ sc_cont_required

ordered_map<const SuperCluster *, KindSizeIndexedMap> PHV::v2::Vision::sc_cont_required

Map super clusters to required number of containers grouped by kind and size, based on their baseline allocations.

◆ stage_sram_ixbar_cont_bytes

StageIxbarContBytesMap PHV::v2::Vision::stage_sram_ixbar_cont_bytes

maps stages to allocated sram match key positions. We do not need to take table mutually exclusiveness into account because table ixbar cannot be reused, it is a static config.

◆ stage_tcam_ixbar_cont_bytes

StageIxbarContBytesMap PHV::v2::Vision::stage_tcam_ixbar_cont_bytes

maps stages to allocated tcam match key positions. We do not need to take table mutually exclusiveness into account because table ixbar cannot be reused, it is a static config.