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

Classes

struct  InterleaveInfo
 

Public Types

enum  HoleType_t { LSB , MIDDLE , MSB , INVALID }
 

Public Member Functions

 ByteInfo (const IXBar::Use::Byte b, bitvec bu)
 
bool better_hole_type (int hole, int comp_hole, int overhead_bits) const
 
void dbprint (std::ostream &out) const
 
int hole_size (HoleType_t hole_type, int *hole_start_pos=nullptr) const
 
bool is_better_for_overhead (const ByteInfo &bi, int overhead_bits) const
 
void set_interleave_info (int overhead_bits)
 
- Public Member Functions inherited from P4::IHasDbPrint
void print () const
 

Public Attributes

bitvec bit_use
 
IXBar::Use::Byte byte
 
int byte_location = -1
 
InterleaveInfo il_info
 

Member Function Documentation

◆ better_hole_type()

bool ByteInfo::better_hole_type ( int hole,
int comp_hole,
int overhead_bits ) const

Return the better hole for minimizing byte requirements for packing Least number of bytes in the il_info.byte_cycle Least number

◆ dbprint()

void ByteInfo::dbprint ( std::ostream & out) const
virtual

Implements P4::IHasDbPrint.

◆ is_better_for_overhead()

bool ByteInfo::is_better_for_overhead ( const ByteInfo & bi,
int overhead_bits ) const

Determine which byte is better for overhead, based on either of their LSB or MSB holes

◆ set_interleave_info()

void ByteInfo::set_interleave_info ( int overhead_bits)

Set the information for allocating the interleaved byte.

See also
comments on ByteInfo for the definitions of these values