1#ifndef BACKENDS_P4TOOLS_MODULES_SMITH_TARGETS_NIC_TARGET_H_
2#define BACKENDS_P4TOOLS_MODULES_SMITH_TARGETS_NIC_TARGET_H_
7#include "backends/p4tools/modules/smith/common/declarations.h"
8#include "backends/p4tools/modules/smith/common/expressions.h"
9#include "backends/p4tools/modules/smith/common/parser.h"
10#include "backends/p4tools/modules/smith/common/statements.h"
11#include "backends/p4tools/modules/smith/common/table.h"
12#include "backends/p4tools/modules/smith/core/target.h"
15namespace P4::P4Tools::P4Smith::Nic {
17class AbstractNicSmithTarget :
public SmithTarget {
19 explicit AbstractNicSmithTarget(
const std::string &deviceName,
const std::string &archName);
22class DpdkPnaSmithTarget :
public AbstractNicSmithTarget {
30 [[nodiscard]] IR::P4Parser *generateMainParserBlock()
const;
31 [[nodiscard]] IR::P4Control *generatePreControlBlock()
const;
32 [[nodiscard]] IR::P4Control *generateMainControlBlock()
const;
33 [[nodiscard]] IR::P4Control *generateMainDeparserBlock()
const;
41 [[nodiscard]]
const IR::P4Program *generateP4Program()
const override;
44 return *_declarationGenerator;
48 return *_expressionGenerator;
52 return *_statementGenerator;
55 [[nodiscard]]
ParserGenerator &parserGenerator()
const override {
return *_parserGenerator; }
57 [[nodiscard]]
TableGenerator &tableGenerator()
const override {
return *_tableGenerator; }