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

#include <legacy_action_packing_validator.h>

Inheritance diagram for PHV::legacy::ActionPackingValidator:
[legend]

Public Member Functions

 ActionPackingValidator (const ActionSourceTracker &sources, const PhvUse &uses)
 
Result can_pack (const ordered_set< const SuperCluster::SliceList * > &slice_lists, const ordered_set< const SuperCluster::SliceList * > &can_be_further_split={}, const bool loose_mode=false) const override
 
- Public Member Functions inherited from PHV::ActionPackingValidatorInterface

Detailed Description

ActionPackingValidator checks action PHV constraints for packing of fieldslices, by using ActionConstraintSolver. It will try to compute container sizes and corresponding alignments of all slice lists, and then it will build and call the solver to check if it is possible to synthesize actions.

Member Function Documentation

◆ can_pack()

Result PHV::legacy::ActionPackingValidator::can_pack ( const ordered_set< const SuperCluster::SliceList * > & slice_lists,
const ordered_set< const SuperCluster::SliceList * > & can_be_further_split = {},
const bool loose_mode = false ) const
overridevirtual

can_pack checks action phv constraints if fieldslices packed in slice_lists will be allocated without further split. Currently, we only support validation of move-based instructions.

Implements PHV::ActionPackingValidatorInterface.