14#include "llvm/Support/ErrorHandling.h"
25std::string getModuleForTile(
const AIETargetModel &model,
TileID tile,
27 if (model.isShimNOCorPLTile(tile.col, tile.row))
29 if (model.isMemTile(tile.col, tile.row))
31 return isMem ? std::string(
"memory") : std::string(
"core");
35std::string getModuleForTileEvents(
const AIETargetModel &model,
TileID tile,
37 if (model.isShimNOCorPLTile(tile.col, tile.row))
39 if (model.isMemTile(tile.col, tile.row))
42 return isMem ? std::string(
"memory") : std::string(
"core");
67 return db->lookupRegister(name, getModuleForTile(*
this, tile, isMem));
76 return db->lookupEvent(name, getModuleForTileEvents(*
this, tile, isMem));
80 uint32_t value)
const {
84 return db->encodeFieldValue(field, value);
87std::optional<uint32_t>
90 if (width == 0 || width > 32 || field.
bit_end >= 32)
93 uint64_t mask = (width == 32) ? 0xFFFFFFFFULL : ((1ULL << width) - 1ULL);
95 if (mask > UINT32_MAX)
98 return static_cast<uint32_t
>(mask);
104 auto colonPos = value.find(
':');
105 if (colonPos == StringRef::npos)
108 StringRef portName = value.substr(0, colonPos);
109 StringRef channelStr = value.substr(colonPos + 1);
116 if (portName.equals_insensitive(
"north")) {
117 bundle = WireBundle::North;
118 }
else if (portName.equals_insensitive(
"south")) {
119 bundle = WireBundle::South;
120 }
else if (portName.equals_insensitive(
"east")) {
121 bundle = WireBundle::East;
122 }
else if (portName.equals_insensitive(
"west")) {
123 bundle = WireBundle::West;
124 }
else if (portName.equals_insensitive(
"dma")) {
125 bundle = WireBundle::DMA;
126 }
else if (portName.equals_insensitive(
"fifo")) {
127 bundle = WireBundle::FIFO;
128 }
else if (portName.equals_insensitive(
"core")) {
129 bundle = WireBundle::Core;
130 }
else if (portName.equals_insensitive(
"ctrl")) {
131 bundle = WireBundle::TileControl;
137 static_cast<uint32_t
>(
channel), master);
148 bool isEvenRow = ((
src.row % 2) == 0);
149 std::optional<TileID> ret;
153 ret = {
src.col - 1,
src.row};
161 bool isEvenRow = (
src.row % 2) == 0;
162 std::optional<TileID> ret;
164 ret = {
src.col + 1,
src.row};
174 std::optional<TileID> ret({
src.col,
src.row + 1});
181 std::optional<TileID> ret({
src.col,
src.row - 1});
190 bool IsEvenRow = (srcRow % 2) == 0;
191 return (IsEvenRow &&
isInternal(srcCol, srcRow, dstCol, dstRow)) ||
192 (!IsEvenRow &&
isWest(srcCol, srcRow, dstCol, dstRow));
197 bool IsEvenRow = (srcRow % 2) == 0;
198 return (!IsEvenRow &&
isInternal(srcCol, srcRow, dstCol, dstRow)) ||
199 (IsEvenRow &&
isEast(srcCol, srcRow, dstCol, dstRow));
204 return isNorth(srcCol, srcRow, dstCol, dstRow);
209 return isSouth(srcCol, srcRow, dstCol, dstRow);
214 bool IsEvenRow = ((coreRow % 2) == 0);
216 bool IsMemWest = (
isWest(coreCol, coreRow, memCol, memRow) && !IsEvenRow) ||
217 (
isInternal(coreCol, coreRow, memCol, memRow) && IsEvenRow);
219 bool IsMemEast = (
isEast(coreCol, coreRow, memCol, memRow) && IsEvenRow) ||
220 (
isInternal(coreCol, coreRow, memCol, memRow) && !IsEvenRow);
222 bool IsMemNorth =
isNorth(coreCol, coreRow, memCol, memRow);
223 bool IsMemSouth =
isSouth(coreCol, coreRow, memCol, memRow);
225 return IsMemSouth || IsMemNorth || IsMemWest || IsMemEast;
230 AIE::DMAChannelDir direction)
const {
233 offset = 0x0001D000 + (bd_id * 0x14);
235 offset = 0x0001D000 + (bd_id * 0x20);
238 "AIE1TargetModel::getDmaBdAddress called for non-DMA tile");
249 "AIE1TargetModel::getDmaBdAddressOffset called for non-DMA tile");
254 AIE::DMAChannelDir direction)
const {
257 offset = 0x0001D140 + (
channel * 0x8);
259 offset = 0x0001DE00 + (
channel * 0x8);
262 "AIE1TargetModel::getDmaControlAddress called for non-DMA tile");
264 if (direction == AIE::DMAChannelDir::MM2S)
273 WireBundle bundle)
const {
276 case WireBundle::FIFO:
278 case WireBundle::North:
280 case WireBundle::West: {
285 case WireBundle::South:
287 case WireBundle::East: {
292 case WireBundle::TileControl:
299 case WireBundle::Core:
300 case WireBundle::DMA:
301 case WireBundle::FIFO:
303 case WireBundle::North: {
308 case WireBundle::West: {
313 case WireBundle::South:
315 case WireBundle::East: {
320 case WireBundle::TileControl:
329 WireBundle bundle)
const {
332 case WireBundle::FIFO:
334 case WireBundle::North:
336 case WireBundle::West: {
341 case WireBundle::South:
343 case WireBundle::East: {
348 case WireBundle::Trace:
350 case WireBundle::TileControl:
357 case WireBundle::Core:
358 case WireBundle::DMA:
359 case WireBundle::FIFO:
361 case WireBundle::North: {
366 case WireBundle::West: {
371 case WireBundle::South:
373 case WireBundle::East: {
378 case WireBundle::Trace:
380 case WireBundle::TileControl:
388 WireBundle bundle)
const {
391 case WireBundle::DMA:
393 case WireBundle::NOC:
395 case WireBundle::PLIO:
397 case WireBundle::South:
406 WireBundle bundle)
const {
409 case WireBundle::DMA:
411 case WireBundle::NOC:
413 case WireBundle::PLIO:
415 case WireBundle::South:
424 WireBundle srcBundle,
int srcChan,
425 WireBundle dstBundle,
439 if (srcBundle == WireBundle::Trace)
440 return dstBundle == WireBundle::South;
446 if (srcBundle == WireBundle::Trace)
447 return dstBundle == WireBundle::South;
454std::vector<std::pair<uint32_t, uint32_t>>
456 return {std::pair(0, 64), std::pair(1, 128), std::pair(2, 256)};
459std::optional<uint32_t>
468namespace aie1_port_id {
472static constexpr uint32_t S_CORE_OFFSET = 0;
473static constexpr uint32_t S_CORE_SIZE = 2;
474static constexpr uint32_t S_CTRL_OFFSET = 4;
475static constexpr uint32_t S_CTRL_SIZE = 1;
476static constexpr uint32_t S_DMA_OFFSET = 2;
477static constexpr uint32_t S_DMA_SIZE = 2;
478static constexpr uint32_t S_EAST_OFFSET = 21;
479static constexpr uint32_t S_EAST_SIZE = 4;
480static constexpr uint32_t S_FIFO_OFFSET = 5;
481static constexpr uint32_t S_FIFO_SIZE = 2;
482static constexpr uint32_t S_NORTH_OFFSET = 17;
483static constexpr uint32_t S_NORTH_SIZE = 4;
484static constexpr uint32_t S_SOUTH_OFFSET = 7;
485static constexpr uint32_t S_SOUTH_SIZE = 6;
486static constexpr uint32_t S_TRACE_OFFSET = 25;
487static constexpr uint32_t S_TRACE_SIZE = 2;
488static constexpr uint32_t S_WEST_OFFSET = 13;
489static constexpr uint32_t S_WEST_SIZE = 4;
492static constexpr uint32_t M_CORE_OFFSET = 0;
493static constexpr uint32_t M_CORE_SIZE = 2;
494static constexpr uint32_t M_CTRL_OFFSET = 4;
495static constexpr uint32_t M_CTRL_SIZE = 1;
496static constexpr uint32_t M_DMA_OFFSET = 2;
497static constexpr uint32_t M_DMA_SIZE = 2;
498static constexpr uint32_t M_EAST_OFFSET = 21;
499static constexpr uint32_t M_EAST_SIZE = 4;
500static constexpr uint32_t M_FIFO_OFFSET = 5;
501static constexpr uint32_t M_FIFO_SIZE = 2;
502static constexpr uint32_t M_NORTH_OFFSET = 15;
503static constexpr uint32_t M_NORTH_SIZE = 6;
504static constexpr uint32_t M_SOUTH_OFFSET = 7;
505static constexpr uint32_t M_SOUTH_SIZE = 4;
506static constexpr uint32_t M_WEST_OFFSET = 11;
507static constexpr uint32_t M_WEST_SIZE = 4;
514static constexpr uint32_t S_CTRL_OFFSET = 0;
515static constexpr uint32_t S_CTRL_SIZE = 1;
516static constexpr uint32_t S_EAST_OFFSET = 19;
517static constexpr uint32_t S_EAST_SIZE = 4;
518static constexpr uint32_t S_FIFO_OFFSET = 1;
519static constexpr uint32_t S_FIFO_SIZE = 2;
520static constexpr uint32_t S_NORTH_OFFSET = 15;
521static constexpr uint32_t S_NORTH_SIZE = 4;
522static constexpr uint32_t S_SOUTH_OFFSET = 3;
523static constexpr uint32_t S_SOUTH_SIZE = 8;
524static constexpr uint32_t S_TRACE_OFFSET = 23;
525static constexpr uint32_t S_TRACE_SIZE = 1;
526static constexpr uint32_t S_WEST_OFFSET = 11;
527static constexpr uint32_t S_WEST_SIZE = 4;
530static constexpr uint32_t M_CTRL_OFFSET = 0;
531static constexpr uint32_t M_CTRL_SIZE = 1;
532static constexpr uint32_t M_EAST_OFFSET = 19;
533static constexpr uint32_t M_EAST_SIZE = 4;
534static constexpr uint32_t M_FIFO_OFFSET = 1;
535static constexpr uint32_t M_FIFO_SIZE = 2;
536static constexpr uint32_t M_NORTH_OFFSET = 13;
537static constexpr uint32_t M_NORTH_SIZE = 6;
538static constexpr uint32_t M_SOUTH_OFFSET = 3;
539static constexpr uint32_t M_SOUTH_SIZE = 6;
540static constexpr uint32_t M_WEST_OFFSET = 9;
541static constexpr uint32_t M_WEST_SIZE = 4;
548 int col,
int row, WireBundle bundle, uint32_t port_num,
bool master)
const {
552 case WireBundle::Core:
553 if (port_num >= aie1_port_id::core::M_CORE_SIZE)
555 return aie1_port_id::core::M_CORE_OFFSET + port_num;
556 case WireBundle::TileControl:
557 if (port_num >= aie1_port_id::core::M_CTRL_SIZE)
559 return aie1_port_id::core::M_CTRL_OFFSET + port_num;
560 case WireBundle::DMA:
561 if (port_num >= aie1_port_id::core::M_DMA_SIZE)
563 return aie1_port_id::core::M_DMA_OFFSET + port_num;
564 case WireBundle::East:
565 if (port_num >= aie1_port_id::core::M_EAST_SIZE)
567 return aie1_port_id::core::M_EAST_OFFSET + port_num;
568 case WireBundle::FIFO:
569 if (port_num >= aie1_port_id::core::M_FIFO_SIZE)
571 return aie1_port_id::core::M_FIFO_OFFSET + port_num;
572 case WireBundle::North:
573 if (port_num >= aie1_port_id::core::M_NORTH_SIZE)
575 return aie1_port_id::core::M_NORTH_OFFSET + port_num;
576 case WireBundle::South:
577 if (port_num >= aie1_port_id::core::M_SOUTH_SIZE)
579 return aie1_port_id::core::M_SOUTH_OFFSET + port_num;
580 case WireBundle::West:
581 if (port_num >= aie1_port_id::core::M_WEST_SIZE)
583 return aie1_port_id::core::M_WEST_OFFSET + port_num;
589 case WireBundle::TileControl:
590 if (port_num >= aie1_port_id::shim::M_CTRL_SIZE)
592 return aie1_port_id::shim::M_CTRL_OFFSET + port_num;
593 case WireBundle::East:
594 if (port_num >= aie1_port_id::shim::M_EAST_SIZE)
596 return aie1_port_id::shim::M_EAST_OFFSET + port_num;
597 case WireBundle::FIFO:
598 if (port_num >= aie1_port_id::shim::M_FIFO_SIZE)
600 return aie1_port_id::shim::M_FIFO_OFFSET + port_num;
601 case WireBundle::North:
602 if (port_num >= aie1_port_id::shim::M_NORTH_SIZE)
604 return aie1_port_id::shim::M_NORTH_OFFSET + port_num;
605 case WireBundle::South:
606 if (port_num >= aie1_port_id::shim::M_SOUTH_SIZE)
608 return aie1_port_id::shim::M_SOUTH_OFFSET + port_num;
609 case WireBundle::West:
610 if (port_num >= aie1_port_id::shim::M_WEST_SIZE)
612 return aie1_port_id::shim::M_WEST_OFFSET + port_num;
622 case WireBundle::Core:
623 if (port_num >= aie1_port_id::core::S_CORE_SIZE)
625 return aie1_port_id::core::S_CORE_OFFSET + port_num;
626 case WireBundle::TileControl:
627 if (port_num >= aie1_port_id::core::S_CTRL_SIZE)
629 return aie1_port_id::core::S_CTRL_OFFSET + port_num;
630 case WireBundle::DMA:
631 if (port_num >= aie1_port_id::core::S_DMA_SIZE)
633 return aie1_port_id::core::S_DMA_OFFSET + port_num;
634 case WireBundle::East:
635 if (port_num >= aie1_port_id::core::S_EAST_SIZE)
637 return aie1_port_id::core::S_EAST_OFFSET + port_num;
638 case WireBundle::FIFO:
639 if (port_num >= aie1_port_id::core::S_FIFO_SIZE)
641 return aie1_port_id::core::S_FIFO_OFFSET + port_num;
642 case WireBundle::North:
643 if (port_num >= aie1_port_id::core::S_NORTH_SIZE)
645 return aie1_port_id::core::S_NORTH_OFFSET + port_num;
646 case WireBundle::South:
647 if (port_num >= aie1_port_id::core::S_SOUTH_SIZE)
649 return aie1_port_id::core::S_SOUTH_OFFSET + port_num;
650 case WireBundle::Trace:
651 if (port_num >= aie1_port_id::core::S_TRACE_SIZE)
653 return aie1_port_id::core::S_TRACE_OFFSET + port_num;
654 case WireBundle::West:
655 if (port_num >= aie1_port_id::core::S_WEST_SIZE)
657 return aie1_port_id::core::S_WEST_OFFSET + port_num;
663 case WireBundle::TileControl:
664 if (port_num >= aie1_port_id::shim::S_CTRL_SIZE)
666 return aie1_port_id::shim::S_CTRL_OFFSET + port_num;
667 case WireBundle::East:
668 if (port_num >= aie1_port_id::shim::S_EAST_SIZE)
670 return aie1_port_id::shim::S_EAST_OFFSET + port_num;
671 case WireBundle::FIFO:
672 if (port_num >= aie1_port_id::shim::S_FIFO_SIZE)
674 return aie1_port_id::shim::S_FIFO_OFFSET + port_num;
675 case WireBundle::North:
676 if (port_num >= aie1_port_id::shim::S_NORTH_SIZE)
678 return aie1_port_id::shim::S_NORTH_OFFSET + port_num;
679 case WireBundle::South:
680 if (port_num >= aie1_port_id::shim::S_SOUTH_SIZE)
682 return aie1_port_id::shim::S_SOUTH_OFFSET + port_num;
683 case WireBundle::Trace:
684 if (port_num >= aie1_port_id::shim::S_TRACE_SIZE)
686 return aie1_port_id::shim::S_TRACE_OFFSET + port_num;
687 case WireBundle::West:
688 if (port_num >= aie1_port_id::shim::S_WEST_SIZE)
690 return aie1_port_id::shim::S_WEST_OFFSET + port_num;
704std::unique_ptr<RegisterDatabase>
713 std::optional<TileID> ret({
src.col - 1,
src.row});
722 std::optional ret =
src;
731 std::optional<TileID> ret({
src.col,
src.row + 1});
738 std::optional<TileID> ret({
src.col,
src.row - 1});
748 return isWest(srcCol, srcRow, dstCol, dstRow);
753 return isInternal(srcCol, srcRow, dstCol, dstRow);
758 return isNorth(srcCol, srcRow, dstCol, dstRow);
763 return isSouth(srcCol, srcRow, dstCol, dstRow);
769 bool IsMemWest =
isMemWest(coreCol, coreRow, memCol, memRow);
770 bool IsMemEast =
isMemEast(coreCol, coreRow, memCol, memRow);
771 bool IsMemNorth =
isMemNorth(coreCol, coreRow, memCol, memRow);
772 bool IsMemSouth =
isMemSouth(coreCol, coreRow, memCol, memRow);
775 return isEast(coreCol, coreRow, memCol, memRow) ||
776 isInternal(coreCol, coreRow, memCol, memRow) ||
777 isWest(coreCol, coreRow, memCol, memRow);
778 return (IsMemSouth && !
isMemTile(memCol, memRow)) || IsMemNorth ||
779 IsMemWest || IsMemEast;
784 AIE::DMAChannelDir direction)
const {
787 offset = 0x0001D000 + bd_id * 0x20;
789 offset = 0x000A0000 + bd_id * 0x20;
791 offset = 0x0001D000 + bd_id * 0x20;
794 "AIE2TargetModel::getDmaBdAddress called for non-DMA tile");
808 AIE::DMAChannelDir direction)
const {
811 offset = 0x0001D200 + (
channel * 0x8);
812 if (direction == AIE::DMAChannelDir::MM2S)
815 offset = 0x000A0600 + (
channel * 0x8);
816 if (direction == AIE::DMAChannelDir::MM2S)
819 offset = 0x0001DE00 + (
channel * 0x8);
820 if (direction == AIE::DMAChannelDir::MM2S)
824 "AIE2TargetModel::getDmaControlAddress called for non-DMA tile");
833 WireBundle bundle)
const {
836 case WireBundle::DMA:
837 case WireBundle::North:
839 case WireBundle::South:
841 case WireBundle::TileControl:
849 case WireBundle::FIFO:
851 case WireBundle::North:
853 case WireBundle::West: {
858 case WireBundle::South:
860 case WireBundle::East: {
865 case WireBundle::TileControl:
872 case WireBundle::Core:
874 case WireBundle::DMA:
876 case WireBundle::FIFO:
878 case WireBundle::North: {
883 case WireBundle::West: {
888 case WireBundle::South:
890 case WireBundle::East: {
895 case WireBundle::TileControl:
904 WireBundle bundle)
const {
907 case WireBundle::DMA:
909 case WireBundle::North:
911 case WireBundle::South:
913 case WireBundle::Trace:
914 case WireBundle::TileControl:
922 case WireBundle::FIFO:
924 case WireBundle::North:
926 case WireBundle::West: {
931 case WireBundle::South:
933 case WireBundle::East: {
938 case WireBundle::Trace:
940 case WireBundle::TileControl:
948 case WireBundle::Core:
950 case WireBundle::DMA:
952 case WireBundle::FIFO:
954 case WireBundle::North: {
959 case WireBundle::West: {
964 case WireBundle::South:
966 case WireBundle::East: {
971 case WireBundle::Trace:
974 case WireBundle::TileControl:
983 WireBundle bundle)
const {
986 case WireBundle::DMA:
988 case WireBundle::NOC:
990 case WireBundle::PLIO:
992 case WireBundle::South:
1003 WireBundle bundle)
const {
1006 case WireBundle::DMA:
1008 case WireBundle::NOC:
1010 case WireBundle::PLIO:
1012 case WireBundle::South:
1022 WireBundle srcBundle,
int srcChan,
1023 WireBundle dstBundle,
1024 int dstChan)
const {
1032 auto isBundleInList = [](WireBundle bundle,
1033 std::initializer_list<WireBundle> bundles) {
1034 return std::find(bundles.begin(), bundles.end(), bundle) != bundles.end();
1039 if (srcBundle == WireBundle::DMA) {
1040 if (dstBundle == WireBundle::DMA)
1041 return srcChan == dstChan;
1042 if (isBundleInList(dstBundle, {WireBundle::TileControl, WireBundle::South,
1043 WireBundle::North}))
1046 if (srcBundle == WireBundle::TileControl) {
1047 if (dstBundle == WireBundle::DMA)
1048 return dstChan == 5;
1049 if (isBundleInList(dstBundle, {WireBundle::South, WireBundle::North}))
1052 if (isBundleInList(srcBundle, {WireBundle::South, WireBundle::North})) {
1053 if (isBundleInList(dstBundle, {WireBundle::DMA, WireBundle::TileControl}))
1055 if (isBundleInList(dstBundle, {WireBundle::South, WireBundle::North}))
1056 return srcChan == dstChan;
1058 if (srcBundle == WireBundle::Trace) {
1059 if (dstBundle == WireBundle::DMA)
1060 return dstChan == 5;
1061 if (dstBundle == WireBundle::South)
1067 if (srcBundle == WireBundle::TileControl)
1068 return dstBundle != WireBundle::TileControl;
1069 if (isBundleInList(srcBundle, {WireBundle::FIFO, WireBundle::South}))
1070 return isBundleInList(dstBundle,
1071 {WireBundle::TileControl, WireBundle::FIFO,
1072 WireBundle::South, WireBundle::West,
1073 WireBundle::North, WireBundle::East});
1074 if (isBundleInList(srcBundle,
1075 {WireBundle::West, WireBundle::North, WireBundle::East}))
1076 return (srcBundle == dstBundle)
1077 ? (srcChan == dstChan)
1078 : isBundleInList(dstBundle,
1079 {WireBundle::TileControl, WireBundle::FIFO,
1080 WireBundle::South, WireBundle::West,
1081 WireBundle::North, WireBundle::East});
1082 if (srcBundle == WireBundle::Trace) {
1083 if (isBundleInList(dstBundle, {WireBundle::FIFO, WireBundle::South}))
1085 if (isBundleInList(dstBundle, {WireBundle::West, WireBundle::East}))
1086 return dstChan == 0;
1091 if (isBundleInList(srcBundle,
1092 {WireBundle::DMA, WireBundle::FIFO, WireBundle::South,
1093 WireBundle::West, WireBundle::North, WireBundle::East}))
1094 if (isBundleInList(dstBundle, {WireBundle::Core, WireBundle::DMA,
1095 WireBundle::TileControl, WireBundle::FIFO,
1096 WireBundle::South, WireBundle::West,
1097 WireBundle::North, WireBundle::East}))
1098 return (srcBundle == dstBundle) ? (srcChan == dstChan) :
true;
1099 if (srcBundle == WireBundle::Core)
1100 return dstBundle != WireBundle::Core;
1101 if (srcBundle == WireBundle::TileControl)
1102 return dstBundle != WireBundle::TileControl &&
1103 dstBundle != WireBundle::DMA;
1104 if (srcBundle == WireBundle::Trace) {
1105 if (dstBundle == WireBundle::DMA)
1106 return dstChan == 0;
1107 if (isBundleInList(dstBundle, {WireBundle::FIFO, WireBundle::South}))
1114std::vector<std::pair<uint32_t, uint32_t>>
1116 return {std::pair(0, 64), std::pair(1, 128), std::pair(2, 256)};
1119std::optional<uint32_t>
1121 auto computeTileBaseAddress = 0x0001F000;
1122 auto memTileBaseAddress = 0x000C0000;
1123 auto shimTileBaseAddress = 0x00014000;
1124 auto lockAddrOffset = 0x10;
1128 return computeTileBaseAddress + lockAddrOffset * lockId;
1131 return memTileBaseAddress + lockAddrOffset * lockId;
1135 return shimTileBaseAddress + lockAddrOffset * lockId;
1137 return std::nullopt;
1141namespace aie2_port_id {
1145static constexpr uint32_t S_CORE_OFFSET = 0;
1146static constexpr uint32_t S_CORE_SIZE = 1;
1147static constexpr uint32_t S_CTRL_OFFSET = 3;
1148static constexpr uint32_t S_CTRL_SIZE = 1;
1149static constexpr uint32_t S_DMA_OFFSET = 1;
1150static constexpr uint32_t S_DMA_SIZE = 2;
1151static constexpr uint32_t S_EAST_OFFSET = 19;
1152static constexpr uint32_t S_EAST_SIZE = 4;
1153static constexpr uint32_t S_FIFO_OFFSET = 4;
1154static constexpr uint32_t S_FIFO_SIZE = 1;
1155static constexpr uint32_t S_NORTH_OFFSET = 15;
1156static constexpr uint32_t S_NORTH_SIZE = 4;
1157static constexpr uint32_t S_SOUTH_OFFSET = 5;
1158static constexpr uint32_t S_SOUTH_SIZE = 6;
1159static constexpr uint32_t S_TRACE_OFFSET = 23;
1160static constexpr uint32_t S_TRACE_SIZE = 2;
1161static constexpr uint32_t S_WEST_OFFSET = 11;
1162static constexpr uint32_t S_WEST_SIZE = 4;
1165static constexpr uint32_t M_CORE_OFFSET = 0;
1166static constexpr uint32_t M_CORE_SIZE = 1;
1167static constexpr uint32_t M_CTRL_OFFSET = 3;
1168static constexpr uint32_t M_CTRL_SIZE = 1;
1169static constexpr uint32_t M_DMA_OFFSET = 1;
1170static constexpr uint32_t M_DMA_SIZE = 2;
1171static constexpr uint32_t M_EAST_OFFSET = 19;
1172static constexpr uint32_t M_EAST_SIZE = 4;
1173static constexpr uint32_t M_FIFO_OFFSET = 4;
1174static constexpr uint32_t M_FIFO_SIZE = 1;
1175static constexpr uint32_t M_NORTH_OFFSET = 13;
1176static constexpr uint32_t M_NORTH_SIZE = 6;
1177static constexpr uint32_t M_SOUTH_OFFSET = 5;
1178static constexpr uint32_t M_SOUTH_SIZE = 4;
1179static constexpr uint32_t M_WEST_OFFSET = 9;
1180static constexpr uint32_t M_WEST_SIZE = 4;
1187static constexpr uint32_t S_CTRL_OFFSET = 6;
1188static constexpr uint32_t S_CTRL_SIZE = 1;
1189static constexpr uint32_t S_DMA_OFFSET = 0;
1190static constexpr uint32_t S_DMA_SIZE = 6;
1191static constexpr uint32_t S_NORTH_OFFSET = 13;
1192static constexpr uint32_t S_NORTH_SIZE = 4;
1193static constexpr uint32_t S_SOUTH_OFFSET = 7;
1194static constexpr uint32_t S_SOUTH_SIZE = 6;
1195static constexpr uint32_t S_TRACE_OFFSET = 17;
1196static constexpr uint32_t S_TRACE_SIZE = 1;
1199static constexpr uint32_t M_CTRL_OFFSET = 6;
1200static constexpr uint32_t M_CTRL_SIZE = 1;
1201static constexpr uint32_t M_DMA_OFFSET = 0;
1202static constexpr uint32_t M_DMA_SIZE = 6;
1203static constexpr uint32_t M_NORTH_OFFSET = 11;
1204static constexpr uint32_t M_NORTH_SIZE = 6;
1205static constexpr uint32_t M_SOUTH_OFFSET = 7;
1206static constexpr uint32_t M_SOUTH_SIZE = 4;
1213static constexpr uint32_t S_CTRL_OFFSET = 0;
1214static constexpr uint32_t S_CTRL_SIZE = 1;
1215static constexpr uint32_t S_EAST_OFFSET = 18;
1216static constexpr uint32_t S_EAST_SIZE = 4;
1217static constexpr uint32_t S_FIFO_OFFSET = 1;
1218static constexpr uint32_t S_FIFO_SIZE = 1;
1219static constexpr uint32_t S_NORTH_OFFSET = 14;
1220static constexpr uint32_t S_NORTH_SIZE = 4;
1221static constexpr uint32_t S_SOUTH_OFFSET = 2;
1222static constexpr uint32_t S_SOUTH_SIZE = 8;
1223static constexpr uint32_t S_TRACE_OFFSET = 22;
1224static constexpr uint32_t S_TRACE_SIZE = 2;
1225static constexpr uint32_t S_WEST_OFFSET = 10;
1226static constexpr uint32_t S_WEST_SIZE = 4;
1229static constexpr uint32_t M_CTRL_OFFSET = 0;
1230static constexpr uint32_t M_CTRL_SIZE = 1;
1231static constexpr uint32_t M_EAST_OFFSET = 18;
1232static constexpr uint32_t M_EAST_SIZE = 4;
1233static constexpr uint32_t M_FIFO_OFFSET = 1;
1234static constexpr uint32_t M_FIFO_SIZE = 1;
1235static constexpr uint32_t M_NORTH_OFFSET = 12;
1236static constexpr uint32_t M_NORTH_SIZE = 6;
1237static constexpr uint32_t M_SOUTH_OFFSET = 2;
1238static constexpr uint32_t M_SOUTH_SIZE = 6;
1239static constexpr uint32_t M_WEST_OFFSET = 8;
1240static constexpr uint32_t M_WEST_SIZE = 4;
1247 int col,
int row, WireBundle bundle, uint32_t port_num,
bool master)
const {
1252 case WireBundle::Core:
1253 if (port_num >= aie2_port_id::core::M_CORE_SIZE)
1254 return std::nullopt;
1255 return aie2_port_id::core::M_CORE_OFFSET + port_num;
1256 case WireBundle::TileControl:
1257 if (port_num >= aie2_port_id::core::M_CTRL_SIZE)
1258 return std::nullopt;
1259 return aie2_port_id::core::M_CTRL_OFFSET + port_num;
1260 case WireBundle::DMA:
1261 if (port_num >= aie2_port_id::core::M_DMA_SIZE)
1262 return std::nullopt;
1263 return aie2_port_id::core::M_DMA_OFFSET + port_num;
1264 case WireBundle::East:
1265 if (port_num >= aie2_port_id::core::M_EAST_SIZE)
1266 return std::nullopt;
1267 return aie2_port_id::core::M_EAST_OFFSET + port_num;
1268 case WireBundle::FIFO:
1269 if (port_num >= aie2_port_id::core::M_FIFO_SIZE)
1270 return std::nullopt;
1271 return aie2_port_id::core::M_FIFO_OFFSET + port_num;
1272 case WireBundle::North:
1273 if (port_num >= aie2_port_id::core::M_NORTH_SIZE)
1274 return std::nullopt;
1275 return aie2_port_id::core::M_NORTH_OFFSET + port_num;
1276 case WireBundle::South:
1277 if (port_num >= aie2_port_id::core::M_SOUTH_SIZE)
1278 return std::nullopt;
1279 return aie2_port_id::core::M_SOUTH_OFFSET + port_num;
1280 case WireBundle::West:
1281 if (port_num >= aie2_port_id::core::M_WEST_SIZE)
1282 return std::nullopt;
1283 return aie2_port_id::core::M_WEST_OFFSET + port_num;
1285 return std::nullopt;
1289 case WireBundle::TileControl:
1290 if (port_num >= aie2_port_id::mem::M_CTRL_SIZE)
1291 return std::nullopt;
1292 return aie2_port_id::mem::M_CTRL_OFFSET + port_num;
1293 case WireBundle::DMA:
1294 if (port_num >= aie2_port_id::mem::M_DMA_SIZE)
1295 return std::nullopt;
1296 return aie2_port_id::mem::M_DMA_OFFSET + port_num;
1297 case WireBundle::North:
1298 if (port_num >= aie2_port_id::mem::M_NORTH_SIZE)
1299 return std::nullopt;
1300 return aie2_port_id::mem::M_NORTH_OFFSET + port_num;
1301 case WireBundle::South:
1302 if (port_num >= aie2_port_id::mem::M_SOUTH_SIZE)
1303 return std::nullopt;
1304 return aie2_port_id::mem::M_SOUTH_OFFSET + port_num;
1306 return std::nullopt;
1310 case WireBundle::TileControl:
1311 if (port_num >= aie2_port_id::shim::M_CTRL_SIZE)
1312 return std::nullopt;
1313 return aie2_port_id::shim::M_CTRL_OFFSET + port_num;
1314 case WireBundle::East:
1315 if (port_num >= aie2_port_id::shim::M_EAST_SIZE)
1316 return std::nullopt;
1317 return aie2_port_id::shim::M_EAST_OFFSET + port_num;
1318 case WireBundle::FIFO:
1319 if (port_num >= aie2_port_id::shim::M_FIFO_SIZE)
1320 return std::nullopt;
1321 return aie2_port_id::shim::M_FIFO_OFFSET + port_num;
1322 case WireBundle::North:
1323 if (port_num >= aie2_port_id::shim::M_NORTH_SIZE)
1324 return std::nullopt;
1325 return aie2_port_id::shim::M_NORTH_OFFSET + port_num;
1326 case WireBundle::South:
1327 if (port_num >= aie2_port_id::shim::M_SOUTH_SIZE)
1328 return std::nullopt;
1329 return aie2_port_id::shim::M_SOUTH_OFFSET + port_num;
1330 case WireBundle::West:
1331 if (port_num >= aie2_port_id::shim::M_WEST_SIZE)
1332 return std::nullopt;
1333 return aie2_port_id::shim::M_WEST_OFFSET + port_num;
1335 return std::nullopt;
1343 case WireBundle::Core:
1344 if (port_num >= aie2_port_id::core::S_CORE_SIZE)
1345 return std::nullopt;
1346 return aie2_port_id::core::S_CORE_OFFSET + port_num;
1347 case WireBundle::TileControl:
1348 if (port_num >= aie2_port_id::core::S_CTRL_SIZE)
1349 return std::nullopt;
1350 return aie2_port_id::core::S_CTRL_OFFSET + port_num;
1351 case WireBundle::DMA:
1352 if (port_num >= aie2_port_id::core::S_DMA_SIZE)
1353 return std::nullopt;
1354 return aie2_port_id::core::S_DMA_OFFSET + port_num;
1355 case WireBundle::East:
1356 if (port_num >= aie2_port_id::core::S_EAST_SIZE)
1357 return std::nullopt;
1358 return aie2_port_id::core::S_EAST_OFFSET + port_num;
1359 case WireBundle::FIFO:
1360 if (port_num >= aie2_port_id::core::S_FIFO_SIZE)
1361 return std::nullopt;
1362 return aie2_port_id::core::S_FIFO_OFFSET + port_num;
1363 case WireBundle::North:
1364 if (port_num >= aie2_port_id::core::S_NORTH_SIZE)
1365 return std::nullopt;
1366 return aie2_port_id::core::S_NORTH_OFFSET + port_num;
1367 case WireBundle::South:
1368 if (port_num >= aie2_port_id::core::S_SOUTH_SIZE)
1369 return std::nullopt;
1370 return aie2_port_id::core::S_SOUTH_OFFSET + port_num;
1371 case WireBundle::Trace:
1372 if (port_num >= aie2_port_id::core::S_TRACE_SIZE)
1373 return std::nullopt;
1374 return aie2_port_id::core::S_TRACE_OFFSET + port_num;
1375 case WireBundle::West:
1376 if (port_num >= aie2_port_id::core::S_WEST_SIZE)
1377 return std::nullopt;
1378 return aie2_port_id::core::S_WEST_OFFSET + port_num;
1380 return std::nullopt;
1384 case WireBundle::TileControl:
1385 if (port_num >= aie2_port_id::mem::S_CTRL_SIZE)
1386 return std::nullopt;
1387 return aie2_port_id::mem::S_CTRL_OFFSET + port_num;
1388 case WireBundle::DMA:
1389 if (port_num >= aie2_port_id::mem::S_DMA_SIZE)
1390 return std::nullopt;
1391 return aie2_port_id::mem::S_DMA_OFFSET + port_num;
1392 case WireBundle::North:
1393 if (port_num >= aie2_port_id::mem::S_NORTH_SIZE)
1394 return std::nullopt;
1395 return aie2_port_id::mem::S_NORTH_OFFSET + port_num;
1396 case WireBundle::South:
1397 if (port_num >= aie2_port_id::mem::S_SOUTH_SIZE)
1398 return std::nullopt;
1399 return aie2_port_id::mem::S_SOUTH_OFFSET + port_num;
1400 case WireBundle::Trace:
1401 if (port_num >= aie2_port_id::mem::S_TRACE_SIZE)
1402 return std::nullopt;
1403 return aie2_port_id::mem::S_TRACE_OFFSET + port_num;
1405 return std::nullopt;
1409 case WireBundle::TileControl:
1410 if (port_num >= aie2_port_id::shim::S_CTRL_SIZE)
1411 return std::nullopt;
1412 return aie2_port_id::shim::S_CTRL_OFFSET + port_num;
1413 case WireBundle::East:
1414 if (port_num >= aie2_port_id::shim::S_EAST_SIZE)
1415 return std::nullopt;
1416 return aie2_port_id::shim::S_EAST_OFFSET + port_num;
1417 case WireBundle::FIFO:
1418 if (port_num >= aie2_port_id::shim::S_FIFO_SIZE)
1419 return std::nullopt;
1420 return aie2_port_id::shim::S_FIFO_OFFSET + port_num;
1421 case WireBundle::North:
1422 if (port_num >= aie2_port_id::shim::S_NORTH_SIZE)
1423 return std::nullopt;
1424 return aie2_port_id::shim::S_NORTH_OFFSET + port_num;
1425 case WireBundle::South:
1426 if (port_num >= aie2_port_id::shim::S_SOUTH_SIZE)
1427 return std::nullopt;
1428 return aie2_port_id::shim::S_SOUTH_OFFSET + port_num;
1429 case WireBundle::Trace:
1430 if (port_num >= aie2_port_id::shim::S_TRACE_SIZE)
1431 return std::nullopt;
1432 return aie2_port_id::shim::S_TRACE_OFFSET + port_num;
1433 case WireBundle::West:
1434 if (port_num >= aie2_port_id::shim::S_WEST_SIZE)
1435 return std::nullopt;
1436 return aie2_port_id::shim::S_WEST_OFFSET + port_num;
1438 return std::nullopt;
1442 return std::nullopt;
1448 for (
int j = 0; j <
columns(); j++) {
1456 for (
int j = 0; j <
columns(); j++)
1462 for (
int j = 0; j <
columns(); j++)
1467 for (
int i = 0; i <
rows() - 1; i++)
1468 for (
int j = 0; j <
columns(); j++)
1472 for (
int i = 1; i <
rows(); i++)
1473 for (
int j = 0; j <
columns(); j++)
1477 for (
int i = 0; i <
rows(); i++)
1478 for (
int j = 0; j <
columns() - 1; j++)
1482 for (
int i = 0; i <
rows(); i++)
1483 for (
int j = 1; j <
columns(); j++)
1487 for (
int j = 0; j <
columns(); j++)
1490 for (
int i = 0; i <
rows(); i++)
1492 WireBundle::East) == 0);
1493 for (
int i = 0; i <
rows(); i++)
1497 for (
int i = 0; i <
rows(); i++)
1498 for (
int j = 0; j <
columns(); j++)
1503std::optional<uint32_t>
1505 int lockRow)
const {
1507 if (
isMemSouth(localCol, localRow, lockCol, lockRow))
1509 if (
isMemWest(localCol, localRow, lockCol, lockRow))
1511 if (
isMemNorth(localCol, localRow, lockCol, lockRow))
1513 if (
isMemEast(localCol, localRow, lockCol, lockRow))
1518 if (
isWest(localCol, localRow, lockCol, lockRow))
1520 if (
isInternal(localCol, localRow, lockCol, lockRow))
1522 if (
isEast(localCol, localRow, lockCol, lockRow))
1526 return std::nullopt;
1529std::optional<uint32_t>
1533 if (
isMemSouth(localCol, localRow, memCol, memRow))
1535 if (
isMemWest(localCol, localRow, memCol, memRow))
1537 if (
isMemNorth(localCol, localRow, memCol, memRow))
1539 if (
isMemEast(localCol, localRow, memCol, memRow))
1544 if (
isWest(localCol, localRow, memCol, memRow))
1546 if (
isInternal(localCol, localRow, memCol, memRow))
1548 if (
isEast(localCol, localRow, memCol, memRow))
1552 return std::nullopt;
1561std::vector<std::pair<uint32_t, uint32_t>>
1563 return {std::pair(0, 64), std::pair(1, 128), std::pair(2, 256),
1568 std::string
const &format)
const {
1569 std::set<std::string> supportedTypes = {
"v8bfp16ebs8",
"v16bfp16ebs16"};
1570 return static_cast<bool>(supportedTypes.find(format) != supportedTypes.end());
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.
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 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
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 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 > 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 getDmaBdAddressOffset(int col, int row) const override
Return the offset of the base address field within the shim dma buffer descriptor.
std::vector< std::pair< uint32_t, uint32_t > > getShimBurstEncodingsAndLengths() 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.
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.
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.
uint32_t getRowShift() const override
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.
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.
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...
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.
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 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 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< 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 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.
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.
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.
bool isMemTile(int col, int row) const
Return true if the given tile is a Mem tile.
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...
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.
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...
const RegisterDatabase * getRegisterDatabase() const
Get the register database, loading it lazily on first access.
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 ~AIETargetModel()
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.
bool isShimNOCTile(int col, int row) const
Return true if the given tile is a ShimNOC tile.
virtual std::unique_ptr< RegisterDatabase > loadRegisterDatabase() const
Subclasses override to provide architecture-specific database loading.
virtual uint32_t getMemNorthBaseAddress() const =0
Return the base address in the local address map for a core.
virtual int columns() const =0
Return the number of columns in the device.
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 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.
bool isInternal(int srcCol, int srcRow, int dstCol, int dstRow) const
Return true if src is the internal memory of dst.
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.
std::vector< std::pair< uint32_t, uint32_t > > getShimBurstEncodingsAndLengths() const override
AIEArch getTargetArch() const override
Return the target architecture.
bool isSupportedBlockFormat(std::string const &format) const override
Register and event database for a specific architecture.
static std::unique_ptr< RegisterDatabase > loadAIE2()
Load database for AIE2 architecture.
TileID { friend std::ostream &operator<<(std::ostream &os, const TileID &s) { os<< "TileID("<< s.col<< ", "<< s.row<< ")" TileID
Bit field information for a register.
uint32_t getWidth() const