Skip to content

Commit

Permalink
Multi-cycle operations scheduling fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ansaya committed Aug 10, 2022
1 parent 63c74c1 commit e354acc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
13 changes: 7 additions & 6 deletions src/HLS/scheduling/parametric_list_based.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ void parametric_list_based::CheckSchedulabilityConditions(
const fu_bindingRef res_binding, const ScheduleRef schedule, bool& predecessorsCond, bool& pipeliningCond,
bool& cannotBeChained0, bool& chainingRetCond, bool& cannotBeChained1, bool& asyncCond, bool& cannotBeChained2,
bool& cannotBeChained3, bool& MultiCond0, bool& MultiCond1, bool& nonDirectMemCond, bool& unboundedFunctionsCond,
bool& proxyFunCond)
bool& proxyFunCond, bool unbounded_RW)
{
predecessorsCond = current_ASAP.find(current_vertex) != current_ASAP.end() and
current_ASAP.find(current_vertex)->second > current_cycle;
Expand Down Expand Up @@ -466,10 +466,11 @@ void parametric_list_based::CheckSchedulabilityConditions(
{
return;
}
MultiCond0 = (!is_pipelined && n_cycles > 0 && current_starting_time > (current_cycle_starting_time)) &&
current_ending_time - (n_cycles - 1) * clock_cycle + setup_hold_time + phi_extra_time +
(complex_op ? scheduling_mux_margins : 0) >
current_cycle_ending_time;
MultiCond0 = (n_cycles > 1 && (unbounded_RW || unbounded)) ||
((!is_pipelined && n_cycles > 0 && current_starting_time > (current_cycle_starting_time)) &&
current_ending_time - (n_cycles - 1) * clock_cycle + setup_hold_time + phi_extra_time +
(complex_op ? scheduling_mux_margins : 0) >
current_cycle_ending_time);
if(MultiCond0)
{
return;
Expand Down Expand Up @@ -1070,7 +1071,7 @@ void parametric_list_based::exec(const OpVertexSet& Operations, ControlStep curr
proxy_functions_used, cstep_has_RET_conflict, fu_type, current_ASAP, res_binding, schedule,
predecessorsCond, pipeliningCond, cannotBeChained0, chainingRetCond, cannotBeChained1, asyncCond,
cannotBeChained2, cannotBeChained3, MultiCond0, MultiCond1, nonDirectMemCond, unboundedFunctionsCond,
proxyFunCond);
proxyFunCond, unbounded_RW);

/// checking if predecessors have finished
if(predecessorsCond)
Expand Down
3 changes: 2 additions & 1 deletion src/HLS/scheduling/parametric_list_based.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ class parametric_list_based : public Scheduling
unsigned int fu_type, const vertex2obj<ControlStep>& current_ASAP, const fu_bindingRef res_binding,
const ScheduleRef schedule, bool& predecessorsCond, bool& pipeliningCond, bool& cannotBeChained0,
bool& chainingRetCond, bool& cannotBeChained1, bool& asyncCond, bool& cannotBeChained2, bool& cannotBeChained3,
bool& MultiCond0, bool& MultiCond1, bool& nonDirectMemCond, bool& unboundedFunctionsCond, bool& proxyFunCond);
bool& MultiCond0, bool& MultiCond1, bool& nonDirectMemCond, bool& unboundedFunctionsCond, bool& proxyFunCond,
bool unbounded_RW);
/**
* Compute the relationship of this step
* @param relationship_type is the type of relationship to be considered
Expand Down

0 comments on commit e354acc

Please sign in to comment.