P4C
The P4 Compiler
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
StatefulAlu::AluOP Struct Reference
Inheritance diagram for StatefulAlu::AluOP:
[legend]

Classes

struct  Decode
 

Public Types

enum  dest_t { LO , HI }
 
- Public Types inherited from Instruction
enum  instruction_set_t { VLIW_ALU = 0 , STATEFUL_ALU = 1 , NUM_SETS = 2 }
 

Public Member Functions

 AluOP (const Decode *op, int l)
 
void dbprint (std::ostream &out) const override
 
bool equiv (Instruction *a_) override
 
std::string name () override
 
Instructionpass1 (Table *tbl, Table::Actions::Action *) override
 
void pass2 (Table *tbl, Table::Actions::Action *) override
 
bool phvRead (std::function< void(const ::Phv::Slice &sl)> fn) override
 
bool salu_alu () const override
 
template<class REGS>
void write_regs (REGS &regs, Table *tbl, Table::Actions::Action *act)
 
template<>
void write_regs (Target::JBay::mau_regs &regs, Table *tbl_, Table::Actions::Action *act)
 
template<>
void write_regs (Target::JBay::mau_regs &regs, Table *tbl_, Table::Actions::Action *act)
 
template<>
void write_regs (Target::Tofino::mau_regs &regs, Table *tbl_, Table::Actions::Action *act)
 
template<>
void write_regs (Target::Tofino::mau_regs &regs, Table *tbl_, Table::Actions::Action *act)
 
- Public Member Functions inherited from StatefulAlu::SaluInstruction
 SaluInstruction (int lineno)
 
- Public Member Functions inherited from Instruction
 Instruction (int l)
 
bool equiv (const std::unique_ptr< Instruction > &a)
 
bool phvRead ()
 
virtual bool phvRead (std::function< void(const Phv::Slice &sl)>)=0
 
virtual bool salu_output () const
 
- Public Member Functions inherited from P4::IHasDbPrint
void print () const
 

Public Attributes

dest_t dest = LO
 
StatefulAlu::AluOP::Decodeopc
 
int predication_encode = STATEFUL_PREDICATION_ENCODE_UNCOND
 
operand srca
 
operand srcb
 
- Public Attributes inherited from Instruction
int lineno
 
int slot
 

Additional Inherited Members

- Static Public Member Functions inherited from StatefulAlu::SaluInstruction
static int decode_predicate (const value_t &exp)
 
- Static Public Member Functions inherited from Instruction
static Instructiondecode (Table *, const Table::Actions::Action *, const VECTOR(value_t) &)
 

Member Function Documentation

◆ dbprint()

void StatefulAlu::AluOP::dbprint ( std::ostream & out) const
inlineoverridevirtual

Implements Instruction.

◆ equiv()

bool AluOP::equiv ( Instruction * a_)
overridevirtual

Implements Instruction.

◆ name()

std::string StatefulAlu::AluOP::name ( )
inlineoverridevirtual

Implements Instruction.

◆ pass1()

Instruction * AluOP::pass1 ( Table * tbl,
Table::Actions::Action * act )
overridevirtual

Implements Instruction.

◆ pass2()

void StatefulAlu::AluOP::pass2 ( Table * tbl,
Table::Actions::Action *  )
inlineoverridevirtual

Implements Instruction.

◆ salu_alu()

bool StatefulAlu::AluOP::salu_alu ( ) const
inlineoverridevirtual

Reimplemented from Instruction.

◆ write_regs() [1/2]

template<>
void StatefulAlu::AluOP::write_regs ( Target::Tofino::mau_regs & regs,
Table * tbl_,
Table::Actions::Action * act )

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

◆ write_regs() [2/2]

template<>
void StatefulAlu::AluOP::write_regs ( Target::Tofino::mau_regs & regs,
Table * tbl_,
Table::Actions::Action * act )

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