1#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_TABLE_STEPPER_H_
2#define BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_TABLE_STEPPER_H_
8#include "backends/p4tools/modules/testgen/core/small_step/table_stepper.h"
9#include "backends/p4tools/modules/testgen/lib/execution_state.h"
10#include "backends/p4tools/modules/testgen/lib/test_spec.h"
11#include "backends/p4tools/modules/testgen/targets/bmv2/expr_stepper.h"
12#include "backends/p4tools/modules/testgen/targets/bmv2/test_spec.h"
24 enum class TableImplementation { standard, selector, profile, constant, skip };
27 struct Bmv2V1ModelProperties {
35 std::vector<const IR::Expression *> actionSelectorKeys;
38 bool addProfileToState =
false;
41 TableImplementation implementaton = TableImplementation::standard;
42 } bmv2V1ModelProperties;
45 bool checkForActionProfile();
48 bool checkForActionSelector();
52 void evalTableActionProfile(
const std::vector<const IR::ActionListElement *> &tableActionList);
56 void evalTableActionSelector(
const std::vector<const IR::ActionListElement *> &tableActionList);
60 TableMatchMap *matches,
61 const IR::Expression *hitCondition)
override;
64 const std::vector<const IR::ActionListElement *> &tableActionList)
override;
67 const std::vector<const IR::ActionListElement *> &tableActionList)
override;