49 std::vector<IntrinsicField> intrinsic_metadata[GRESS_T_COUNT];
50 std::vector<IntrinsicField> intrinsic_metadata_for_tm[GRESS_T_COUNT];
51 std::vector<IntrinsicField> intrinsic_metadata_from_parser[GRESS_T_COUNT];
52 std::vector<IntrinsicField> intrinsic_metadata_for_deparser[GRESS_T_COUNT];
53 std::vector<IntrinsicField> intrinsic_metadata_for_output_port[GRESS_T_COUNT];
55 std::vector<IntrinsicParam> parser_intrinsic_types[GRESS_T_COUNT];
56 std::vector<IntrinsicParam> mauppu_intrinsic_types[GRESS_T_COUNT];
57 std::vector<IntrinsicParam> deparser_intrinsic_types[GRESS_T_COUNT];
59 int deparser_intrinsic_metadata_for_deparser_param_index = -1;
62 enum ArchType_t { TNA, T2NA };
66 std::vector<IntrinsicField> getIngressIntrinsicMetadata()
const {
67 return intrinsic_metadata[INGRESS];
70 std::vector<IntrinsicField> getIngressInstrinicMetadataFromParser()
const {
71 return intrinsic_metadata_from_parser[INGRESS];
74 std::vector<IntrinsicField> getIngressInstrinicMetadataForTM()
const {
75 return intrinsic_metadata_for_tm[INGRESS];
78 std::vector<IntrinsicField> getIngressInstrinicMetadataForDeparser()
const {
79 return intrinsic_metadata_for_deparser[INGRESS];
82 std::vector<IntrinsicField> getEgressIntrinsicMetadata()
const {
83 return intrinsic_metadata[EGRESS];
86 std::vector<IntrinsicField> getEgressIntrinsicMetadataFromParser()
const {
87 return intrinsic_metadata_from_parser[EGRESS];
90 std::vector<IntrinsicField> getEgressIntrinsicMetadataForTM()
const {
91 return intrinsic_metadata_for_tm[EGRESS];
94 std::vector<IntrinsicField> getEgressIntrinsicMetadataForDeparser()
const {
95 return intrinsic_metadata_for_deparser[EGRESS];
98 std::vector<IntrinsicField> getEgressIntrinsicMetadataForOutputPort()
const {
99 return intrinsic_metadata_for_output_port[EGRESS];
102 void add_md(gress_t gress,
IntrinsicField f) { intrinsic_metadata[gress].push_back(f); }
105 intrinsic_metadata_for_tm[gress].push_back(f);
109 intrinsic_metadata_from_parser[gress].push_back(f);
113 intrinsic_metadata_for_deparser[gress].push_back(f);
117 intrinsic_metadata_for_output_port[gress].push_back(f);
120 std::vector<IntrinsicParam> getParserIntrinsicTypes(gress_t g)
const {
121 return parser_intrinsic_types[g];
124 std::vector<IntrinsicParam> getMAUIntrinsicTypes(gress_t g)
const {
125 return mauppu_intrinsic_types[g];
128 std::vector<IntrinsicParam> getPPUIntrinsicTypes(gress_t g)
const {
129 return mauppu_intrinsic_types[g];
132 std::vector<IntrinsicParam> getDeparserIntrinsicTypes(gress_t g)
const {
133 return deparser_intrinsic_types[g];
144 return deparser_intrinsic_metadata_for_deparser_param_index;
147 void setTofinoIntrinsicTypes();