Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change WireBundle::Ctrl to WireBundle::Control. Decouple WireBundle and StrmSwPortType. #2009

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/aie/Dialect/AIE/IR/AIEAttrs.td
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def EastWire: I32EnumAttrCase<"East", 6>;
def PLIOWire: I32EnumAttrCase<"PLIO", 7>;
def NOCWire: I32EnumAttrCase<"NOC", 8>;
def TraceWire: I32EnumAttrCase<"Trace", 9>;
def ControlWire: I32EnumAttrCase<"Ctrl", 10>;
def ControlWire: I32EnumAttrCase<"Control", 10>;

def WireBundle: I32EnumAttr<"WireBundle", "Bundle of wires",
[
Expand Down
2 changes: 1 addition & 1 deletion include/aie/Targets/AIERT.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static const std::map<xilinx::AIE::WireBundle, StrmSwPortType>
WIRE_BUNDLE_TO_STRM_SW_PORT_TYPE = {
{xilinx::AIE::WireBundle::Core, StrmSwPortType::CORE},
{xilinx::AIE::WireBundle::DMA, StrmSwPortType::DMA},
{xilinx::AIE::WireBundle::Ctrl, StrmSwPortType::CTRL},
{xilinx::AIE::WireBundle::Control, StrmSwPortType::CTRL},
{xilinx::AIE::WireBundle::FIFO, StrmSwPortType::FIFO},
{xilinx::AIE::WireBundle::South, StrmSwPortType::SOUTH},
{xilinx::AIE::WireBundle::West, StrmSwPortType::WEST},
Expand Down
46 changes: 23 additions & 23 deletions lib/Dialect/AIE/IR/AIETargetModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ AIE1TargetModel::getNumDestSwitchboxConnections(int col, int row,
return 0;
return 4;
}
case WireBundle::Ctrl:
case WireBundle::Control:
return isShimNOCTile(col, row) ? 1 : 0;
default:
return 0;
Expand Down Expand Up @@ -155,7 +155,7 @@ AIE1TargetModel::getNumDestSwitchboxConnections(int col, int row,
return 0;
return 4;
}
case WireBundle::Ctrl:
case WireBundle::Control:
return 1;
default:
return 0;
Expand Down Expand Up @@ -185,7 +185,7 @@ AIE1TargetModel::getNumSourceSwitchboxConnections(int col, int row,
}
case WireBundle::Trace:
return 1;
case WireBundle::Ctrl:
case WireBundle::Control:
return isShimNOCTile(col, row) ? 1 : 0;
default:
return 0;
Expand Down Expand Up @@ -215,7 +215,7 @@ AIE1TargetModel::getNumSourceSwitchboxConnections(int col, int row,
}
case WireBundle::Trace:
return 2;
case WireBundle::Ctrl:
case WireBundle::Control:
return 1;
default:
return 0;
Expand Down Expand Up @@ -376,7 +376,7 @@ AIE2TargetModel::getNumDestSwitchboxConnections(int col, int row,
return 6;
case WireBundle::South:
return 4;
case WireBundle::Ctrl:
case WireBundle::Control:
return 1;
default:
return 0;
Expand All @@ -400,7 +400,7 @@ AIE2TargetModel::getNumDestSwitchboxConnections(int col, int row,
return 0;
return 4;
}
case WireBundle::Ctrl:
case WireBundle::Control:
return isShimNOCTile(col, row) ? 1 : 0;
default:
return 0;
Expand Down Expand Up @@ -430,7 +430,7 @@ AIE2TargetModel::getNumDestSwitchboxConnections(int col, int row,
return 0;
return 4;
}
case WireBundle::Ctrl:
case WireBundle::Control:
return 1;
default:
return 0;
Expand All @@ -449,7 +449,7 @@ AIE2TargetModel::getNumSourceSwitchboxConnections(int col, int row,
case WireBundle::South:
return 6;
case WireBundle::Trace:
case WireBundle::Ctrl:
case WireBundle::Control:
return 1;
default:
return 0;
Expand All @@ -475,7 +475,7 @@ AIE2TargetModel::getNumSourceSwitchboxConnections(int col, int row,
}
case WireBundle::Trace:
return 1;
case WireBundle::Ctrl:
case WireBundle::Control:
return isShimNOCTile(col, row) ? 1 : 0;
default:
return 0;
Expand Down Expand Up @@ -509,7 +509,7 @@ AIE2TargetModel::getNumSourceSwitchboxConnections(int col, int row,
case WireBundle::Trace:
// Port 0: core trace. Port 1: memory trace.
return 2;
case WireBundle::Ctrl:
case WireBundle::Control:
return 1;
default:
return 0;
Expand Down Expand Up @@ -577,18 +577,18 @@ bool AIE2TargetModel::isLegalTileConnection(int col, int row,
if (srcBundle == WireBundle::DMA) {
if (dstBundle == WireBundle::DMA)
return srcChan == dstChan;
if (isBundleInList(dstBundle, {WireBundle::Ctrl, WireBundle::South,
if (isBundleInList(dstBundle, {WireBundle::Control, WireBundle::South,
WireBundle::North}))
return true;
}
if (srcBundle == WireBundle::Ctrl) {
if (srcBundle == WireBundle::Control) {
if (dstBundle == WireBundle::DMA)
return dstChan == 5;
if (isBundleInList(dstBundle, {WireBundle::South, WireBundle::North}))
return true;
}
if (isBundleInList(srcBundle, {WireBundle::South, WireBundle::North})) {
if (isBundleInList(dstBundle, {WireBundle::DMA, WireBundle::Ctrl}))
if (isBundleInList(dstBundle, {WireBundle::DMA, WireBundle::Control}))
return true;
if (isBundleInList(dstBundle, {WireBundle::South, WireBundle::North}))
return srcChan == dstChan;
Expand All @@ -602,18 +602,18 @@ bool AIE2TargetModel::isLegalTileConnection(int col, int row,
}
// Shimtile
else if (isShimNOCorPLTile(col, row)) {
if (srcBundle == WireBundle::Ctrl)
return dstBundle != WireBundle::Ctrl;
if (srcBundle == WireBundle::Control)
return dstBundle != WireBundle::Control;
if (isBundleInList(srcBundle, {WireBundle::FIFO, WireBundle::South}))
return isBundleInList(dstBundle, {WireBundle::Ctrl, WireBundle::FIFO,
return isBundleInList(dstBundle, {WireBundle::Control, WireBundle::FIFO,
WireBundle::South, WireBundle::West,
WireBundle::North, WireBundle::East});
if (isBundleInList(srcBundle,
{WireBundle::West, WireBundle::North, WireBundle::East}))
return (srcBundle == dstBundle)
? (srcChan == dstChan)
: isBundleInList(dstBundle,
{WireBundle::Ctrl, WireBundle::FIFO,
{WireBundle::Control, WireBundle::FIFO,
WireBundle::South, WireBundle::West,
WireBundle::North, WireBundle::East});
if (srcBundle == WireBundle::Trace) {
Expand All @@ -628,15 +628,15 @@ bool AIE2TargetModel::isLegalTileConnection(int col, int row,
if (isBundleInList(srcBundle,
{WireBundle::DMA, WireBundle::FIFO, WireBundle::South,
WireBundle::West, WireBundle::North, WireBundle::East}))
if (isBundleInList(dstBundle,
{WireBundle::Core, WireBundle::DMA, WireBundle::Ctrl,
WireBundle::FIFO, WireBundle::South, WireBundle::West,
WireBundle::North, WireBundle::East}))
if (isBundleInList(dstBundle, {WireBundle::Core, WireBundle::DMA,
WireBundle::Control, WireBundle::FIFO,
WireBundle::South, WireBundle::West,
WireBundle::North, WireBundle::East}))
return (srcBundle == dstBundle) ? (srcChan == dstChan) : true;
if (srcBundle == WireBundle::Core)
return dstBundle != WireBundle::Core;
if (srcBundle == WireBundle::Ctrl)
return dstBundle != WireBundle::Ctrl && dstBundle != WireBundle::DMA;
if (srcBundle == WireBundle::Control)
return dstBundle != WireBundle::Control && dstBundle != WireBundle::DMA;
if (srcBundle == WireBundle::Trace) {
if (dstBundle == WireBundle::DMA)
return dstChan == 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ struct AIEGenerateColumnControlOverlayPass

generatePacketFlowsForControl(
builder, device, shimTile, AIE::WireBundle::South, tilesOnCol,
AIE::WireBundle::Ctrl, 0, tileIDMap, false);
AIE::WireBundle::Control, 0, tileIDMap, false);
}
if (clRouteShimDmaToTileCTRL) {
// Get all tile ops on column col
Expand All @@ -234,7 +234,7 @@ struct AIEGenerateColumnControlOverlayPass

generatePacketFlowsForControl(
builder, device, shimTile, AIE::WireBundle::DMA, tilesOnCol,
AIE::WireBundle::Ctrl, 0, tileIDMap, true);
AIE::WireBundle::Control, 0, tileIDMap, true);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions lib/Dialect/AIE/Transforms/AIEPathFinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ void Pathfinder::initialize(int maxCol, int maxRow,
SwitchboxConnect sb = {coords};

const std::vector<WireBundle> bundles = {
WireBundle::Core, WireBundle::DMA, WireBundle::FIFO,
WireBundle::South, WireBundle::West, WireBundle::North,
WireBundle::East, WireBundle::PLIO, WireBundle::NOC,
WireBundle::Trace, WireBundle::Ctrl};
WireBundle::Core, WireBundle::DMA, WireBundle::FIFO,
WireBundle::South, WireBundle::West, WireBundle::North,
WireBundle::East, WireBundle::PLIO, WireBundle::NOC,
WireBundle::Trace, WireBundle::Control};
for (WireBundle bundle : bundles) {
// get all ports into current switchbox
int channels =
Expand Down
Loading
Loading