-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
149 changed files
with
6,132 additions
and
11,615 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
include/aie/Dialect/AIE/Transforms/AIEAssignBufferDescriptorIDs.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
//===- AIEAssignBufferDescriptorIDs.h ---------------------------*- C++ -*-===// | ||
// | ||
// This file is licensed under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
// (c) Copyright 2024 Advanced Micro Devices Inc. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef AIE_ASSIGN_BUFFER_DESCRIPTOR_IDS_H | ||
#define AIE_ASSIGN_BUFFER_DESCRIPTOR_IDS_H | ||
|
||
#include <optional> | ||
|
||
#include "aie/Dialect/AIE/IR/AIEDialect.h" | ||
#include "aie/Dialect/AIE/Transforms/AIEAssignBufferDescriptorIDs.h" | ||
#include "aie/Dialect/AIE/Transforms/AIEPasses.h" | ||
|
||
#include "mlir/Pass/Pass.h" | ||
|
||
using namespace mlir; | ||
using namespace xilinx; | ||
using namespace xilinx::AIE; | ||
|
||
#include "aie/Dialect/AIE/IR/AIEDialect.h" | ||
#include "aie/Dialect/AIE/Transforms/AIEPasses.h" | ||
|
||
#include "mlir/Pass/Pass.h" | ||
|
||
#define DEBUG_TYPE "aie-assign-bd-ids" | ||
|
||
using namespace mlir; | ||
using namespace xilinx; | ||
using namespace xilinx::AIE; | ||
|
||
struct BdIdGenerator { | ||
const int col; | ||
const int row; | ||
const AIETargetModel &targetModel; | ||
std::set<uint32_t> alreadyAssigned; | ||
|
||
BdIdGenerator(int col, int row, const AIETargetModel &targetModel); | ||
|
||
std::optional<uint32_t> nextBdId(int channelIndex); | ||
|
||
void assignBdId(uint32_t bdId); | ||
|
||
bool bdIdAlreadyAssigned(uint32_t bdId); | ||
|
||
void freeBdId(uint32_t bdId); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.