Skip to content
Open
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
16 changes: 9 additions & 7 deletions src/CGRANode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,15 @@ bool CGRANode::canOccupy(DFGNode* t_opt, int t_cycle, int t_II) {
}

bool CGRANode::isOccupied(int t_cycle, int t_II) {
for (int cycle=t_cycle; cycle<m_cycleBoundary; cycle+=t_II) {
for (pair<DFGNode*, int> p: *(m_dfgNodesWithOccupyStatus[cycle])) {
// If DVFS is supported, the entire tile is occupied before the current multi-cycle operation
// completes. Otherwise, the next operation can start before the current one completes.
if (p.second == START_PIPE_OCCUPY or p.second == SINGLE_OCCUPY or m_supportDVFS) {
return true;
}
// Optimization: setDFGNode() has already materialized the DFG node mapping
// across all cycles with II interval (populating cycle, cycle+II, etc.).
// Therefore, checking the specific canonical cycle here is sufficient
// and equivalent to checking the entire loop.
for (pair<DFGNode*, int> p: *(m_dfgNodesWithOccupyStatus[t_II + (t_cycle % t_II)])){
// If DVFS is supported, the entire tile is occupied before the current multi-cycle operation
// completes. Otherwise, the next operation can start before the current one completes.
if (p.second == START_PIPE_OCCUPY or p.second == SINGLE_OCCUPY or m_supportDVFS) {
return true;
}
}
return false;
Expand Down