17#ifndef BACKENDS_TC_INTROSPECTION_H_ 
   18#define BACKENDS_TC_INTROSPECTION_H_ 
   20#include "frontends/p4/parseAnnotations.h" 
   21#include "frontends/p4/parserCallGraph.h" 
   24#include "lib/nullstream.h" 
   26#include "tcAnnotations.h" 
   39        schemaVersion = 
nullptr;
 
   40        pipelineName = 
nullptr;
 
   42    void initIntrospectionInfo(IR::TCPipeline *tcPipeline) {
 
   43        schemaVersion = 
"1.0.0"_cs;
 
   44        pipelineName = tcPipeline->pipelineName;
 
 
   54    unsigned int bitwidth;
 
 
   74    unsigned int dataType;
 
   75    unsigned int bitwidth;
 
 
   83enum ActionScope { TableOnly, DefaultOnly, TableAndDefault };
 
   96        scope = TableAndDefault;
 
 
  106    unsigned int tentries;
 
  107    unsigned int numMask;
 
  108    unsigned int keysize;
 
  114        permissions = 
nullptr;
 
 
  140        permissions = 
nullptr;
 
 
  147    IR::TCPipeline *tcPipeline;
 
  157        : tcPipeline(tcPipeline), refMap(refMap), typeMap(typeMap) {}
 
  158    void postorder(
const IR::P4Table *t);
 
  164    void collectTableInfo();
 
  165    void collectExternInfo();
 
  166    void collectKeyInfo(
const IR::Key *k, 
struct TableAttributes *tableinfo);
 
  167    void collectActionInfo(
const IR::ActionList *actionlist, 
struct TableAttributes *tableinfo,
 
  168                           const IR::P4Table *p4table, 
const IR::TCTable *table);
 
  171    bool serializeIntrospectionJson(std::ostream &destination);
 
  172    std::optional<cstring> checkValidTcType(
const IR::StringLiteral *sl);
 
 
The Declaration interface, representing objects with names.
Definition declaration.h:26
 
Class used to encode maps from paths to declarations.
Definition referenceMap.h:66
 
This pass generates introspection JSON into user specified file.
Definition introspection.h:146
 
Definition ordered_map.h:30
 
Definition safe_vector.h:25
 
This file defines functions for the pass to generate the introspection file.
Definition tc/backend.cpp:24
 
Definition introspection.h:85
 
Definition introspection.h:71
 
Definition introspection.h:65
 
Definition introspection.h:133
 
Definition introspection.h:123
 
Definition introspection.h:35
 
Definition introspection.h:48
 
Definition introspection.h:102