MLIR-AIE
AIERT.h
Go to the documentation of this file.
1//===- AIERT.h --------------------------------------------------*- C++ -*-===//
2//
3// This file is licensed under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7// Copyright (C) 2024, Advanced Micro Devices, Inc. All rights reserved.
8//
9//===----------------------------------------------------------------------===//
10
11#ifndef AIE_AIERT_H
12#define AIE_AIERT_H
13
17
18#include "llvm/Support/raw_ostream.h"
19
20#include <map>
21#include <optional>
22#include <string>
23
24namespace xilinx::AIE {
26
29
30 mlir::LogicalResult setIOBackend(bool aieSim, bool xaieDebug);
31 mlir::LogicalResult pushToBdQueueAndEnable(mlir::Operation &op, int col,
32 int row, int chNum,
33 const DMAChannelDir &channelDir,
34 int bdId, int repeatCount);
35 mlir::LogicalResult configureLocksAndBd(mlir::Block &block, int col, int row);
36 mlir::LogicalResult initLocks(DeviceOp &targetOp);
37 mlir::LogicalResult initBuffers(DeviceOp &targetOp);
38 mlir::LogicalResult configureSwitches(DeviceOp &targetOp);
39 mlir::LogicalResult addInitConfig(DeviceOp &targetOp);
40 mlir::LogicalResult addCoreEnable(DeviceOp &targetOp);
41 mlir::LogicalResult addAieElf(uint8_t col, uint8_t row,
42 const mlir::StringRef elfPath, bool aieSim);
43 mlir::LogicalResult addAieElfs(DeviceOp &targetOp,
44 const mlir::StringRef workDirPath,
45 bool aieSim);
46 void startTransaction();
47 void dmaUpdateBdAddr(int col, int row, size_t addr, size_t bdId);
48 std::vector<uint8_t> exportSerializedTransaction();
49
50private:
51 const AIETargetModel &targetModel;
52 struct AIERtImpl;
53 std::unique_ptr<AIERtImpl> aiert;
54};
55
56} // namespace xilinx::AIE
57
58#endif // AIE_AIERT_H
Include the generated interface declarations.
mlir::LogicalResult pushToBdQueueAndEnable(mlir::Operation &op, int col, int row, int chNum, const DMAChannelDir &channelDir, int bdId, int repeatCount)
Definition AIERT.cpp:492
void dmaUpdateBdAddr(int col, int row, size_t addr, size_t bdId)
Definition AIERT.cpp:874
mlir::LogicalResult addAieElfs(DeviceOp &targetOp, const mlir::StringRef workDirPath, bool aieSim)
Definition AIERT.cpp:846
mlir::LogicalResult setIOBackend(bool aieSim, bool xaieDebug)
Definition AIERT.cpp:255
std::vector< uint8_t > exportSerializedTransaction()
Definition AIERT.cpp:886
mlir::LogicalResult initLocks(DeviceOp &targetOp)
Definition AIERT.cpp:531
mlir::LogicalResult configureSwitches(DeviceOp &targetOp)
Definition AIERT.cpp:614
mlir::LogicalResult initBuffers(DeviceOp &targetOp)
Definition AIERT.cpp:562
mlir::LogicalResult addCoreEnable(DeviceOp &targetOp)
Definition AIERT.cpp:813
mlir::LogicalResult addAieElf(uint8_t col, uint8_t row, const mlir::StringRef elfPath, bool aieSim)
Definition AIERT.cpp:824
mlir::LogicalResult configureLocksAndBd(mlir::Block &block, int col, int row)
Definition AIERT.cpp:510
mlir::LogicalResult addInitConfig(DeviceOp &targetOp)
Definition AIERT.cpp:741