P4C
The P4 Compiler
Loading...
Searching...
No Matches
container_size_extractor.h
1
19#ifndef BF_P4C_LOGGING_CONTAINER_SIZE_EXTRACTOR_H_
20#define BF_P4C_LOGGING_CONTAINER_SIZE_EXTRACTOR_H_
21
22#include "backends/tofino/bf-p4c/logging/constrained_fields.h"
23#include "backends/tofino/bf-p4c/phv/pragma/pa_container_size.h"
24
29 public:
34 static void extract(const PragmaContainerSize &pragma, ConstrainedFieldMap &dst);
35
36 protected:
37 static void applyConstraintToField(ConstrainedField &field, const std::vector<int> &layout);
38
39 static bool isLoggableOnField(const std::vector<int> &layout);
40
41 static unsigned getFieldSize(const ConstrainedField &field);
42
43 static std::vector<le_bitrange> computeSlicing(unsigned fieldSize,
44 const std::vector<int> &layout);
45
46 static void updateFieldSlicesWithSlicing(const std::vector<le_bitrange> &slicing,
47 ConstrainedField &field);
48
49 static std::vector<ConstrainedSlice *> getSortedSlicePointers(
50 const std::vector<le_bitrange> &slicing, ConstrainedField &field);
51
52 static void applyConstraintToSlices(std::vector<ConstrainedSlice *> &slices,
53 const std::vector<int> &layout);
54};
55
56#endif // BF_P4C_LOGGING_CONTAINER_SIZE_EXTRACTOR_H_
Class representing PHV::Field with constraints and handle for constraint logging. Contains non-group ...
Definition constrained_fields.h:80
Definition container_size_extractor.h:28
static void extract(const PragmaContainerSize &pragma, ConstrainedFieldMap &dst)
Definition logging/container_size_extractor.cpp:24
Definition pa_container_size.h:39