Skip to content

Commit

Permalink
aienginev2: src: interrupt: Block error broadcasts in NoC tile
Browse files Browse the repository at this point in the history
Block outbound error broadcast from PL columns in NoC tile. In the NoC
tile's event broadcast switch B, these signal must be blocked in all
directions. Blocking these signal avoids any possible broadcast network
pollution in the tiles beyond the NoC tile.

Signed-off-by: Nishad Saraf <[email protected]>
Acked-by: Wendy Liang <[email protected]>
  • Loading branch information
NishadSaraf authored and Siva Addepalli committed Oct 12, 2021
1 parent f600f1d commit bd51b72
Showing 1 changed file with 29 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -948,22 +948,37 @@ AieRC XAie_ErrorHandlingInit(XAie_DevInst *DevInst)
* beyond the L2 interrupt controller tile.
*/
if(TileType == XAIEGBL_TILE_TYPE_SHIMNOC) {
XAie_LocType NextLoc;

BroadcastDirSwA = XAIE_EVENT_BROADCAST_NORTH |
XAIE_EVENT_BROADCAST_SOUTH |
XAIE_EVENT_BROADCAST_WEST;
BroadcastDirSwB = XAIE_EVENT_BROADCAST_ALL;

RC = XAie_IntrCtrlL2Enable(DevInst, Loc,
XAIE_ERROR_L2_ENABLE);
/*
* Create bitmask to block broadcast from previous
* columns based on the location NoC tile.
*/
RC = _XAie_FindNextNoCTile(DevInst, Loc, &NextLoc);
if (RC != XAIE_OK) {
L1BroadcastIdSwB = XAIE_ERROR_L2_ENABLE;
} else {
L1BroadcastIdSwB = (1U <<
(L1BroadcastIdSwB + 1U)) - 1U;
}

RC = XAie_EventBroadcastBlockMapDir(DevInst, Loc,
XAIE_PL_MOD, XAIE_EVENT_SWITCH_B,
L1BroadcastIdSwB, BroadcastDirSwB);
if(RC != XAIE_OK) {
XAIE_ERROR("Failed to enable interrupts to L2\n");
XAIE_ERROR("Failed to block broadcasts in shim tile switch B\n");
return RC;
}

RC = XAie_IntrCtrlL2IrqSet(DevInst, Loc,
XAIE_ERROR_NPI_INTR_ID);
RC = XAie_IntrCtrlL2Enable(DevInst, Loc,
XAIE_ERROR_L2_ENABLE);
if(RC != XAIE_OK) {
XAIE_ERROR("Failed to configure L2 IRQ line\n");
XAIE_ERROR("Failed to enable interrupts to L2\n");
return RC;
}
} else {
Expand All @@ -981,6 +996,14 @@ AieRC XAie_ErrorHandlingInit(XAie_DevInst *DevInst)
XAIE_EVENT_BROADCAST_WEST;
BroadcastDirSwB = BroadcastDirSwA;
}

RC = XAie_EventBroadcastBlockDir(DevInst, Loc,
XAIE_PL_MOD, XAIE_EVENT_SWITCH_B,
L1BroadcastIdSwB, BroadcastDirSwB);
if(RC != XAIE_OK) {
XAIE_ERROR("Failed to block broadcasts in shim tile switch B\n");
return RC;
}
}

RC = XAie_EventBroadcastBlockDir(DevInst, Loc, XAIE_PL_MOD,
Expand All @@ -990,14 +1013,6 @@ AieRC XAie_ErrorHandlingInit(XAie_DevInst *DevInst)
XAIE_ERROR("Failed to block broadcasts in shim tile switch A\n");
return RC;
}

RC = XAie_EventBroadcastBlockDir(DevInst, Loc, XAIE_PL_MOD,
XAIE_EVENT_SWITCH_B, L1BroadcastIdSwB,
BroadcastDirSwB);
if(RC != XAIE_OK) {
XAIE_ERROR("Failed to block broadcasts in shim tile switch B\n");
return RC;
}
}

/* Enable NPI interrupt to PS GIC */
Expand Down

0 comments on commit bd51b72

Please sign in to comment.