MLIR-AIE
AIETargetModel.h
Go to the documentation of this file.
1//===- AIETargetModel.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// (c) Copyright 2023 Advanced Micro Devices, Inc.
8//
9//===----------------------------------------------------------------------===//
10
11#ifndef MLIR_AIE_DEVICEMODEL_H
12#define MLIR_AIE_DEVICEMODEL_H
13
16
17#include "llvm/ADT/DenseSet.h"
18
19#include <iostream>
20#include <memory>
21#include <mutex>
22
23namespace xilinx::AIE {
24
25using TileID = struct TileID {
26 // friend definition (will define the function as a non-member function in the
27 // namespace surrounding the class).
28 friend std::ostream &operator<<(std::ostream &os, const TileID &s) {
29 os << "TileID(" << s.col << ", " << s.row << ")";
30 return os;
31 }
32
33 friend std::string to_string(const TileID &s) {
34 std::ostringstream ss;
35 ss << s;
36 return ss.str();
37 }
38
39 friend llvm::raw_ostream &operator<<(llvm::raw_ostream &os, const TileID &s) {
40 os << to_string(s);
41 return os;
42 }
43
44 // Imposes a lexical order on TileIDs.
45 inline bool operator<(const TileID &rhs) const {
46 return std::tie(col, row) < std::tie(rhs.col, rhs.row);
47 }
48
49 bool operator==(const TileID &rhs) const {
50 return std::tie(col, row) == std::tie(rhs.col, rhs.row);
51 }
52
53 bool operator!=(const TileID &rhs) const { return !(*this == rhs); }
54
55 int col, row;
56};
57
59
60public:
83
84 // One-hot encoded list of target model properties.
86 // Device uses semaphore locks.
88 // Device is an NPU-based device.
89 // There are several special cases for handling the NPU at the moment.
90 IsNPU = 1U << 1,
91 // Device model is virtualized.
92 // This is used during CDO code generation to configure aie-rt properly.
93 IsVirtualized = 1U << 2,
94 // Device uses multi-dimensional buffer descriptors.
96 };
97
98private:
99 const TargetModelKind kind;
100
101 uint32_t ModelProperties = 0;
102
103 // Register database (loaded lazily on first access)
104 // Thread-safe lazy initialization using std::call_once
105 mutable std::unique_ptr<RegisterDatabase> regDB;
106 mutable std::once_flag regDBInitFlag;
107
108protected:
109 /// Subclasses override to provide architecture-specific database loading.
110 /// Returns nullptr if register database is not available for this
111 /// architecture.
112 virtual std::unique_ptr<RegisterDatabase> loadRegisterDatabase() const;
113
114 /// Get the register database, loading it lazily on first access.
115 /// Throws fatal error if database is required but unavailable.
117
118public:
119 TargetModelKind getKind() const { return kind; }
120
122
124
125 /// Return the target architecture.
126 virtual AIEArch getTargetArch() const = 0;
127
128 /// Return the data bus width of the device.
129 virtual uint32_t getAddressGenGranularity() const = 0;
130
131 /// Return the number of columns in the device.
132 virtual int columns() const = 0;
133
134 /// Return the number of rows in the device.
135 virtual int rows() const = 0;
136
137 /// Return the tile type for the given tile coordinates.
138 /// - CoreTile: tiles with a Core, TileDMA, tile memory, and stream
139 /// connections.
140 /// - MemTile: tiles with TileDMA, tile memory, and stream connections,
141 /// but no core.
142 /// - ShimNOCTile: tiles with ShimDMA and connection to the memory-mapped NOC.
143 /// - ShimPLTile: tiles with connections to the PL, no ShimDMA.
144 virtual AIETileType getTileType(int col, int row) const = 0;
145
146 /// Return true if the given tile is a Core tile.
147 bool isCoreTile(int col, int row) const {
148 return getTileType(col, row) == AIETileType::CoreTile;
149 }
150
151 /// Return true if the given tile is a Mem tile.
152 bool isMemTile(int col, int row) const {
153 return getTileType(col, row) == AIETileType::MemTile;
154 }
155
156 /// Return true if the given tile is a ShimNOC tile.
157 bool isShimNOCTile(int col, int row) const {
158 return getTileType(col, row) == AIETileType::ShimNOCTile;
159 }
160
161 /// Return true if the given tile is a ShimPL tile.
162 bool isShimPLTile(int col, int row) const {
163 return getTileType(col, row) == AIETileType::ShimPLTile;
164 }
165
166 /// Return true if the given tile is either a ShimNOC or ShimPL tile.
167 bool isShimNOCorPLTile(int col, int row) const {
168 AIETileType t = getTileType(col, row);
169 return t == AIETileType::ShimNOCTile || t == AIETileType::ShimPLTile;
170 }
171
172 /// Return true if the given tile ID is valid.
173 virtual bool isValidTile(TileID src) const {
174 return src.col >= 0 && src.col < columns() && src.row >= 0 &&
175 src.row < rows();
176 }
177
178 /// Return the tile ID of the memory to the west of the given tile, if it
179 /// exists.
180 virtual std::optional<TileID> getMemWest(TileID src) const = 0;
181 /// Return the tile ID of the memory to the east of the given tile, if it
182 /// exists.
183 virtual std::optional<TileID> getMemEast(TileID src) const = 0;
184 /// Return the tile ID of the memory to the north of the given tile, if it
185 /// exists.
186 virtual std::optional<TileID> getMemNorth(TileID src) const = 0;
187 /// Return the tile ID of the memory to the south of the given tile, if it
188 /// exists.
189 virtual std::optional<TileID> getMemSouth(TileID src) const = 0;
190
191 /// Return true if src is the internal memory of dst
192 bool isInternal(int srcCol, int srcRow, int dstCol, int dstRow) const {
193 return srcCol == dstCol && srcRow == dstRow;
194 }
195
196 /// Return true if src is West of dst
197 bool isWest(int srcCol, int srcRow, int dstCol, int dstRow) const {
198 return srcCol == dstCol + 1 && srcRow == dstRow;
199 }
200
201 /// Return true if src is East of dst
202 bool isEast(int srcCol, int srcRow, int dstCol, int dstRow) const {
203 return srcCol == dstCol - 1 && srcRow == dstRow;
204 }
205
206 /// Return true if src is North of dst
207 bool isNorth(int srcCol, int srcRow, int dstCol, int dstRow) const {
208 return srcCol == dstCol && srcRow == dstRow - 1;
209 }
210
211 /// Return true if src is South of dst
212 bool isSouth(int srcCol, int srcRow, int dstCol, int dstRow) const {
213 return srcCol == dstCol && srcRow == dstRow + 1;
214 }
215
216 /// Return true if src has a memory tile which is West of dst
217 virtual bool isMemWest(int srcCol, int srcRow, int dstCol,
218 int dstRow) const = 0;
219 /// Return true if src has a memory tile which is East of dst
220 virtual bool isMemEast(int srcCol, int srcRow, int dstCol,
221 int dstRow) const = 0;
222 /// Return true if src has a memory tile which is North of dst
223 virtual bool isMemNorth(int srcCol, int srcRow, int dstCol,
224 int dstRow) const = 0;
225 /// Return true if src has a memory tile which is South of dst
226 virtual bool isMemSouth(int srcCol, int srcRow, int dstCol,
227 int dstRow) const = 0;
228
229 /// Return true if core can access the memory in mem
230 virtual bool isLegalMemAffinity(int coreCol, int coreRow, int memCol,
231 int memRow) const = 0;
232
233 /// Return the base address in the local address map for a core.
234 virtual uint32_t getMemInternalBaseAddress(TileID src) const = 0;
235 /// Return the base address in the local address map for a core.
236 virtual uint32_t getMemSouthBaseAddress() const = 0;
237 /// Return the base address in the local address map for a core.
238 virtual uint32_t getMemWestBaseAddress() const = 0;
239 /// Return the base address in the local address map for a core.
240 virtual uint32_t getMemNorthBaseAddress() const = 0;
241 /// Return the base address in the local address map for a core.
242 virtual uint32_t getMemEastBaseAddress() const = 0;
243
244 /// Return the lock base index (or offset) in the local tile when accessing a
245 /// neighbor's lock or an empty optional if an invalid neighbor is given
246 /// Takes into account differences between Memory and Core tiles
247 std::optional<uint32_t> getLockLocalBaseIndex(int localCol, int localRow,
248 int lockCol, int lockRow) const;
249
250 /// Return the memory base address (or offset) in the local tile when
251 /// accessing a neighbor's memory or an empty optional if an invalid neighbor
252 /// is given
253 /// Takes into account differences between Memory and Core tiles
254 std::optional<uint32_t> getMemLocalBaseAddress(int localCol, int localRow,
255 int memCol, int memRow) const;
256
257 /// Return the size (in bytes) of the local data memory of a core.
258 virtual uint32_t getLocalMemorySize() const = 0;
259
260 /// Return the size (in bits) of the accumulator/cascade.
261 virtual uint32_t getAccumulatorCascadeSize() const = 0;
262
263 /// Return the number of lock objects for a given tile type.
264 virtual uint32_t getNumLocks(AIETileType tileType) const = 0;
265
266 /// Return the number of lock objects for a tile at the given coordinates.
267 uint32_t getNumLocks(int col, int row) const {
268 return getNumLocks(getTileType(col, row));
269 }
270
271 /// Return the maximum value that can be stored in a lock register
272 virtual uint32_t getMaxLockValue() const = 0;
273
274 // Return the lock address for the lock ID in the local memory for a given
275 // tile or a nullopt if invalid arguments are given.
276 virtual std::optional<uint32_t> getLocalLockAddress(uint32_t lockId,
277 TileID tile) const = 0;
278
279 /// Return the number of buffer descriptors for a given tile type.
280 virtual uint32_t getNumBDs(AIETileType tileType) const = 0;
281
282 /// Get stream switch port index for a given port specification
283 /// Return port index for Stream_Switch_Event_Port_Selection register, or
284 /// nullopt if invalid
285 virtual std::optional<uint32_t>
286 getStreamSwitchPortIndex(int col, int row, WireBundle bundle,
287 uint32_t channel, bool master) const = 0;
288
289 /// Return the number of buffer descriptors supported by the DMA in the given
290 /// tile.
291 uint32_t getNumBDs(int col, int row) const {
292 return getNumBDs(getTileType(col, row));
293 }
294
295 /// Return the number of buffer descriptors accessible on channel `channel`
296 /// for the tile at (`col`, `row`). For tiles with no per-channel BD
297 /// partitioning this equals getNumBDs(col, row).
298 uint32_t getNumBDsForChannel(int col, int row, int channel) const {
299 uint32_t count = 0;
300 for (uint32_t bd = 0; bd < getNumBDs(col, row); ++bd)
302 ++count;
303 return count;
304 }
305
306 /// Return true iff buffer descriptor `bd_id` on tile (`col`, `row`) can be
307 /// submitted on channel `channel`.
308 virtual bool isBdChannelAccessible(int col, int row, uint32_t bd_id,
309 int channel) const = 0;
310
311 /// Return the array address of the dma buffer descriptor for the given
312 /// col, row, buffer descriptor id, channel and direction. Not all
313 /// architecture variants will use channel and direction so these have default
314 /// values.
315 virtual uint64_t getDmaBdAddress(
316 int col, int row, uint32_t bd_id, int channel = -1,
317 AIE::DMAChannelDir direction = AIE::DMAChannelDir::MM2S) const = 0;
318
319 /// Return the offset of the base address field within the shim dma buffer
320 /// descriptor.
321 virtual uint32_t getDmaBdAddressOffset(int col, int row) const = 0;
322
323 /// Return the array address of the dma task queue register for the given
324 /// col, row, channel and direction
325 virtual uint32_t getDmaControlAddress(int col, int row, int channel,
326 AIE::DMAChannelDir direction) const = 0;
327
328 virtual uint32_t getNumMemTileRows() const = 0;
329 /// Return the size (in bytes) of a MemTile.
330 virtual uint32_t getMemTileSize() const = 0;
331 /// Return the number of memory banks of a given tile.
332 virtual uint32_t getNumBanks(int col, int row) const = 0;
333
335 int row) const = 0;
336
337 /// Return the number of destinations of connections inside a switchbox. These
338 /// are the targets of connect operations in the switchbox.
339 virtual uint32_t getNumDestSwitchboxConnections(int col, int row,
340 WireBundle bundle) const = 0;
341 /// Return the number of sources of connections inside a switchbox. These are
342 /// the origins of connect operations in the switchbox.
343 virtual uint32_t
345 WireBundle bundle) const = 0;
346 /// Return the number of destinations of connections inside a shimmux. These
347 /// are the targets of connect operations in the switchbox.
348 virtual uint32_t getNumDestShimMuxConnections(int col, int row,
349 WireBundle bundle) const = 0;
350 /// Return the number of sources of connections inside a shimmux. These are
351 /// the origins of connect operations in the switchbox.
352 virtual uint32_t getNumSourceShimMuxConnections(int col, int row,
353 WireBundle bundle) const = 0;
354
355 // Return true if the stream switch connection is legal, false otherwise.
356 virtual bool isLegalTileConnection(int col, int row, WireBundle srcBundle,
357 int srcChan, WireBundle dstBundle,
358 int dstChan) const = 0;
359
360 // Run consistency checks on the target model.
361 void validate() const;
362
363 uint32_t getModelProperties() const { return ModelProperties; }
364 void addModelProperty(uint32_t prop) { ModelProperties |= prop; }
365 // Return true if this device has a given property.
366 bool hasProperty(ModelProperty Prop) const {
367 return (getModelProperties() & Prop) == Prop;
368 }
369
370 // Return the bit offset of the column within a tile address.
371 // This is used to compute the control address of a tile from it's column
372 // location.
373 virtual uint32_t getColumnShift() const = 0;
374
375 // Return the bit offset of the row within a tile address.
376 // This is used to compute the control address of a tile from it's row
377 // location.
378 virtual uint32_t getRowShift() const = 0;
379
380 // Returns the list of possible burst encodings (first) and
381 // their corresponding lengths in bytes (second).
382 virtual std::vector<std::pair<uint32_t, uint32_t>>
384
385 // Returns true if the target model supports the given block format.
386 virtual bool isSupportedBlockFormat(std::string const &format) const;
387
388 /// Register Database API - provides access to register and event information
389 /// for trace configuration and low-level register access.
390
391 /// Lookup register information by name and tile.
392 /// Return pointer to register info, or nullptr if not found
393 const RegisterInfo *lookupRegister(llvm::StringRef name, TileID tile,
394 bool isMem = false) const;
395
396 /// Lookup event number by name and tile.
397 /// Return Event number if found, nullopt otherwise
398 std::optional<uint32_t> lookupEvent(llvm::StringRef name, TileID tile,
399 bool isMem = false) const;
400
401 /// Encode a field value with proper bit shifting.
402 /// Return Value shifted to correct bit position
403 uint32_t encodeFieldValue(const BitFieldInfo &field, uint32_t value) const;
404
405 /// Compute a 32-bit mask for a register field.
406 /// Return nullopt if the field does not fit in a 32-bit register.
407 std::optional<uint32_t> getFieldMask(const BitFieldInfo &field) const;
408
409 /// Resolve stream switch port specification to port index.
410 /// Return Port index for stream switch register, or nullopt if invalid
411 std::optional<uint32_t> resolvePortValue(llvm::StringRef value, TileID tile,
412 bool master) const;
413};
414
416public:
418
419 AIEArch getTargetArch() const override;
420
421 std::optional<TileID> getMemWest(TileID src) const override;
422 std::optional<TileID> getMemEast(TileID src) const override;
423 std::optional<TileID> getMemNorth(TileID src) const override;
424 std::optional<TileID> getMemSouth(TileID src) const override;
425
426 bool isMemWest(int srcCol, int srcRow, int dstCol, int dstRow) const override;
427 bool isMemEast(int srcCol, int srcRow, int dstCol, int dstRow) const override;
428 bool isMemNorth(int srcCol, int srcRow, int dstCol,
429 int dstRow) const override;
430 bool isMemSouth(int srcCol, int srcRow, int dstCol,
431 int dstRow) const override;
432
433 bool isLegalMemAffinity(int coreCol, int coreRow, int memCol,
434 int memRow) const override;
435
436 uint32_t getMemInternalBaseAddress(TileID src) const override {
437 if (src.row % 2 == 0)
438 // Internal is West
439 return getMemWestBaseAddress();
440 // Internal is East
441 return getMemEastBaseAddress();
442 }
443
444 uint32_t getMemSouthBaseAddress() const override { return 0x00020000; }
445 uint32_t getMemWestBaseAddress() const override { return 0x00028000; }
446 uint32_t getMemNorthBaseAddress() const override { return 0x00030000; }
447 uint32_t getMemEastBaseAddress() const override { return 0x00038000; }
448 uint32_t getLocalMemorySize() const override { return 0x00008000; }
449 uint32_t getAccumulatorCascadeSize() const override { return 384; }
451 uint32_t getNumLocks(AIETileType tileType) const override {
452 return 16; // AIE1 has no MemTiles, always 16
453 }
454 uint32_t getMaxLockValue() const override { return 1; }
455 std::optional<uint32_t> getLocalLockAddress(uint32_t lockId,
456 TileID tile) const override;
457 uint32_t getNumBDs(AIETileType tileType) const override {
458 return 16; // AIE1 has no MemTiles, always 16
459 }
460 bool isBdChannelAccessible(int col, int row, uint32_t bd_id,
461 int channel) const override {
462 return true;
463 }
464
465 uint64_t getDmaBdAddress(int col, int row, uint32_t bd_id, int channel,
466 AIE::DMAChannelDir direction) const override;
467
468 uint32_t getDmaBdAddressOffset(int col, int row) const override;
469
470 uint32_t getDmaControlAddress(int col, int row, int channel,
471 AIE::DMAChannelDir direction) const override;
472
473 uint32_t getNumMemTileRows() const override { return 0; }
474 uint32_t getMemTileSize() const override { return 0; }
475 uint32_t getNumBanks(int col, int row) const override { return 4; }
476
477 uint32_t getMaxChannelNumForAdjacentMemTile(int col, int row) const override {
478 return 0;
479 }
480
481 uint32_t getNumDestSwitchboxConnections(int col, int row,
482 WireBundle bundle) const override;
483 uint32_t getNumSourceSwitchboxConnections(int col, int row,
484 WireBundle bundle) const override;
485 uint32_t getNumDestShimMuxConnections(int col, int row,
486 WireBundle bundle) const override;
487 uint32_t getNumSourceShimMuxConnections(int col, int row,
488 WireBundle bundle) const override;
489 bool isLegalTileConnection(int col, int row, WireBundle srcBundle,
490 int srcChan, WireBundle dstBundle,
491 int dstChan) const override;
492
493 std::optional<uint32_t> getStreamSwitchPortIndex(int col, int row,
494 WireBundle bundle,
495 uint32_t channel,
496 bool master) const override;
497
498 uint32_t getColumnShift() const override { return 23; }
499 uint32_t getRowShift() const override { return 18; }
500
501 static bool classof(const AIETargetModel *model) {
502 return model->getKind() >= TK_AIE1_VC1902 &&
503 model->getKind() < TK_AIE1_Last;
504 }
505
506 std::vector<std::pair<uint32_t, uint32_t>>
507 getShimBurstEncodingsAndLengths() const override;
508};
509
511protected:
512 std::unique_ptr<RegisterDatabase> loadRegisterDatabase() const override;
513
514public:
520
521 AIEArch getTargetArch() const override;
522
523 uint32_t getAddressGenGranularity() const override { return 32; }
524
525 std::optional<TileID> getMemWest(TileID src) const override;
526 std::optional<TileID> getMemEast(TileID src) const override;
527 std::optional<TileID> getMemNorth(TileID src) const override;
528 std::optional<TileID> getMemSouth(TileID src) const override;
529
530 bool isMemWest(int srcCol, int srcRow, int dstCol, int dstRow) const override;
531 bool isMemEast(int srcCol, int srcRow, int dstCol, int dstRow) const override;
532 bool isMemNorth(int srcCol, int srcRow, int dstCol,
533 int dstRow) const override;
534 bool isMemSouth(int srcCol, int srcRow, int dstCol,
535 int dstRow) const override;
536
537 bool isLegalMemAffinity(int coreCol, int coreRow, int memCol,
538 int memRow) const override;
539
540 uint32_t getMemInternalBaseAddress(TileID src) const override {
541 return getMemEastBaseAddress();
542 }
543
544 uint32_t getMemSouthBaseAddress() const override { return 0x00040000; }
545 uint32_t getMemWestBaseAddress() const override { return 0x00050000; }
546 uint32_t getMemNorthBaseAddress() const override { return 0x00060000; }
547 uint32_t getMemEastBaseAddress() const override { return 0x00070000; }
548 uint32_t getLocalMemorySize() const override { return 0x00010000; }
549 uint32_t getAccumulatorCascadeSize() const override { return 512; }
550
552 uint32_t getNumLocks(AIETileType tileType) const override {
553 return tileType == AIETileType::MemTile ? 64 : 16;
554 }
555
556 uint32_t getMaxLockValue() const override { return 0x3F; }
557
558 std::optional<uint32_t> getLocalLockAddress(uint32_t lockId,
559 TileID tile) const override;
560
561 uint32_t getNumBDs(AIETileType tileType) const override {
562 return tileType == AIETileType::MemTile ? 48 : 16;
563 }
564
565 bool isBdChannelAccessible(int col, int row, uint32_t bd_id,
566 int channel) const override {
567 if (getTileType(col, row) != AIETileType::MemTile) {
568 return true;
569 } else {
570 if ((channel & 1) == 0) { // even channel number
571 return bd_id < 24;
572 } else {
573 return bd_id >= 24;
574 }
575 }
576 }
577
578 uint64_t getDmaBdAddress(int col, int row, uint32_t bd_id, int channel,
579 AIE::DMAChannelDir direction) const override;
580
581 uint32_t getDmaBdAddressOffset(int col, int row) const override;
582
583 uint32_t getDmaControlAddress(int col, int row, int channel,
584 AIE::DMAChannelDir direction) const override;
585
586 uint32_t getMemTileSize() const override { return 0x00080000; }
587
588 uint32_t getNumBanks(int col, int row) const override {
589 return getTileType(col, row) == AIETileType::MemTile ? 8 : 4;
590 }
591
592 uint32_t getMaxChannelNumForAdjacentMemTile(int col, int row) const override {
593 return 4;
594 }
595
596 uint32_t getNumDestSwitchboxConnections(int col, int row,
597 WireBundle bundle) const override;
598 uint32_t getNumSourceSwitchboxConnections(int col, int row,
599 WireBundle bundle) const override;
600 uint32_t getNumDestShimMuxConnections(int col, int row,
601 WireBundle bundle) const override;
602 uint32_t getNumSourceShimMuxConnections(int col, int row,
603 WireBundle bundle) const override;
604 bool isLegalTileConnection(int col, int row, WireBundle srcBundle,
605 int srcChan, WireBundle dstBundle,
606 int dstChan) const override;
607
608 std::optional<uint32_t> getStreamSwitchPortIndex(int col, int row,
609 WireBundle bundle,
610 uint32_t channel,
611 bool master) const override;
612
613 uint32_t getColumnShift() const override { return 25; }
614 uint32_t getRowShift() const override { return 20; }
615
616 static bool classof(const AIETargetModel *model) {
617 return model->getKind() >= TK_AIE2_VE2302 &&
618 model->getKind() < TK_AIE2_Last;
619 }
620
621 std::vector<std::pair<uint32_t, uint32_t>>
622 getShimBurstEncodingsAndLengths() const override;
623};
624
626 llvm::SmallDenseSet<unsigned, 16> nocColumns = {
627 2, 3, 6, 7, 10, 11, 18, 19, 26, 27, 34, 35, 42, 43, 46, 47};
628
629public:
631
632 uint32_t getAddressGenGranularity() const override { return 32; }
633
634 int columns() const override { return 50; }
635
636 int rows() const override { return 9; /* One Shim row and 8 Core rows. */ }
637
638 AIETileType getTileType(int col, int row) const override {
639 if (row == 0) {
640 return nocColumns.contains(col) ? AIETileType::ShimNOCTile
641 : AIETileType::ShimPLTile;
642 }
643 return AIETileType::CoreTile; // AIE1 has no MemTiles
644 }
645
646 static bool classof(const AIETargetModel *model) {
647 return model->getKind() == TK_AIE1_VC1902;
648 }
649};
650
652 llvm::SmallDenseSet<unsigned, 8> nocColumns = {2, 3, 6, 7, 10, 11};
653
654public:
656
657 int columns() const override { return 17; }
658
659 int rows() const override {
660 return 4; /* One Shim row, 1 memtile rows, and 2 Core rows. */
661 }
662
663 AIETileType getTileType(int col, int row) const override {
664 if (row == 0) {
665 return nocColumns.contains(col) ? AIETileType::ShimNOCTile
666 : AIETileType::ShimPLTile;
667 }
668 if (row == 1)
669 return AIETileType::MemTile;
670 return AIETileType::CoreTile;
671 }
672
673 uint32_t getNumMemTileRows() const override { return 1; }
674
675 static bool classof(const AIETargetModel *model) {
676 return model->getKind() == TK_AIE2_VE2302;
677 }
678};
679
681 llvm::SmallDenseSet<unsigned, 16> nocColumns = {2, 3, 6, 7, 14, 15,
682 22, 23, 30, 31, 34, 35};
683
684public:
686
687 int columns() const override { return 38; }
688
689 int rows() const override {
690 return 11; /* One Shim row, 2 memtile rows, and 8 Core rows. */
691 }
692
693 AIETileType getTileType(int col, int row) const override {
694 if (row == 0) {
695 return nocColumns.contains(col) ? AIETileType::ShimNOCTile
696 : AIETileType::ShimPLTile;
697 }
698 if (row == 1 || row == 2)
699 return AIETileType::MemTile;
700 return AIETileType::CoreTile;
701 }
702
703 uint32_t getNumMemTileRows() const override { return 2; }
704
705 static bool classof(const AIETargetModel *model) {
706 return model->getKind() == TK_AIE2_VE2802;
707 }
708};
709
711public:
713 // Device properties initialization
715 }
716
717 int rows() const override {
718 return 6; /* 1 Shim row, 1 memtile row, and 4 Core rows. */
719 }
720
721 uint32_t getNumMemTileRows() const override { return 1; }
722
723 static bool classof(const AIETargetModel *model) {
724 return model->getKind() >= TK_AIE2_NPU1_1Col &&
725 model->getKind() < TK_AIE2_NPU1_Last;
726 }
727};
728
729// A sub-portion of the Phoenix NPU
731 int cols;
732
733public:
736 static_cast<std::underlying_type_t<TargetModelKind>>(
738 _cols - 1)),
739 cols(_cols) {
740 // Device properties initialization
742 }
743
744 int columns() const override { return cols; }
745
746 AIETileType getTileType(int col, int row) const override {
747 if (row == 0)
748 return AIETileType::ShimNOCTile; // NPU1 has no ShimPL tiles
749 if (row == 1)
750 return AIETileType::MemTile;
751 return AIETileType::CoreTile;
752 }
753
754 static bool classof(const AIETargetModel *model) {
755 return model->getKind() >= TK_AIE2_NPU1_1Col &&
756 model->getKind() < TK_AIE2_NPU1_Last;
757 }
758};
759
761public:
763 // Device properties initialization
765 }
766
767 AIEArch getTargetArch() const override;
768
769 int rows() const override {
770 return 6; /* 1 Shim row, 1 memtile row, and 4 Core rows. */
771 }
772
773 AIETileType getTileType(int col, int row) const override {
774 if (row == 0)
775 return AIETileType::ShimNOCTile;
776 if (row == 1)
777 return AIETileType::MemTile;
778 return AIETileType::CoreTile;
779 }
780
781 uint32_t getNumMemTileRows() const override { return 1; }
782
783 std::vector<std::pair<uint32_t, uint32_t>>
784 getShimBurstEncodingsAndLengths() const override;
785
786 bool isSupportedBlockFormat(std::string const &format) const override;
787
788 static bool classof(const AIETargetModel *model) {
789 return model->getKind() >= TK_AIE2_NPU2 &&
790 model->getKind() < TK_AIE2_NPU2_Last;
791 }
792};
793
794// The full Strix NPU
796public:
798
799 int columns() const override { return 8; }
800
801 static bool classof(const AIETargetModel *model) {
802 return model->getKind() == TK_AIE2_NPU2;
803 }
804};
805
806// A sub-portion of the Strix NPU
808 int cols;
809
810public:
813 static_cast<std::underlying_type_t<TargetModelKind>>(TK_AIE2_NPU2) +
814 _cols)),
815 cols(_cols) {
816 // Device properties initialization
818 }
819
820 int columns() const override { return cols; }
821
822 static bool classof(const AIETargetModel *model) {
823 return model->getKind() >= TK_AIE2_NPU2_1Col &&
824 model->getKind() < TK_AIE2_NPU2_Last;
825 }
826};
827
828} // namespace xilinx::AIE
829
830namespace llvm {
831template <>
832struct DenseMapInfo<xilinx::AIE::TileID> {
833 using FirstInfo = DenseMapInfo<int>;
834 using SecondInfo = DenseMapInfo<int>;
835
837 return {FirstInfo::getEmptyKey(), SecondInfo::getEmptyKey()};
838 }
839
841 return {FirstInfo::getTombstoneKey(), SecondInfo::getTombstoneKey()};
842 }
843
844 static unsigned getHashValue(const xilinx::AIE::TileID &t) {
845 return detail::combineHashValue(FirstInfo::getHashValue(t.col),
846 SecondInfo::getHashValue(t.row));
847 }
848
849 static bool isEqual(const xilinx::AIE::TileID &lhs,
850 const xilinx::AIE::TileID &rhs) {
851 return lhs == rhs;
852 }
853};
854} // namespace llvm
855
856template <>
857struct std::hash<xilinx::AIE::TileID> {
858 std::size_t operator()(const xilinx::AIE::TileID &s) const noexcept {
859 std::size_t h1 = std::hash<int>{}(s.col);
860 std::size_t h2 = std::hash<int>{}(s.row);
861 return h1 ^ (h2 << 1);
862 }
863};
864
865#endif
uint32_t getLocalMemorySize() const override
Return the size (in bytes) of the local data memory of a core.
uint32_t getNumMemTileRows() const override
bool isMemNorth(int srcCol, int srcRow, int dstCol, int dstRow) const override
Return true if src has a memory tile which is North of dst.
uint32_t getMemWestBaseAddress() const override
Return the base address in the local address map for a core.
std::optional< uint32_t > getStreamSwitchPortIndex(int col, int row, WireBundle bundle, uint32_t channel, bool master) const override
Get stream switch port index for a given port specification Return port index for Stream_Switch_Event...
uint32_t getNumBanks(int col, int row) const override
Return the number of memory banks of a given tile.
uint32_t getDmaControlAddress(int col, int row, int channel, AIE::DMAChannelDir direction) const override
Return the array address of the dma task queue register for the given col, row, channel and direction...
std::optional< TileID > getMemSouth(TileID src) const override
Return the tile ID of the memory to the south of the given tile, if it exists.
std::optional< uint32_t > getLocalLockAddress(uint32_t lockId, TileID tile) const override
static bool classof(const AIETargetModel *model)
std::optional< TileID > getMemNorth(TileID src) const override
Return the tile ID of the memory to the north of the given tile, if it exists.
uint32_t getMemInternalBaseAddress(TileID src) const override
Return the base address in the local address map for a core.
bool isBdChannelAccessible(int col, int row, uint32_t bd_id, int channel) const override
Return true iff buffer descriptor bd_id on tile (col, row) can be submitted on channel channel.
bool isMemSouth(int srcCol, int srcRow, int dstCol, int dstRow) const override
Return true if src has a memory tile which is South of dst.
uint32_t getMemEastBaseAddress() const override
Return the base address in the local address map for a core.
std::optional< TileID > getMemWest(TileID src) const override
Return the tile ID of the memory to the west of the given tile, if it exists.
bool isLegalMemAffinity(int coreCol, int coreRow, int memCol, int memRow) const override
Return true if core can access the memory in mem.
uint64_t getDmaBdAddress(int col, int row, uint32_t bd_id, int channel, AIE::DMAChannelDir direction) const override
Return the array address of the dma buffer descriptor for the given col, row, buffer descriptor id,...
uint32_t getRowShift() const override
uint32_t getNumSourceShimMuxConnections(int col, int row, WireBundle bundle) const override
Return the number of sources of connections inside a shimmux.
uint32_t getNumDestSwitchboxConnections(int col, int row, WireBundle bundle) const override
Return the number of destinations of connections inside a switchbox.
uint32_t getColumnShift() const override
bool isMemEast(int srcCol, int srcRow, int dstCol, int dstRow) const override
Return true if src has a memory tile which is East of dst.
bool isMemWest(int srcCol, int srcRow, int dstCol, int dstRow) const override
Return true if src has a memory tile which is West of dst.
uint32_t getNumLocks(AIETileType tileType) const override
Return the number of lock objects for a given tile type.
uint32_t getDmaBdAddressOffset(int col, int row) const override
Return the offset of the base address field within the shim dma buffer descriptor.
uint32_t getAccumulatorCascadeSize() const override
Return the size (in bits) of the accumulator/cascade.
AIE1TargetModel(TargetModelKind k)
std::vector< std::pair< uint32_t, uint32_t > > getShimBurstEncodingsAndLengths() const override
uint32_t getMemTileSize() const override
Return the size (in bytes) of a MemTile.
uint32_t getMemSouthBaseAddress() const override
Return the base address in the local address map for a core.
uint32_t getMaxChannelNumForAdjacentMemTile(int col, int row) const override
AIEArch getTargetArch() const override
AIE1 TargetModel.
uint32_t getNumDestShimMuxConnections(int col, int row, WireBundle bundle) const override
Return the number of destinations of connections inside a shimmux.
uint32_t getMemNorthBaseAddress() const override
Return the base address in the local address map for a core.
std::optional< TileID > getMemEast(TileID src) const override
Return the tile ID of the memory to the east of the given tile, if it exists.
uint32_t getNumBDs(AIETileType tileType) const override
Return the number of buffer descriptors for a given tile type.
bool isLegalTileConnection(int col, int row, WireBundle srcBundle, int srcChan, WireBundle dstBundle, int dstChan) const override
uint32_t getMaxLockValue() const override
Return the maximum value that can be stored in a lock register.
uint32_t getNumSourceSwitchboxConnections(int col, int row, WireBundle bundle) const override
Return the number of sources of connections inside a switchbox.
uint32_t getRowShift() const override
uint32_t getMemWestBaseAddress() const override
Return the base address in the local address map for a core.
uint32_t getMemSouthBaseAddress() const override
Return the base address in the local address map for a core.
bool isLegalTileConnection(int col, int row, WireBundle srcBundle, int srcChan, WireBundle dstBundle, int dstChan) const override
uint32_t getNumSourceSwitchboxConnections(int col, int row, WireBundle bundle) const override
Return the number of sources of connections inside a switchbox.
std::vector< std::pair< uint32_t, uint32_t > > getShimBurstEncodingsAndLengths() const override
uint32_t getNumLocks(AIETileType tileType) const override
Return the number of lock objects for a given tile type.
uint32_t getMaxChannelNumForAdjacentMemTile(int col, int row) const override
uint32_t getAddressGenGranularity() const override
Return the data bus width of the device.
std::optional< TileID > getMemWest(TileID src) const override
Return the tile ID of the memory to the west of the given tile, if it exists.
uint32_t getAccumulatorCascadeSize() const override
Return the size (in bits) of the accumulator/cascade.
std::unique_ptr< RegisterDatabase > loadRegisterDatabase() const override
AIE2 TargetModel.
std::optional< uint32_t > getStreamSwitchPortIndex(int col, int row, WireBundle bundle, uint32_t channel, bool master) const override
Get stream switch port index for a given port specification Return port index for Stream_Switch_Event...
bool isBdChannelAccessible(int col, int row, uint32_t bd_id, int channel) const override
Return true iff buffer descriptor bd_id on tile (col, row) can be submitted on channel channel.
AIEArch getTargetArch() const override
Return the target architecture.
bool isLegalMemAffinity(int coreCol, int coreRow, int memCol, int memRow) const override
Return true if core can access the memory in mem.
std::optional< TileID > getMemEast(TileID src) const override
Return the tile ID of the memory to the east of the given tile, if it exists.
uint32_t getMaxLockValue() const override
Return the maximum value that can be stored in a lock register.
bool isMemNorth(int srcCol, int srcRow, int dstCol, int dstRow) const override
Return true if src has a memory tile which is North of dst.
uint32_t getLocalMemorySize() const override
Return the size (in bytes) of the local data memory of a core.
uint32_t getMemNorthBaseAddress() const override
Return the base address in the local address map for a core.
uint32_t getNumDestShimMuxConnections(int col, int row, WireBundle bundle) const override
Return the number of destinations of connections inside a shimmux.
uint32_t getColumnShift() const override
uint64_t getDmaBdAddress(int col, int row, uint32_t bd_id, int channel, AIE::DMAChannelDir direction) const override
Return the array address of the dma buffer descriptor for the given col, row, buffer descriptor id,...
uint32_t getMemEastBaseAddress() const override
Return the base address in the local address map for a core.
uint32_t getMemInternalBaseAddress(TileID src) const override
Return the base address in the local address map for a core.
uint32_t getNumBanks(int col, int row) const override
Return the number of memory banks of a given tile.
static bool classof(const AIETargetModel *model)
AIE2TargetModel(TargetModelKind k)
uint32_t getDmaControlAddress(int col, int row, int channel, AIE::DMAChannelDir direction) const override
Return the array address of the dma task queue register for the given col, row, channel and direction...
uint32_t getNumBDs(AIETileType tileType) const override
Return the number of buffer descriptors for a given tile type.
std::optional< uint32_t > getLocalLockAddress(uint32_t lockId, TileID tile) const override
std::optional< TileID > getMemSouth(TileID src) const override
Return the tile ID of the memory to the south of the given tile, if it exists.
uint32_t getMemTileSize() const override
Return the size (in bytes) of a MemTile.
uint32_t getNumDestSwitchboxConnections(int col, int row, WireBundle bundle) const override
Return the number of destinations of connections inside a switchbox.
bool isMemWest(int srcCol, int srcRow, int dstCol, int dstRow) const override
Return true if src has a memory tile which is West of dst.
bool isMemSouth(int srcCol, int srcRow, int dstCol, int dstRow) const override
Return true if src has a memory tile which is South of dst.
std::optional< TileID > getMemNorth(TileID src) const override
Return the tile ID of the memory to the north of the given tile, if it exists.
bool isMemEast(int srcCol, int srcRow, int dstCol, int dstRow) const override
Return true if src has a memory tile which is East of dst.
uint32_t getNumSourceShimMuxConnections(int col, int row, WireBundle bundle) const override
Return the number of sources of connections inside a shimmux.
uint32_t getDmaBdAddressOffset(int col, int row) const override
Return the offset of the base address field within the shim dma buffer descriptor.
std::optional< uint32_t > resolvePortValue(llvm::StringRef value, TileID tile, bool master) const
Resolve stream switch port specification to port index.
std::optional< uint32_t > getMemLocalBaseAddress(int localCol, int localRow, int memCol, int memRow) const
Return the memory base address (or offset) in the local tile when accessing a neighbor's memory or an...
bool isNorth(int srcCol, int srcRow, int dstCol, int dstRow) const
Return true if src is North of dst.
bool isSouth(int srcCol, int srcRow, int dstCol, int dstRow) const
Return true if src is South of dst.
bool isWest(int srcCol, int srcRow, int dstCol, int dstRow) const
Return true if src is West of dst.
TargetModelKind getKind() const
virtual bool isSupportedBlockFormat(std::string const &format) const
bool isCoreTile(int col, int row) const
Return true if the given tile is a Core tile.
uint32_t getModelProperties() const
virtual AIEArch getTargetArch() const =0
Return the target architecture.
virtual bool isMemNorth(int srcCol, int srcRow, int dstCol, int dstRow) const =0
Return true if src has a memory tile which is North of dst.
virtual uint32_t getNumSourceShimMuxConnections(int col, int row, WireBundle bundle) const =0
Return the number of sources of connections inside a shimmux.
bool isMemTile(int col, int row) const
Return true if the given tile is a Mem tile.
virtual uint32_t getDmaControlAddress(int col, int row, int channel, AIE::DMAChannelDir direction) const =0
Return the array address of the dma task queue register for the given col, row, channel and direction...
virtual uint32_t getMemSouthBaseAddress() const =0
Return the base address in the local address map for a core.
std::optional< uint32_t > getLockLocalBaseIndex(int localCol, int localRow, int lockCol, int lockRow) const
Return the lock base index (or offset) in the local tile when accessing a neighbor's lock or an empty...
void addModelProperty(uint32_t prop)
AIETargetModel(TargetModelKind k)
virtual uint32_t getLocalMemorySize() const =0
Return the size (in bytes) of the local data memory of a core.
std::optional< uint32_t > getFieldMask(const BitFieldInfo &field) const
Compute a 32-bit mask for a register field.
virtual uint32_t getNumLocks(AIETileType tileType) const =0
Return the number of lock objects for a given tile type.
uint32_t encodeFieldValue(const BitFieldInfo &field, uint32_t value) const
Encode a field value with proper bit shifting.
std::optional< uint32_t > lookupEvent(llvm::StringRef name, TileID tile, bool isMem=false) const
Lookup event number by name and tile.
virtual std::optional< TileID > getMemNorth(TileID src) const =0
Return the tile ID of the memory to the north of the given tile, if it exists.
const RegisterInfo * lookupRegister(llvm::StringRef name, TileID tile, bool isMem=false) const
Register Database API - provides access to register and event information for trace configuration and...
virtual std::vector< std::pair< uint32_t, uint32_t > > getShimBurstEncodingsAndLengths() const =0
const RegisterDatabase * getRegisterDatabase() const
Get the register database, loading it lazily on first access.
virtual bool isLegalTileConnection(int col, int row, WireBundle srcBundle, int srcChan, WireBundle dstBundle, int dstChan) const =0
virtual uint32_t getNumBanks(int col, int row) const =0
Return the number of memory banks of a given tile.
virtual bool isMemEast(int srcCol, int srcRow, int dstCol, int dstRow) const =0
Return true if src has a memory tile which is East of dst.
bool isShimPLTile(int col, int row) const
Return true if the given tile is a ShimPL tile.
virtual uint64_t getDmaBdAddress(int col, int row, uint32_t bd_id, int channel=-1, AIE::DMAChannelDir direction=AIE::DMAChannelDir::MM2S) const =0
Return the array address of the dma buffer descriptor for the given col, row, buffer descriptor id,...
virtual bool isBdChannelAccessible(int col, int row, uint32_t bd_id, int channel) const =0
Return true iff buffer descriptor bd_id on tile (col, row) can be submitted on channel channel.
virtual uint32_t getDmaBdAddressOffset(int col, int row) const =0
Return the offset of the base address field within the shim dma buffer descriptor.
virtual uint32_t getAccumulatorCascadeSize() const =0
Return the size (in bits) of the accumulator/cascade.
virtual std::optional< uint32_t > getLocalLockAddress(uint32_t lockId, TileID tile) const =0
virtual uint32_t getMaxChannelNumForAdjacentMemTile(int col, int row) const =0
virtual AIETileType getTileType(int col, int row) const =0
Return the tile type for the given tile coordinates.
virtual bool isValidTile(TileID src) const
Return true if the given tile ID is valid.
bool isEast(int srcCol, int srcRow, int dstCol, int dstRow) const
Return true if src is East of dst.
virtual bool isMemSouth(int srcCol, int srcRow, int dstCol, int dstRow) const =0
Return true if src has a memory tile which is South of dst.
bool isShimNOCorPLTile(int col, int row) const
Return true if the given tile is either a ShimNOC or ShimPL tile.
virtual uint32_t getMemWestBaseAddress() const =0
Return the base address in the local address map for a core.
virtual int rows() const =0
Return the number of rows in the device.
virtual std::optional< TileID > getMemSouth(TileID src) const =0
Return the tile ID of the memory to the south of the given tile, if it exists.
virtual std::optional< TileID > getMemEast(TileID src) const =0
Return the tile ID of the memory to the east of the given tile, if it exists.
bool isShimNOCTile(int col, int row) const
Return true if the given tile is a ShimNOC tile.
virtual uint32_t getNumBDs(AIETileType tileType) const =0
Return the number of buffer descriptors for a given tile type.
virtual uint32_t getMaxLockValue() const =0
Return the maximum value that can be stored in a lock register.
virtual std::unique_ptr< RegisterDatabase > loadRegisterDatabase() const
Subclasses override to provide architecture-specific database loading.
virtual std::optional< TileID > getMemWest(TileID src) const =0
Return the tile ID of the memory to the west of the given tile, if it exists.
virtual uint32_t getColumnShift() const =0
virtual uint32_t getMemNorthBaseAddress() const =0
Return the base address in the local address map for a core.
uint32_t getNumLocks(int col, int row) const
Return the number of lock objects for a tile at the given coordinates.
bool hasProperty(ModelProperty Prop) const
virtual int columns() const =0
Return the number of columns in the device.
uint32_t getNumBDsForChannel(int col, int row, int channel) const
Return the number of buffer descriptors accessible on channel channel for the tile at (col,...
virtual uint32_t getMemEastBaseAddress() const =0
Return the base address in the local address map for a core.
virtual uint32_t getNumMemTileRows() const =0
virtual uint32_t getNumDestShimMuxConnections(int col, int row, WireBundle bundle) const =0
Return the number of destinations of connections inside a shimmux.
virtual bool isMemWest(int srcCol, int srcRow, int dstCol, int dstRow) const =0
Return true if src has a memory tile which is West of dst.
virtual uint32_t getNumDestSwitchboxConnections(int col, int row, WireBundle bundle) const =0
Return the number of destinations of connections inside a switchbox.
virtual uint32_t getMemInternalBaseAddress(TileID src) const =0
Return the base address in the local address map for a core.
bool isInternal(int srcCol, int srcRow, int dstCol, int dstRow) const
Return true if src is the internal memory of dst.
virtual uint32_t getRowShift() const =0
virtual bool isLegalMemAffinity(int coreCol, int coreRow, int memCol, int memRow) const =0
Return true if core can access the memory in mem.
uint32_t getNumBDs(int col, int row) const
Return the number of buffer descriptors supported by the DMA in the given tile.
virtual uint32_t getAddressGenGranularity() const =0
Return the data bus width of the device.
virtual uint32_t getMemTileSize() const =0
Return the size (in bytes) of a MemTile.
virtual std::optional< uint32_t > getStreamSwitchPortIndex(int col, int row, WireBundle bundle, uint32_t channel, bool master) const =0
Get stream switch port index for a given port specification Return port index for Stream_Switch_Event...
virtual uint32_t getNumSourceSwitchboxConnections(int col, int row, WireBundle bundle) const =0
Return the number of sources of connections inside a switchbox.
uint32_t getNumMemTileRows() const override
static bool classof(const AIETargetModel *model)
BaseNPU1TargetModel(TargetModelKind k)
int rows() const override
Return the number of rows in the device.
static bool classof(const AIETargetModel *model)
std::vector< std::pair< uint32_t, uint32_t > > getShimBurstEncodingsAndLengths() const override
BaseNPU2TargetModel(TargetModelKind k)
AIETileType getTileType(int col, int row) const override
Return the tile type for the given tile coordinates.
uint32_t getNumMemTileRows() const override
AIEArch getTargetArch() const override
Return the target architecture.
bool isSupportedBlockFormat(std::string const &format) const override
int rows() const override
Return the number of rows in the device.
static bool classof(const AIETargetModel *model)
int columns() const override
Return the number of columns in the device.
Register and event database for a specific architecture.
static bool classof(const AIETargetModel *model)
int columns() const override
Return the number of columns in the device.
AIETileType getTileType(int col, int row) const override
Return the tile type for the given tile coordinates.
uint32_t getAddressGenGranularity() const override
Return the data bus width of the device.
int rows() const override
Return the number of rows in the device.
int columns() const override
Return the number of columns in the device.
int rows() const override
Return the number of rows in the device.
uint32_t getNumMemTileRows() const override
static bool classof(const AIETargetModel *model)
AIETileType getTileType(int col, int row) const override
Return the tile type for the given tile coordinates.
static bool classof(const AIETargetModel *model)
AIETileType getTileType(int col, int row) const override
Return the tile type for the given tile coordinates.
uint32_t getNumMemTileRows() const override
int columns() const override
Return the number of columns in the device.
int rows() const override
Return the number of rows in the device.
static bool classof(const AIETargetModel *model)
int columns() const override
Return the number of columns in the device.
AIETileType getTileType(int col, int row) const override
Return the tile type for the given tile coordinates.
static bool classof(const AIETargetModel *model)
int columns() const override
Return the number of columns in the device.
Include the generated interface declarations.
friend std::ostream & operator<<(std::ostream &os, const Port &port)
Definition AIEDialect.h:141
TileID { friend std::ostream &operator<<(std::ostream &os, const TileID &s) { os<< "TileID("<< s.col<< ", "<< s.row<< ")" TileID
friend std::string to_string(const TileID &s)
bool operator!=(const Port &rhs) const
Definition AIEDialect.h:135
PathEndPoint src
bool operator==(const Port &rhs) const
Definition AIEDialect.h:131
bool operator<(const Port &rhs) const
Definition AIEDialect.h:137
AIEArch
Definition Passes.h:21
static xilinx::AIE::TileID getTombstoneKey()
static xilinx::AIE::TileID getEmptyKey()
static unsigned getHashValue(const xilinx::AIE::TileID &t)
static bool isEqual(const xilinx::AIE::TileID &lhs, const xilinx::AIE::TileID &rhs)
std::size_t operator()(const xilinx::AIE::TileID &s) const noexcept
Bit field information for a register.