P4C
The P4 Compiler
Loading...
Searching...
No Matches
TableResourceAlloc Struct Reference

Public Member Functions

void clear ()
 
void clear_ixbar ()
 
TableResourceAllocclone () const
 
::IXBar::Usefind_ixbar (IXBar::Use::type_t type) const
 
int findBytesOnIxbar (const PHV::FieldSlice &) const
 
bool has_tind () const
 
safe_vector< int > hash_dist_immed_units () const
 
void merge_instr (const TableResourceAlloc *)
 
TableResourceAllocrename (const IR::MAU::Table *tbl, int stage_table=-1, int logical_table=-1)
 
int rng_unit () const
 
void toJSON (P4::JSONGenerator &json) const
 

Static Public Member Functions

static TableResourceAllocfromJSON (P4::JSONLoader &)
 

Public Attributes

autoclone_ptr< ActionDataBus::Useaction_data_xbar
 
ActionData::Format::Use action_format
 
autoclone_ptr< IXBar::Useaction_ixbar
 
autoclone_ptr< IXBar::Usegateway_ixbar
 
safe_vector< Tofino::IXBar::HashDistUsehash_dists
 
InstructionMemory::Use instr_mem
 
LayoutOption layout_option
 
autoclone_ptr< IXBar::Usematch_ixbar
 
std::map< UniqueId, Memories::Usememuse
 
MeterALU::Format::Use meter_format
 
autoclone_ptr< IXBar::Usemeter_ixbar
 
autoclone_ptr< ActionDataBus::Usemeter_xbar
 
autoclone_ptr< IXBar::Useproxy_hash_ixbar
 
autoclone_ptr< IXBar::Usesalu_ixbar
 
autoclone_ptr< IXBar::Useselector_ixbar
 
TableFormat::Use table_format
 

Member Function Documentation

◆ has_tind()

bool TableResourceAlloc::has_tind ( ) const

A ternary indirect table might have been created, when the original layout did not have one, as a gateway is overriding the original TCAM table.

◆ hash_dist_immed_units()

safe_vector< int > TableResourceAlloc::hash_dist_immed_units ( ) const

Return a 2 entry vector indicating which fields are headed to HashDist Immed Lo and HashDist Immediate Hi. If the hash dist is not used, the a -1 will be returned.

◆ rename()

TableResourceAlloc * TableResourceAlloc::rename ( const IR::MAU::Table * tbl,
int stage_table = -1,
int logical_table = -1 )

Copyright (C) 2024 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

SPDX-License-Identifier: Apache-2.0

◆ rng_unit()

int TableResourceAlloc::rng_unit ( ) const

Returns which rng unit has been assigned to this table