![]() |
P4C
The P4 Compiler
|
Public Member Functions | |
FakeTable (const char *name) | |
void | pass1 () override |
void | pass2 () override |
void | pass3 () override |
void | setup (VECTOR(pair_t) &data) override |
![]() | |
virtual Call & | action_call () |
std::string | action_profile () const |
virtual void | add_field_to_pack_format (json::vector &field_list, unsigned basebit, std::string name, const Table::Format::Field &field, const Table::Actions::Action *act) const |
bool | add_json_node_to_table (json::map &tbl, const char *name, bool append=false) const |
void | add_match_key_cfg (json::map &tbl) const |
json::map & | add_pack_format (json::map &stage_tbl, int memword, int words, int entries=-1) const |
json::map & | add_pack_format (json::map &stage_tbl, Table::Format *format, bool pad_zeros=true, bool print_fields=true, Table::Actions::Action *act=nullptr) const |
virtual void | add_reference_table (json::vector &table_refs, const Table::Call &c) const |
virtual void | add_result_physical_buses (json::map &stage_tbl) const |
virtual json::map * | add_stage_tbl_cfg (json::map &tbl, const char *type, int size) const |
void | add_zero_padding_fields (Table::Format *format, Table::Actions::Action *act=nullptr, unsigned format_width=64) const |
virtual int | address_shift () const |
virtual bool | adr_mux_select_stats () |
void | allocate_physical_ids (unsigned usable=~0U) |
virtual void | apply_to_field (const std::string &n, std::function< void(Format::Field *)> fn) |
void | canon_field_list (json::vector &field_list) const |
void | check_next () |
void | check_next (const Ref &next) |
void | check_next (NextTables &next) |
bool | choose_logical_id (const slist< Table * > *work=nullptr) |
virtual int | color_shiftcount (Table::Call &call, int group, int tcam_shift) const |
virtual void | common_tbl_cfg (json::map &tbl) const |
virtual bitvec | compute_reachable_tables () |
virtual unsigned | determine_shiftcount (Table::Call &call, int group, unsigned word, int tcam_shift) const |
virtual std::vector< int > | determine_spare_bank_memory_units () const |
virtual void | determine_word_and_result_bus () |
virtual int | direct_shiftcount () const |
virtual Format::Field * | find_address_field (const AttachedTable *) const |
virtual std::string | find_field (Format::Field *field) |
virtual int | find_field_lineno (Format::Field *field) |
virtual HashDistribution * | find_hash_dist (int unit) |
virtual int | find_on_actionbus (const ActionBusSource &src, int lo, int hi, int size, int pos=-1) |
int | find_on_actionbus (const char *n, int lo, int hi, int size, int *len=0) |
virtual int | find_on_actionbus (const char *n, TableOutputModifier mod, int lo, int hi, int size, int *len=0) |
int | find_on_actionbus (const std::string &n, int lo, int hi, int size, int *len=0) |
int | find_on_actionbus (const std::string &n, TableOutputModifier mod, int lo, int hi, int size, int *len=0) |
int | find_on_ixbar (Phv::Slice sl, InputXbar::Group group, InputXbar::Group *found=nullptr) |
int | find_on_ixbar (Phv::Slice sl, int group) |
const p4_param * | find_p4_param (std::string s, std::string t="", int start_bit=-1, int width=-1) const |
const p4_param * | find_p4_param_type (std::string &s) const |
const std::vector< const p4_param * > | find_p4_params (std::string s, std::string t="", int start_bit=-1, int width=-1) const |
std::map< Table *, std::set< Actions::Action * > > | find_pred_in_stage (int stageno, const std::set< Actions::Action * > &acts=std::set< Actions::Action * >()) |
void | for_all_next (std::function< void(const Ref &)> fn) |
FOR_ALL_REGISTER_SETS (TARGET_OVERLOAD, virtual void write_action_regs,(mau_regs &, const Actions::Action *), {}) FOR_ALL_REGISTER_SETS(TARGET_OVERLOAD | |
virtual std::unique_ptr< json::map > | gen_memory_resource_allocation_tbl_cfg (const char *type, const std::vector< Layout > &layout, bool skip_spare_bank=false) const |
virtual const Call & | get_action () const |
virtual Actions * | get_actions () const |
virtual AttachedTables * | get_attached () |
virtual const AttachedTables * | get_attached () const |
virtual std::vector< Call > | get_calls () const |
void | get_cjson_source (const std::string &field_name, std::string &source, int &start_bit) const |
virtual std::string | get_default_action () |
virtual unsigned | get_default_action_handle () const |
virtual default_action_params * | get_default_action_parameters () |
virtual Format * | get_format () const |
int | get_format_field_size (std::string s) const |
virtual const GatewayTable * | get_gateway () const |
virtual const std::vector< NextTables > & | get_hit_next () const |
virtual MatchTable * | get_match_table () |
virtual const MatchTable * | get_match_table () const |
virtual std::set< MatchTable * > | get_match_tables () |
virtual MeterTable * | get_meter () const |
virtual Format::Field * | get_meter_address_param (MatchTable *) const |
virtual Format::Field * | get_meter_type_param (MatchTable *) const |
virtual const NextTables & | get_miss_next () const |
virtual Format::Field * | get_per_flow_enable_param (MatchTable *) const |
virtual SelectionTable * | get_selector () const |
virtual StatefulTable * | get_stateful () const |
virtual int | get_tcam_id () const |
unsigned | handle () const |
virtual int | hit_next_size () const |
virtual int | home_row () const |
std::string | how_referenced () const |
virtual int | indirect_shiftcount () const |
template<typename T> | |
void | init_json_node (json::map &tbl, const char *name) const |
virtual Call & | instruction_call () |
virtual int | instruction_set () |
virtual bool | is_always_run () const |
virtual bool | is_attached (const Table *) const |
virtual bool | is_directly_referenced (const Table::Call &c) const |
virtual int | json_memunit (const MemUnit &u) const |
unsigned | layout_get_vpn (const MemUnit &m) const |
unsigned | layout_size () const |
void | layout_vpn_bounds (int &min, int &max, bool spare=false) const |
std::string | loc () const |
virtual Format::Field * | lookup_field (const std::string &n, const std::string &act="") const |
virtual void | merge_context_json (json::map &tbl, json::map &stage_tbl) const |
const char * | name () const |
virtual void | need_on_actionbus (const ActionBusSource &src, int lo, int hi, int size) |
virtual void | need_on_actionbus (Table *att, TableOutputModifier mod, int lo, int hi, int size) |
virtual bool | needs_handle () const |
virtual bool | needs_next () const |
void | output_field_to_pack_format (json::vector &field_list, unsigned basebit, std::string name, std::string source, unsigned start_bit, const Table::Format::Field &field, unsigned value=0) const |
const char * | p4_name () const |
unsigned | p4_size () const |
virtual void | pass0 () |
virtual int | ram_word_width () const |
bitvec | reachable_tables () |
virtual bool | run_at_eop () |
virtual void | set_address_used () |
virtual void | set_color_used () |
virtual table_type_t | set_match_table (MatchTable *m, bool indirect) |
virtual void | set_output_used () |
virtual void | set_pred () |
virtual void | set_stateful (StatefulTable *s) |
virtual int | stm_vbus_column () const |
int | table_id () const |
virtual table_type_t | table_type () const |
template<class T> | |
T * | to () |
template<class T> | |
const T * | to () const |
virtual int | unitram_type () |
virtual bool | uses_colormaprams () const |
virtual bool | validate_call (Table::Call &call, MatchTable *self, size_t required_args, int hash_dist_type, Table::Call &first_call) |
bool | validate_instruction (Table::Call &call) const |
template<class REGS> | |
void | write_mapram_regs (REGS ®s, int row, int col, int vpn, int type) |
Additional Inherited Members | |
![]() | |
typedef std::map< std::string, std::string > | default_action_params |
typedef std::vector< p4_param > | p4_params |
enum | table_type_t { OTHER = 0 , TERNARY_INDIRECT , GATEWAY , ACTION , SELECTION , COUNTER , METER , IDLETIME , STATEFUL , HASH_ACTION , EXACT , TERNARY , PHASE0 , ATCAM , PROXY_HASH } |
![]() | |
static bool | allow_bus_sharing (Table *t1, Table *t2) |
![]() | |
Call | action |
std::unique_ptr< ActionBus > | action_bus |
int | action_enable = -1 |
std::unique_ptr< Actions > | actions |
virtual void mau_regs int int virtual FOR_ALL_REGISTER_SETS(TARGET_OVERLOAD, virtual void write_merge_regs,(mau_regs &, MatchTable *match, int type, int bus, const std::vector< Call::Arg > &args), { assert(0);}) virtual void gen_tbl_cfg(json json::map | base_tbl_cfg )(json::vector &out, const char *type, int size) const { assert(0) |
virtual void mau_regs int int | bus |
std::unique_ptr< json::map > | context_json |
std::string | default_action |
unsigned | default_action_handle = 0 |
int | default_action_lineno = -1 |
default_action_params | default_action_parameters |
bool | default_only_action = false |
std::vector< DynamicIXbar > | dynamic_config |
bool | enable_action_data_enable = false |
bool | enable_action_instruction_enable = false |
std::vector< NextTables > | extra_next_lut |
std::unique_ptr< Format > | format |
gress_t | gress |
std::vector< HashDistribution > | hash_dist |
std::vector< NextTables > | hit_next |
std::vector< std::unique_ptr< InputXbar > > | input_xbar |
Call | instruction |
std::vector< Layout > | layout |
int | lineno = -1 |
int | logical_id = -1 |
std::map< int, NextTables > | long_branch |
int | long_branch_input = -1 |
NextTables | miss_next |
std::string | name_ |
unsigned | next_table_adr_mask = 0U |
bool | no_vpns = false |
p4_params | p4_params_list |
P4Table * | p4_table = 0 |
bitvec | physical_ids |
std::map< Table *, std::set< Actions::Action * > > | pred |
bitvec | reachable_tables_ |
Stage * | stage = 0 |
virtual void mau_regs int | type |
int | uid |
virtual void | write_merge_regs |
![]() | |
static std::map< std::string, Table * > * | all |
static std::vector< Table * > * | by_uid |
![]() | |
Table (const Table &)=delete | |
Table (int line, std::string &&n, gress_t gr, Stage *s, int lid=-1) | |
Table (Table &&)=delete | |
void | alloc_busses (BFN::Alloc2Dbase< Table * > &bus_use, Layout::bus_type_t bus_type) |
void | alloc_global_bus (Layout &, Layout::bus_type_t, int, int, int, int) |
virtual void | alloc_global_busses () |
void | alloc_global_srams () |
void | alloc_global_tcams () |
void | alloc_id (const char *idname, int &id, int &next_id, int max_id, bool order, BFN::Alloc1Dbase< Table * > &use) |
void | alloc_maprams () |
void | alloc_rams (bool logical, BFN::Alloc2Dbase< Table * > &use, BFN::Alloc2Dbase< Table * > *bus_use=0, Layout::bus_type_t bus_type=Layout::SEARCH_BUS) |
virtual void | alloc_vpns () |
virtual void | common_init_setup (const VECTOR(pair_t) &, bool, P4Table::type) |
virtual bool | common_setup (pair_t &, const VECTOR(pair_t) &, P4Table::type) |
virtual Layout::bus_type_t | default_bus_type () const |
virtual int | get_start_vpn () |
void | need_bus (int lineno, BFN::Alloc1Dbase< Table * > &use, int idx, const char *name) |
void | setup_actions (value_t &) |
void | setup_context_json (value_t &) |
void | setup_layout (std::vector< Layout > &, const VECTOR(pair_t) &data, const char *subname="") |
int | setup_layout_attrib (std::vector< Layout > &, const value_t &data, const char *what, int Layout::*attr) |
int | setup_layout_bus_attrib (std::vector< Layout > &, const value_t &data, const char *what, Layout::bus_type_t type) |
void | setup_logical_id () |
void | setup_maprams (value_t &) |
void | setup_vpns (std::vector< Layout > &, VECTOR(value_t) *, bool allow_holes=false) |
virtual void | vpn_params (int &width, int &depth, int &period, const char *&period_name) const |
![]() | |
static bool | allow_ram_sharing (const Table *t1, const Table *t2) |
|
inlineoverridevirtual |
Reimplemented from Table.
|
inlineoverridevirtual |
Implements Table.
|
inlineoverridevirtual |
Implements Table.