P4C
The P4 Compiler
Loading...
Searching...
No Matches
PHV::ContainerOccupancy Class Reference

#include <live_range_split.h>

Public Member Functions

 ContainerOccupancy (int minStage, int maxStage, unsigned containerWidth)
 
std::vector< le_bitrangeavailBitsAt (PHV::StageAndAccess sa, unsigned minLength=0)
 
bool isRangeAvailable (StageAndAccess begin, StageAndAccess end, le_bitrange range)
 
void setRange (StageAndAccess begin, StageAndAccess end, le_bitrange range)
 Set bits in range for stage span [begin, end].
 

Friends

std::ostream & operator<< (std::ostream &os, const ContainerOccupancy &occ)
 

Detailed Description

Represents what bits of a container are used or available over all possible stages.

Member Function Documentation

◆ availBitsAt()

std::vector< le_bitrange > PHV::ContainerOccupancy::availBitsAt ( PHV::StageAndAccess sa,
unsigned minLength = 0 )
inline

Find ranges of available bits in this container at the given StageAndAccess, with optional constraints on the bit length and alignment.