P4C
The P4 Compiler
Loading...
Searching...
No Matches
Memories Struct Referenceabstract
Inheritance diagram for Memories:
[legend]

Classes

struct  Use
 

Public Member Functions

virtual void add_table (const IR::MAU::Table *t, const IR::MAU::Table *gw, TableResourceAlloc *resources, const LayoutOption *lo, const ActionData::Format::Use *af, ActionData::FormatType_t ft, int entries, int stage_table, attached_entries_t attached_entries)=0
 
virtual bool allocate_all ()=0
 
virtual bool allocate_all_dummies ()
 
virtual void clear ()=0
 
virtual const ordered_map< cstring, int > collect_sram_block_alloc_info ()=0
 
virtual void fill_placed_scm_table (const IR::MAU::Table *, const TableResourceAlloc *)=0
 
virtual void init_shared (int stage)
 
cstring last_failure () const
 
virtual void printOn (std::ostream &) const =0
 
virtual void remove (const std::map< UniqueId, Use > &alloc)=0
 
virtual void remove (cstring table_name, const Use &alloc)=0
 
virtual void shrink_allowed_lts ()=0
 
virtual void update (const std::map< UniqueId, Use > &alloc)=0
 
virtual void update (cstring table_name, const Use &alloc)=0
 

Static Public Member Functions

static Memoriescreate ()
 

Public Attributes

int local_stage = -1
 

Static Public Attributes

static constexpr int ACTION_TABLES_MAX = 16
 
static constexpr int BUS_COUNT = 2
 
static constexpr int COLOR_MAPRAM_PER_ROW = 4
 
static constexpr int GATEWAYS_PER_ROW = 2
 
static constexpr int IMEM_ADDRESS_BITS = 6
 
static constexpr int IMEM_LOOKUP_BITS = 3
 
static constexpr int LAMB_DEPTH = 64
 
static constexpr int LEFT_SIDE_COLUMNS = 4
 
static constexpr int LEFT_SIDE_RAMS = LEFT_SIDE_COLUMNS * SRAM_ROWS
 
static constexpr int LOCAL_TIND_DEPTH = 64
 
static constexpr int LOGICAL_ROW_MISSING_OFLOW = 8
 
static constexpr int LOGICAL_TABLES = 16
 
static constexpr int MAPRAM_COLUMNS = 6
 
static constexpr int MAPRAM_MASK = (1U << MAPRAM_COLUMNS) - 1
 
static constexpr int MATCH_CENTRAL_ROW = 4
 
static constexpr int MAX_DATA_SWBOX_ROWS = 5
 
static constexpr int MAX_PARTITION_RAMS_PER_ROW = 5
 
static constexpr int MAX_STATS_RAM_PER_ALU = MAPRAM_COLUMNS * MAX_STATS_ROW_PER_ALU
 
static constexpr int MAX_STATS_ROW_PER_ALU = 3
 
static constexpr int METER_ALUS = 4
 
static constexpr int NUM_IDLETIME_BUS = 10
 
static constexpr int PAYLOAD_COUNT = 2
 
static constexpr int RIGHT_SIDE_COLUMNS = SRAM_COLUMNS - LEFT_SIDE_COLUMNS
 
static constexpr int RIGHT_SIDE_RAMS = RIGHT_SIDE_COLUMNS * SRAM_ROWS
 
static constexpr int SRAM_COLUMNS = 10
 
static constexpr int SRAM_DEPTH = 1024
 
static constexpr int SRAM_ROWS = 8
 
static constexpr int STASH_UNITS = 2
 
static constexpr int STATS_ALUS = 4
 
static constexpr int TABLES_MAX = 16
 
static constexpr int TCAM_DEPTH = 512
 
static constexpr int TERNARY_TABLES_MAX = 8
 
static constexpr int TOTAL_LAMBS = 8
 
static constexpr int TOTAL_LOCAL_TIND = 16
 
static constexpr int TOTAL_SRAMS = SRAM_ROWS * SRAM_COLUMNS
 

Protected Types

enum  update_type_t {
  NONE , UPDATE_RAM , UPDATE_MAPRAM , UPDATE_GATEWAY ,
  UPDATE_PAYLOAD , UPDATE_SEARCH_BUS , UPDATE_RESULT_BUS , UPDATE_ACTION_BUS ,
  UPDATE_TIND_BUS , UPDATE_STATEFUL_BUS
}
 

Protected Member Functions

virtual void visitUse (const Use &, std::function< void(cstring &, update_type_t)> fn)=0
 

Protected Attributes

cstring failure_reason
 

Friends

std::ostream & operator<< (std::ostream &out, const Memories &m)
 

Member Data Documentation

◆ SRAM_DEPTH

int Memories::SRAM_DEPTH = 1024
staticconstexpr

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