P4C
The P4 Compiler
|
#include <unique_id.h>
Public Types | |
enum | speciality_t { NONE , ATCAM , DLEFT } |
Public Member Functions | |
UniqueId (cstring n) | |
UniqueId | base_match_id () const |
std::string | build_name () const |
bool | equal_table (const UniqueId &ui) const |
bool | logical_table_used () const |
bool | operator!= (const UniqueId &ui) const |
bool | operator< (const UniqueId &ui) const |
bool | operator== (const UniqueId &ui) const |
bool | stage_table_used () const |
cstring | toString () const |
Public Attributes | |
UniqueAttachedId | a_id |
bool | is_gw = false |
int | logical_table = -1 |
cstring | name |
enum P4::UniqueId::speciality_t | speciality = NONE |
int | stage_table = -1 |
The UniqueId is a unique identifier for an individual table after table placement. The UniqueId can be used to build a unique name for the assembler.
This is currently the key for the Memories::Use map, as well as how the tables know if the allocation is attached to a particular table.
The unique identifier will be unique between each table as long as none of the tables have the same name. After TablePlacement, tables that have been split into multiple tables, due to either stage splits or logical table splits, should have a unique stage_table and logical_table. Both of these should be validated by the CheckTableNameDuplicate pass.