P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::P4Tools::P4Testgen::Pna::PnaDpdkProgramInfo Class Reference
Inheritance diagram for P4::P4Tools::P4Testgen::Pna::PnaDpdkProgramInfo:
[legend]

Public Member Functions

 PnaDpdkProgramInfo (const TestgenCompilerResult &compilerResult, ordered_map< cstring, const IR::Type_Declaration * > inputBlocks)
 
 DECLARE_TYPEINFO (PnaDpdkProgramInfo, SharedPnaProgramInfo)
 
const ArchSpecgetArchSpec () const override
 
- Public Member Functions inherited from P4::P4Tools::P4Testgen::Pna::SharedPnaProgramInfo
 SharedPnaProgramInfo (const TestgenCompilerResult &compilerResult, ordered_map< cstring, const IR::Type_Declaration * > inputBlocks)
 
 DECLARE_TYPEINFO (SharedPnaProgramInfo, ProgramInfo)
 
const IR::Expression * dropIsActive () const override
 
const IR::PathExpression * getBlockParam (cstring blockLabel, size_t paramIndex) const
 
const IR::Type_Bits * getParserErrorType () const override
 
const ordered_map< cstring, const IR::Type_Declaration * > * getProgrammableBlocks () const
 
const IR::StateVariable & getTargetInputPortVar () const override
 
const IR::StateVariable & getTargetOutputPortVar () const override
 
- Public Member Functions inherited from P4::P4Tools::P4Testgen::ProgramInfo
 ProgramInfo (const ProgramInfo &)=default
 
 ProgramInfo (ProgramInfo &&)=default
 
virtual const IR::Expression * createTargetUninitialized (const IR::Type *type, bool forceTaint) const
 
 DECLARE_TYPEINFO (ProgramInfo)
 
const NodesCallGraphgetCallGraph () const
 
cstring getCanonicalBlockName (cstring programBlockName) const
 
virtual const TestgenCompilerResultgetCompilerResult () const
 
const ConcolicMethodImplsgetConcolicMethodImpls () const
 
const P4::Coverage::CoverageSetgetCoverableNodes () const
 Getter to access coverableNodes.
 
const IR::P4Program & getP4Program () const
 
const std::vector< Continuation::Command > * getPipelineSequence () const
 
std::optional< const IR::Expression * > getTargetConstraints () const
 
ProgramInfooperator= (const ProgramInfo &)=default
 
ProgramInfooperator= (ProgramInfo &&)=default
 
void produceCopyInOutCall (const IR::Parameter *param, size_t paramIdx, const ArchSpec::ArchMember *archMember, std::vector< Continuation::Command > *copyIns, std::vector< Continuation::Command > *copyOuts) const
 
- Public Member Functions inherited from P4::ICastable
template<typename T >
T & as ()
 Tries to convert the class to type T. A BUG occurs if the cast fails.
 
template<typename T >
const T & as () const
 Tries to convert the class to type T. A BUG occurs if the cast fails.
 
template<typename T >
T * checkedTo ()
 Performs a checked cast. A BUG occurs if the cast fails.
 
template<typename T >
const T * checkedTo () const
 Performs a checked cast. A BUG occurs if the cast fails.
 
- Public Member Functions inherited from P4::RTTI::Base
template<typename T >
bool is () const noexcept
 
virtual bool isA (TypeId typeId) const noexcept=0
 
template<typename T >
const T * to () const noexcept
 Same as to, but returns const pointer to T.
 
template<typename T >
T * to () noexcept
 
virtual TypeId typeId () const noexcept=0
 

Static Public Attributes

static const ArchSpec ARCH_SPEC
 

Additional Inherited Members

- Protected Member Functions inherited from P4::P4Tools::P4Testgen::ProgramInfo
 ProgramInfo (const TestgenCompilerResult &compilerResult)
 
- Protected Member Functions inherited from P4::RTTI::Base
virtual const void * toImpl (TypeId typeId) const noexcept=0
 
- Protected Attributes inherited from P4::P4Tools::P4Testgen::ProgramInfo
ordered_map< cstring, cstringblockMap
 Maps the programmable blocks in the P4 program to their canonical counterpart.
 
ConcolicMethodImpls concolicMethodImpls
 
std::vector< Continuation::Command > pipelineSequence
 The execution sequence of the P4 program.
 
std::optional< const IR::Expression * > targetConstraints = std::nullopt
 The constraints imposed by the target.
 

Constructor & Destructor Documentation

◆ PnaDpdkProgramInfo()

P4::P4Tools::P4Testgen::Pna::PnaDpdkProgramInfo::PnaDpdkProgramInfo ( const TestgenCompilerResult & compilerResult,
ordered_map< cstring, const IR::Type_Declaration * > inputBlocks )

Compute the series of nodes corresponding to the in-order execution of top-level pipeline-component instantiations. For a standard pna, this produces the main parser, the pre control, the main control, and finally the deparser. This sequence also includes nodes that handle transitions between the individual component instantiations.

Member Function Documentation

◆ getArchSpec()

const ArchSpec & P4::P4Tools::P4Testgen::Pna::PnaDpdkProgramInfo::getArchSpec ( ) const
overridevirtual
See also
ProgramInfo::getArchSpec

Implements P4::P4Tools::P4Testgen::ProgramInfo.

Member Data Documentation

◆ ARCH_SPEC

const ArchSpec P4::P4Tools::P4Testgen::Pna::PnaDpdkProgramInfo::ARCH_SPEC
static
Initial value:
= ArchSpec(
"PNA_NIC"_cs,
{
{"MainParserT"_cs, {nullptr, "*main_hdr"_cs, "*main_user_meta"_cs, "*parser_istd"_cs}},
{"PreControlT"_cs, {"*main_hdr"_cs, "*main_user_meta"_cs, "*pre_istd"_cs, "*pre_ostd"_cs}},
{"MainControlT"_cs, {"*main_hdr"_cs, "*main_user_meta"_cs, "*main_istd"_cs, "*ostd"_cs}},
{"MainDeparserT"_cs, {nullptr, "*main_hdr"_cs, "*main_user_meta"_cs, "*ostd"_cs}},
})
See also
ProgramInfo::getArchSpec