79 : priority(
std::move(_priority)), op_graph(_op_graph)
85 const auto x_priority = (*priority)(
x);
86 const auto y_priority = (*priority)(y);
87 if(x_priority != y_priority)
89 return x_priority > y_priority;
115 return order.find(a)->second < order.find(b)->second ||
116 (order.find(a)->second == order.find(b)->second &&
GET_NAME(op_graph, a) <
GET_NAME(op_graph, b));
150 bool operator()(
const unsigned int& a,
const unsigned int& b)
const 162 if(aFunName.find(prefix) != std::string::npos)
164 aFunName = aFunName.substr(prefix.length());
166 if(bFunName.find(prefix) != std::string::npos)
168 bFunName = bFunName.substr(prefix.length());
171 return ((wm_a > wm_b) || (wm_a == wm_b && we_a < we_b) || (wm_a == wm_b && we_a == we_b && wa_a < wa_b) ||
172 (wm_a == wm_b && we_a == we_b && wa_a == wa_b && aFunName < bFunName));
219 const std::map<vertex, unsigned int>&
ref;
249 bool operator()(
const std::pair<std::pair<vertex, vertex>,
unsigned int>&
x,
250 const std::pair<std::pair<vertex, vertex>,
unsigned int>& y)
const 253 "Vertex " +
GET_NAME(g,
x.first.first) +
" is not in topological_sort");
255 "Vertex " +
GET_NAME(g, y.first.first) +
" is not in topological_sort");
257 "Vertex " +
GET_NAME(g,
x.first.second) +
" is not in topological_sort");
259 "Vertex " +
GET_NAME(g, y.first.second) +
" is not in topological_sort");
260 if(ref.find(
x.first.first)->second != ref.find(y.first.first)->second)
262 return ref.find(
x.first.first)->second < ref.find(y.first.first)->second;
264 else if(ref.find(
x.first.second)->second != ref.find(y.first.second)->second)
266 return ref.find(
x.first.second)->second < ref.find(y.first.second)->second;
270 return x.second < y.second;
279 auto live_vertex_it = live_vertices.begin();
280 while(live_vertex_it != live_vertices.end())
282 if(ending_time.find(*live_vertex_it)->second > (from_strongtype_cast<double>(current_cycle) + 1) * clock_cycle)
293 : parametric_list_based_metric(_parametric_list_based_metric)
302 return "DynamicMobility";
304 return "StaticFixed";
306 return "StaticMobility";
319 unsigned int _funId,
const DesignFlowManagerConstRef _design_flow_manager,
322 _hls_flow_step_specialization ?
323 _hls_flow_step_specialization :
326 _parameters->getOption<unsigned int>(OPT_scheduling_priority))))),
346 auto first1 = set1.begin(), last1 = set1.end(), first2 = set2.begin(), last2 = set2.end();
347 while(first1 != last1 and first2 != last2)
349 if(*first1 < *first2)
353 else if(*first2 < *first1)
367 double& current_starting_time,
double& current_ending_time,
double& current_stage_period,
368 CustomMap<std::pair<unsigned int, unsigned int>,
double>& local_connection_map,
double current_cycle_starting_time,
369 double current_cycle_ending_time,
double setup_hold_time,
double& phi_extra_time,
double scheduling_mux_margins,
370 bool unbounded,
bool RWFunctions,
bool LoadStoreOp,
const std::set<std::string>& proxy_functions_used,
373 bool& cannotBeChained0,
bool& chainingRetCond,
bool& cannotBeChained1,
bool& asyncCond,
bool& cannotBeChained2,
374 bool& cannotBeChained3,
bool& MultiCond0,
bool& MultiCond1,
bool& LoadStoreFunctionConflict,
375 bool& FunctionLoadStoreConflict,
bool& proxyFunCond,
bool unbounded_RW,
bool seeMulticycle)
377 predecessorsCond = current_ASAP.find(current_vertex) != current_ASAP.end() and
378 current_ASAP.find(current_vertex)->second > current_cycle;
384 current_ending_time, current_stage_period, cannotBeChained1, res_binding, schedule,
385 phi_extra_time, setup_hold_time, local_connection_map);
386 const auto complex_op = (current_ending_time - current_starting_time) > setup_hold_time;
389 pipeliningCond = is_pipelined and (current_starting_time > current_cycle_starting_time) and
390 ((current_stage_period + current_starting_time + setup_hold_time + phi_extra_time +
391 (complex_op ? scheduling_mux_margins : 0) >
392 (current_cycle_ending_time) ||
400 (current_starting_time >= current_cycle_ending_time) ||
401 ((!is_pipelined && !(curr_vertex_type &
TYPE_RET) && n_cycles == 0 &&
402 current_starting_time > (current_cycle_starting_time +
EPSILON)) &&
403 current_ending_time + setup_hold_time + phi_extra_time + (complex_op ? scheduling_mux_margins : 0) >
404 current_cycle_ending_time);
409 chainingRetCond = (unbounded || cstep_has_RET_conflict) && (curr_vertex_type & TYPE_RET);
418 asyncCond = (current_starting_time > (
EPSILON + current_cycle_starting_time)) and (curr_vertex_type &
TYPE_LOAD) and
421 (!
HLS->
Param->isOption(OPT_rom_duplication) || !
parameters->getOption<
bool>(OPT_rom_duplication))) and
431 (current_starting_time > (current_cycle_starting_time)) && !
parameters->getOption<
bool>(OPT_chaining);
437 (n_cycles > 1 && (unbounded_RW || unbounded)) ||
439 ((!is_pipelined && n_cycles > 0 && current_starting_time > (current_cycle_starting_time)) &&
440 current_ending_time - (n_cycles - 1) *
clock_cycle + setup_hold_time + phi_extra_time +
441 (complex_op ? scheduling_mux_margins : 0) >
442 current_cycle_ending_time);
447 MultiCond1 = current_ending_time + setup_hold_time + phi_extra_time + (complex_op ? scheduling_mux_margins : 0) >
448 current_cycle_ending_time &&
455 const auto curr_node_name = curr_node->GetOperation();
456 const auto fid = curr_node->called.empty() ? 0
U : *curr_node->called.begin();
457 if(!
HLSMgr->CGetCallGraphManager()->GetRootFunctions().count(fid))
459 LoadStoreFunctionConflict = (curr_vertex_type & (TYPE_LOAD |
TYPE_STORE)) && RWFunctions;
460 if(LoadStoreFunctionConflict)
464 FunctionLoadStoreConflict =
465 (curr_vertex_type &
TYPE_EXTERNAL) && (curr_vertex_type &
TYPE_RW) && (LoadStoreOp || RWFunctions);
466 if(FunctionLoadStoreConflict)
471 (proxy_functions_used.count(curr_node_name) ||
479 cannotBeChained3 = (curr_vertex_type &
TYPE_EXTERNAL) && !is_pipelined && n_cycles > 1 &&
483 bool is_chained =
false;
486 const auto from_vertex = boost::source(e, *
flow_graph);
487 if(operations.find(from_vertex) == operations.end())
497 const auto cs_prev = schedule->
get_cstep(from_vertex).second;
498 if(cs_prev == current_cycle)
504 cannotBeChained3 =
false;
507 cannotBeChained3 = current_ending_time - (n_cycles - 1) *
clock_cycle + setup_hold_time + phi_extra_time +
509 current_cycle_ending_time;
520 #define CTRL_STEP_MULTIPLIER 1000 525 THROW_ASSERT(Operations.size(),
"At least one vertex is expected");
528 const auto top_function_ids =
HLSMgr->CGetCallGraphManager()->GetRootFunctions();
529 const unsigned int return_type_index = FB->CGetBehavioralHelper()->GetFunctionReturnType(
funId);
530 auto registering_output_p = top_function_ids.find(
funId) != top_function_ids.end() && return_type_index &&
531 parameters->getOption<std::string>(OPT_registered_inputs) ==
"top";
533 for(
auto op : Operations)
535 operations.insert(op);
550 double clock_period_resource_fraction =
HLS->
HLS_C->get_clock_period_resource_fraction();
552 double scheduling_mux_margins =
567 std::set<unsigned int, resource_ordering_functor> ready_resources(r_functor);
574 std::set<vertex, cs_ordering_functor> live_vertices(et_order);
591 size_t operations_number = Operations.size();
604 aslap->compute_ASAP();
609 aslap->compute_ASAP(
HLS->
Rsch);
610 auto est_upper_bound = ControlStep(static_cast<unsigned int>(operations_number));
636 if(operations.find(source) != operations.end() && !schedule->
is_scheduled(source))
648 THROW_ASSERT(ready_vertices.size(),
"At least one vertex is expected");
670 for(
auto op : Operations)
689 unsigned int cstep_vuses_ARRAYs = 0;
690 unsigned int cstep_vuses_others = 0;
691 bool cstep_has_RET_conflict =
false;
693 OpVertexSet::const_iterator rv, rv_end = ready_vertices.end();
695 for(rv = ready_vertices.begin(); rv != rv_end; ++rv)
700 const auto TM =
HLSMgr->get_tree_manager();
701 auto fnode = TM->get_tree_node_const(
funId);
702 auto fd = GetPointer<function_decl>(fnode);
705 if(
HLSMgr->design_interface_io.find(fname) !=
HLSMgr->design_interface_io.end())
707 for(
const auto& bb2arg2stmtsR :
HLSMgr->design_interface_io.at(fname))
709 for(
const auto& arg2stms : bb2arg2stmtsR.second)
711 if(arg2stms.second.size() > 0)
713 for(
const auto& stmt : arg2stms.second)
718 RW_stmts.insert(op_it->second);
728 while((schedule->
num_scheduled() - already_sch) != operations_number)
730 bool unbounded =
false;
731 bool RWFunctions =
false;
732 bool unbounded_RW =
false;
733 bool LoadStoreOp =
false;
734 bool seeMulticycle =
false;
735 unsigned int n_scheduled_ops = 0;
738 cstep_has_RET_conflict =
739 ((schedule->
num_scheduled() - already_sch) != operations_number - 1) ? registering_output_p :
false;
740 std::set<std::string> proxy_functions_used;
742 " schedule->num_scheduled() " + std::to_string(schedule->
num_scheduled()));
745 " operations_number " + std::to_string(operations_number));
747 " Scheduling in control step " +
STR(current_cycle) +
748 " (Time: " +
STR(current_cycle_starting_time) +
")");
759 auto live_vertex_it = live_vertices.begin();
761 while(live_vertex_it != live_vertices.end())
763 if(
ending_time.find(*live_vertex_it)->second > current_cycle_ending_time)
765 seeMulticycle =
true;
767 if(
ending_time.find(*live_vertex_it)->second <= current_cycle_starting_time)
771 live_vertices.erase(*live_vertex_it);
772 live_vertex_it = live_vertices.begin();
779 cstep_has_RET_conflict =
true;
781 if(live_vertex_type & (
TYPE_LOAD | TYPE_STORE))
786 RW_stmts.find(*live_vertex_it) == RW_stmts.end())
792 if(FB->is_simple_pipeline() && (II > 1 || II == 0))
796 " is not compatible with II=1.\nActual vertex latency is " +
STR(lat) +
797 " greater than the clock period");
804 if(used_resources.find(res_binding->
get_assign(*live_vertex_it)) == used_resources.end())
806 used_resources[res_binding->
get_assign(*live_vertex_it)] = 0;
822 for(
unsigned int fu_type = 0; fu_type < n_resources; ++fu_type)
824 if(priority_queues[fu_type].size())
826 ready_resources.insert(fu_type);
838 while(ready_resources.size())
840 const auto fu_type = *ready_resources.begin();
841 ready_resources.erase(ready_resources.begin());
845 "-->Considering functional unit type " +
STR(fu_type) +
"(" +
850 auto& queue = priority_queues[fu_type];
855 auto current_vertex = queue.top();
857 auto current_vertex = *(queue.begin());
864 queue.erase(queue.begin());
866 "-->Other ready operations (" +
STR(queue.size()) +
") are:");
868 for(
const auto temp_operation : queue)
872 STR((*Priority)(temp_operation)));
886 if(used_resources.find(fu_type) == used_resources.end())
888 used_resources[fu_type] = 0;
894 if(black_list.find(fu_type) == black_list.end())
898 black_list.at(fu_type).insert(current_vertex);
902 bool postponed =
false;
911 if(is_array && cstep_vuses_others && !
HLSMgr->Rmem->is_private_memory(var))
915 else if(!is_array && cstep_vuses_ARRAYs)
937 " MEMORY_CTRL cannot run together with BRAM direct accesses " +
941 if(black_list.find(fu_type) == black_list.end())
945 black_list.at(fu_type).insert(current_vertex);
953 (unbounded || unbounded_RW || is_live))
955 if(black_list.find(fu_type) == black_list.end())
959 black_list.at(fu_type).insert(current_vertex);
962 " postponed to the next cycle");
966 ((schedule->
num_scheduled() - already_sch) != operations_number - 1))
968 if(postponed_resources.find(fu_type) == postponed_resources.end())
972 postponed_resources.at(fu_type).insert(current_vertex);
980 ((schedule->
num_scheduled() - already_sch) == operations_number - 1) && n_scheduled_ops != 0 &&
981 registering_output_p)
983 if(black_list.find(fu_type) == black_list.end())
987 black_list.at(fu_type).insert(current_vertex);
991 " postponed to the next cycle to register the output");
995 RW_stmts.find(current_vertex) == RW_stmts.end() && (unbounded_RW || is_live))
997 if(black_list.find(fu_type) == black_list.end())
1001 black_list.at(fu_type).insert(current_vertex);
1004 " postponed to the next cycle");
1008 RW_stmts.find(current_vertex) != RW_stmts.end() && unbounded)
1010 if(black_list.find(fu_type) == black_list.end())
1014 black_list.at(fu_type).insert(current_vertex);
1016 " Scheduling of unbounded RW interface " +
1022 double current_starting_time;
1025 double current_ending_time;
1028 double current_stage_period;
1030 double phi_extra_time;
1033 bool predecessorsCond =
false, pipeliningCond =
false, cannotBeChained0 =
false, chainingRetCond =
false,
1034 cannotBeChained1 =
false, asyncCond =
false, cannotBeChained2 =
false, cannotBeChained3 =
false,
1035 MultiCond0 =
false, MultiCond1 =
false, LoadStoreFunctionConflict =
false,
1036 FunctionLoadStoreConflict =
false, proxyFunCond =
false;
1039 operations, current_vertex, current_cycle, current_starting_time, current_ending_time,
1040 current_stage_period, local_connection_map, current_cycle_starting_time, current_cycle_ending_time,
1041 setup_hold_time, phi_extra_time, scheduling_mux_margins, unbounded, RWFunctions, LoadStoreOp,
1042 proxy_functions_used, cstep_has_RET_conflict, fu_type, current_ASAP, res_binding, schedule,
1043 predecessorsCond, pipeliningCond, cannotBeChained0, chainingRetCond, cannotBeChained1, asyncCond,
1044 cannotBeChained2, cannotBeChained3, MultiCond0, MultiCond1, LoadStoreFunctionConflict,
1045 FunctionLoadStoreConflict, proxyFunCond, unbounded_RW, seeMulticycle);
1048 if(predecessorsCond)
1051 " Depends on a live operation");
1052 if(black_list.find(fu_type) == black_list.end())
1056 black_list.at(fu_type).insert(current_vertex);
1063 " Pipelined unit cannot be chained: starting time is " +
1064 std::to_string(current_starting_time) +
" stage period is " +
1065 std::to_string(current_stage_period));
1066 if(black_list.find(fu_type) == black_list.end())
1070 black_list.at(fu_type).insert(current_vertex);
1073 else if(cannotBeChained0)
1076 " It cannot be chained: starting time is " +
1077 std::to_string(current_starting_time) +
" ending time is " +
1078 std::to_string(current_ending_time));
1079 if(black_list.find(fu_type) == black_list.end())
1083 black_list.at(fu_type).insert(current_vertex);
1086 else if(chainingRetCond)
1090 " Chaining of return expression operation is not allowed by construction" +
1091 (unbounded ? std::string(
"(unbounded)") : std::string(
"(bounded)")));
1092 if(black_list.find(fu_type) == black_list.end())
1096 black_list.at(fu_type).insert(current_vertex);
1099 else if(cannotBeChained1)
1102 " Chaining with a store or a load or an unbounded in input is not " 1103 "possible -> starting time " +
1104 std::to_string(current_starting_time) +
1105 " ending time: " + std::to_string(current_ending_time));
1106 if(black_list.find(fu_type) == black_list.end())
1110 black_list.at(fu_type).insert(current_vertex);
1128 " Chaining with an asynchronous load is not possible -> starting time " +
1129 std::to_string(current_starting_time) +
1130 " ending time: " + std::to_string(current_ending_time));
1131 if(black_list.find(fu_type) == black_list.end())
1135 black_list.at(fu_type).insert(current_vertex);
1158 else if(cannotBeChained2)
1161 " Chaining is possible but not allowed -> starting time " +
1162 std::to_string(current_starting_time) +
1163 " ending time: " + std::to_string(current_ending_time));
1164 if(black_list.find(fu_type) == black_list.end())
1168 black_list.at(fu_type).insert(current_vertex);
1175 " First cycle of a Multi-cycles operations does not fit in the first period");
1176 if(black_list.find(fu_type) == black_list.end())
1180 black_list.at(fu_type).insert(current_vertex);
1186 " Multi-cycles operations cannot be scheduled together with unbounded " 1188 if(black_list.find(fu_type) == black_list.end())
1192 black_list.at(fu_type).insert(current_vertex);
1195 else if(LoadStoreFunctionConflict)
1198 " Memory access operations may conflict with function calls");
1199 if(black_list.find(fu_type) == black_list.end())
1203 black_list.at(fu_type).insert(current_vertex);
1206 else if(FunctionLoadStoreConflict)
1209 " function calls may conflict with memory access operations ");
1210 if(black_list.find(fu_type) == black_list.end())
1214 black_list.at(fu_type).insert(current_vertex);
1217 else if(proxyFunCond)
1220 " proxy function may conflict with other functions calling the same " 1222 if(black_list.find(fu_type) == black_list.end())
1226 black_list.at(fu_type).insert(current_vertex);
1235 else if(cannotBeChained3)
1238 " cannot be chained because critical path of the current function " 1239 "plus the one of the called function are not compatible with the clock ");
1240 if(black_list.find(fu_type) == black_list.end())
1244 black_list.at(fu_type).insert(current_vertex);
1251 used_resources[fu_type]++;
1255 RW_stmts.find(current_vertex) == RW_stmts.end())
1260 if((curr_vertex_type & TYPE_EXTERNAL))
1263 if(
HLSMgr->Rfuns->is_a_proxied_function(curr_op_name))
1265 proxy_functions_used.insert(curr_op_name);
1271 proxy_functions_used.insert(p);
1278 RW_stmts.find(current_vertex) == RW_stmts.end())
1286 THROW_WARNING(
"Operation execution time of the unbounded operation is greater than the clock " 1287 "period resource fraction (" +
1291 "\nThis may prevent meeting the timing constraints.\n");
1296 RW_stmts.find(current_vertex) != RW_stmts.end())
1298 unbounded_RW =
true;
1314 cstep_has_RET_conflict = (curr_vertex_type & (
TYPE_STORE)) != 0;
1321 if(!var || !
HLSMgr->Rmem->is_private_memory(var))
1325 cstep_vuses_ARRAYs = 1;
1329 cstep_vuses_others =
1330 1 + ((
parameters->getOption<std::string>(OPT_memory_controller_type) !=
"D00" &&
1331 parameters->getOption<std::string>(OPT_memory_controller_type) !=
"D10") ?
1337 if((curr_vertex_type & TYPE_EXTERNAL) && (curr_vertex_type &
TYPE_RW))
1339 cstep_has_RET_conflict =
true;
1344 STR(current_cycle_starting_time));
1348 (current_ending_time + setup_hold_time + phi_extra_time + scheduling_mux_margins >
1349 current_cycle_ending_time))
1351 ending_time[current_vertex] = current_cycle_ending_time - setup_hold_time;
1355 ending_time[current_vertex] = current_ending_time;
1362 from_strongtype_cast<double>(current_cycle),
1364 STR(from_strongtype_cast<double>(current_cycle)));
1366 current_cycle + ControlStep(static_cast<unsigned int>(
1368 from_strongtype_cast<double>(current_cycle))));
1371 ending_time[current_vertex] > current_cycle_ending_time)
1373 seeMulticycle =
true;
1376 for(
auto edge_connection_pair : local_connection_map)
1378 schedule->
AddConnectionTimes(edge_connection_pair.first.first, edge_connection_pair.first.second,
1379 edge_connection_pair.second);
1381 if(phi_extra_time > 0.0)
1385 ready_vertices.erase(current_vertex);
1390 res_binding->
bind(current_vertex, fu_type, 0);
1394 res_binding->
bind(current_vertex, fu_type);
1398 " Current cycles ends at " +
STR(current_cycle_ending_time) +
1400 if(
ending_time[current_vertex] > current_cycle_ending_time)
1402 live_vertices.insert(current_vertex);
1408 std::list<std::pair<std::string, vertex>> successors;
1409 for(boost::tie(eo, eo_end) = boost::out_edges(current_vertex, *
flow_graph); eo != eo_end; eo++)
1412 if(operations.find(target) != operations.end())
1419 for(
auto& successor : successors)
1422 scheduled_predecessors[successor.second]++;
1423 if(current_ASAP.find(successor.second) != current_ASAP.end())
1425 current_ASAP.at(successor.second) =
1426 std::max(ControlStep(static_cast<unsigned int>(
1428 current_ASAP.find(successor.second)->second);
1432 current_ASAP.emplace(successor.second,
1433 ControlStep(static_cast<unsigned int>(
1439 for(boost::tie(ei, ei_end) = boost::in_edges(successor.second, *
flow_graph); ei != ei_end; ei++)
1442 if(operations.find(source) != operations.end())
1444 in_set.insert(source);
1447 if(in_set.size() == scheduled_predecessors(successor.second))
1450 ready_vertices.insert(successor.second);
1457 if(!restarted_resources.empty())
1461 bl_it != bl_end; ++bl_it)
1463 auto v_end = bl_it->second.end();
1464 for(
auto v = bl_it->second.begin(); v != v_end; ++v)
1467 priority_queues[bl_it->first].push(*v);
1469 priority_queues[bl_it->first].insert(*v);
1472 ready_resources.insert(bl_it->first);
1474 restarted_resources.clear();
1479 " Restarted the scheduling loop to accommodate restarted vertices: " +
1484 if(!postponed_resources.empty())
1488 bl_it != bl_end; ++bl_it)
1490 auto v_end = bl_it->second.end();
1491 for(
auto v = bl_it->second.begin(); v != v_end; ++v)
1494 priority_queues[bl_it->first].push(*v);
1496 priority_queues[bl_it->first].insert(*v);
1499 ready_resources.insert(bl_it->first);
1501 postponed_resources.clear();
1502 if(black_list.empty())
1506 " Restarted the scheduling loop to accommodate postponed vertices");
1514 auto v_end = bl_it->second.end();
1515 for(
auto v = bl_it->second.begin(); v != v_end; ++v)
1518 priority_queues[bl_it->first].push(*v);
1520 priority_queues[bl_it->first].insert(*v);
1526 const auto updated =
1532 for(
unsigned int i = 0; i < n_resources; i++)
1534 priority_queues[i].rehash();
1538 cstep_vuses_ARRAYs = cstep_vuses_ARRAYs > 0 ? cstep_vuses_ARRAYs - 1 : 0;
1540 cstep_vuses_others = cstep_vuses_others > 0 ? cstep_vuses_others - 1 : 0;
1545 const auto steps = current_cycle;
1552 double& current_starting_time,
double& current_ending_time,
double& stage_period,
bool& cannot_be_chained,
1554 CustomMap<std::pair<unsigned int, unsigned int>,
double>& local_connection_map)
1561 bool no_chaining_of_load_and_store =
parameters->getOption<
bool>(OPT_do_not_chain_memories) &&
1566 " Initial value of cannot_be_chained=" +
1567 (cannot_be_chained ? std::string(
"T") : std::string(
"F")));
1569 for(boost::tie(ei, ei_end) = boost::in_edges(v, *
flow_graph); ei != ei_end; ei++)
1572 if(operations.find(from_vertex) == operations.end())
1584 unsigned int from_fu_type = res_binding->
get_assign(from_vertex);
1585 const auto cs_prev = schedule->get_cstep(from_vertex).second;
1586 const double fsm_correction = [&]() ->
double {
1591 if(
parameters->getOption<
double>(OPT_scheduling_mux_margins) != 0.0)
1597 (!
parameters->isOption(OPT_rom_duplication) || !
parameters->getOption<
bool>(OPT_rom_duplication))) &&
1610 auto edge_pair = std::make_pair(from_statement, v_statement);
1611 double connection_time = local_connection_map[edge_pair] =
1612 (schedule->get_cstep_end(from_vertex).second == cs) ?
1618 double local_ending_time =
1622 ending_time.find(from_vertex)->second + fsm_correction +
1625 current_starting_time =
std::max(current_starting_time, local_ending_time);
1628 STR(current_starting_time));
1631 if(schedule->get_cstep_end(from_vertex).second == cs)
1633 if(no_chaining_of_load_and_store)
1635 cannot_be_chained =
true;
1639 cannot_be_chained =
true;
1645 double op_execution_time;
1647 current_starting_time, setup_hold_time);
1649 current_ending_time = current_starting_time + op_execution_time;
1653 " and ends at " +
STR(current_ending_time) +
" execution time " +
STR(op_execution_time) +
1654 " stage period " +
STR(stage_period) +
" phi_extra_time " +
STR(phi_extra_time));
1659 double& op_execution_time,
double& phi_extra_time,
1660 double current_starting_time,
double setup_hold_time)
1666 op_execution_time = timeLatency.first;
1667 stage_period = timeLatency.second;
1673 double scheduling_mux_margins =
1679 op_execution_time + setup_hold_time >=
clock_cycle * n_cycles)
1681 op_execution_time =
clock_cycle * n_cycles - setup_hold_time - phi_extra_time - scheduling_mux_margins -
EPSILON;
1686 stage_period =
clock_cycle - setup_hold_time - phi_extra_time - scheduling_mux_margins -
EPSILON;
1690 double initial_execution_time =
1694 static_cast<unsigned>(
1698 if(initial_execution_time + setup_hold_time <
clock_cycle &&
1699 op_execution_time + setup_hold_time + phi_extra_time + scheduling_mux_margins >=
clock_cycle)
1701 op_execution_time =
clock_cycle - setup_hold_time - phi_extra_time - scheduling_mux_margins -
EPSILON;
1702 if(op_execution_time < 0)
1704 op_execution_time =
clock_cycle - setup_hold_time - scheduling_mux_margins -
EPSILON;
1705 phi_extra_time = 0.0;
1709 (stage_period + setup_hold_time + phi_extra_time + scheduling_mux_margins >=
clock_cycle))
1711 stage_period =
clock_cycle - setup_hold_time - phi_extra_time - scheduling_mux_margins -
EPSILON;
1712 if(stage_period < 0)
1715 phi_extra_time = 0.0;
1718 if(stage_period != 0.0)
1730 op_execution_time += stage_period;
1763 std::set<unsigned int, resource_ordering_functor>& ready_resources,
1766 unsigned int fu_name;
1770 priority_queue[fu_name].push(v);
1775 priority_queue[fu_name].insert(v);
1777 ready_resources.insert(fu_name);
1783 for(
auto fu_set_it = fu_set.begin(); fu_set_it != fu_set_it_end; ++fu_set_it)
1786 priority_queue[*fu_set_it].push(v);
1788 priority_queue[*fu_set_it].insert(v);
1790 ready_resources.insert(*fu_set_it);
1798 std::list<vertex> topology_sorted_vertex;
1800 CG->CGetCallGraph()->TopologicalSort(topology_sorted_vertex);
1804 std::list<unsigned int> topological_sorted_functions;
1805 for(
auto v : topology_sorted_vertex)
1807 auto fun_id = CG->get_function(v);
1808 if(reachable_functions.find(fun_id) != reachable_functions.end())
1810 topological_sorted_functions.push_front(fun_id);
1814 for(
auto v : topological_sorted_functions)
1816 auto curr_v_name =
HLSMgr->CGetFunctionBehavior(v)->CGetBehavioralHelper()->get_function_name();
1817 if(
HLSMgr->Rfuns->has_proxied_shared_functions(v))
1819 for(
const auto& p :
HLSMgr->Rfuns->get_proxied_shared_functions(v))
1825 for(
auto c : CG->get_called_by(v))
1827 auto called_name =
HLSMgr->CGetFunctionBehavior(c)->CGetBehavioralHelper()->get_function_name();
1841 long int step_time = 0;
1849 std::deque<vertex> vertices;
1850 boost::topological_sort(*bbg, std::front_inserter(vertices));
1851 auto viend = vertices.end();
1852 auto ctrl_steps = ControlStep(0u);
1862 for(
auto vi = vertices.begin(); vi != viend; ++vi)
1865 std::list<vertex> bb_operations = bbg->
CGetBBNodeInfo(*vi)->statements_list;
1866 for(
auto& bb_operation : bb_operations)
1870 operations.insert(bb_operation);
1874 "performing scheduling of basic block " +
STR(bbg->
CGetBBNodeInfo(*vi)->block->number));
1877 exec(operations, ctrl_steps);
1880 if(
parameters->getOption<
bool>(OPT_print_dot))
1893 double realClock =
HLS->
HLS_C->get_clock_period();
1903 if(min_slack > slack)
1906 std::string(
"Operation constraining the maximum frequency:") +
1909 min_slack =
std::min(min_slack, slack);
1932 "---Time to perform scheduling: " +
print_cpu_time(step_time) +
" seconds");
1939 if(
parameters->getOption<
bool>(OPT_print_dot))
1955 unsigned int current_vertex_cstep,
vertex v)
1959 if(not is_load_store)
1963 std::queue<vertex> fifo;
1965 for(boost::tie(eo, eo_end) = boost::in_edges(v, *
flow_graph); eo != eo_end; eo++)
1968 if(operations.find(s) != operations.end())
1973 while(!fifo.empty())
1975 vertex current_op = fifo.front();
1977 if(current_vertex_cstep == static_cast<unsigned int>(floor(
ending_time.find(current_op)->second /
clock_cycle)))
1983 for(boost::tie(eo, eo_end) = boost::in_edges(current_op, *
flow_graph); eo != eo_end; eo++)
1986 if(operations.find(s) != operations.end())
1997 unsigned int current_vertex_cstep,
vertex v)
2001 if(not is_load_store)
2005 std::queue<vertex> fifo;
2007 for(boost::tie(eo, eo_end) = boost::out_edges(v, *
flow_graph); eo != eo_end; eo++)
2010 if(operations.find(s) != operations.end())
2015 while(!fifo.empty())
2017 vertex current_op = fifo.front();
2025 for(boost::tie(eo, eo_end) = boost::out_edges(current_op, *
flow_graph); eo != eo_end; eo++)
2028 if(operations.find(s) != operations.end())
2038 #define REMOVE_DIRECT_TO_INDIRECT 1 2040 vertex current_v,
unsigned int v_fu_type,
2044 bool v_is_indirect =
2046 bool v_is_one_cycle_direct_access =
2049 (!
HLS->
Param->isOption(OPT_rom_duplication) || !
parameters->getOption<
bool>(OPT_rom_duplication)))) &&
2061 for(boost::tie(ie, ie_end) = boost::in_edges(current_v, *
flow_graph); ie != ie_end; ie++)
2064 if(operations.find(v) != operations.end())
2066 to_be_analyzed.insert(v);
2069 while(!to_be_analyzed.empty())
2071 vertex current_op = *(to_be_analyzed.begin());
2072 to_be_analyzed.erase(to_be_analyzed.begin());
2073 already_analyzed_operations.insert(current_op);
2074 if(cs == schedule->get_cstep_end(current_op).second)
2076 unsigned int from_fu_type = res_binding->
get_assign(current_op);
2079 (v_is_one_cycle_direct_access and
2085 for(boost::tie(ie, ie_end) = boost::in_edges(current_op, *
flow_graph); ie != ie_end; ie++)
2087 const auto source = boost::source(*ie, *
flow_graph);
2088 if(operations.find(source) != operations.end() &&
2089 already_analyzed_operations.find(source) == already_analyzed_operations.end())
2091 to_be_analyzed.insert(source);
2100 vertex current_v,
const ControlStep cs,
2105 std::queue<vertex> fifo;
2107 for(boost::tie(eo, eo_end) = boost::in_edges(current_v, *
flow_graph); eo != eo_end; eo++)
2110 if(operations.find(v) != operations.end())
2115 while(!fifo.empty())
2117 vertex current_op = fifo.front();
2119 if(cs == schedule->get_cstep_end(current_op).second)
2121 unsigned int from_fu_type = res_binding->
get_assign(current_op);
2127 for(boost::tie(eo, eo_end) = boost::in_edges(current_op, *
flow_graph); eo != eo_end; eo++)
2130 if(operations.find(v) != operations.end())
2144 std::queue<vertex> fifo;
2146 for(boost::tie(eo, eo_end) = boost::in_edges(current_v, *
flow_graph); eo != eo_end; eo++)
2149 if(operations.find(v) != operations.end())
2154 while(!fifo.empty())
2156 vertex current_op = fifo.front();
2158 if(cs == schedule->get_cstep_end(current_op).second)
2164 for(boost::tie(eo, eo_end) = boost::in_edges(current_op, *
flow_graph); eo != eo_end; eo++)
2167 if(operations.find(v) != operations.end())
2182 switch(relationship_type)
2188 #
if HAVE_FROM_PRAGMA_BUILT
2190 HLSMgr->CGetFunctionBehavior(
funId)->CGetBehavioralHelper()->GetOmpForDegree() == 0
#define TYPE_SWITCH
constant identifying the node type of a SWITCH operation.
#define DEBUG_LEVEL_VERY_PEDANTIC
extremely verbose debugging print is performed.
const HLS_managerRef HLSMgr
information about all the HLS synthesis
This is a specialization based on mobility.
bool check_direct_operation_chaining(const CustomUnorderedSet< vertex > &operations, vertex current_v, const ControlStep cs, const ScheduleConstRef schedule, fu_bindingRef res_binding) const
#define INDENT_DBG_MEX(dbgLevel, curDbgLevel, mex)
We are producing a debug version of the program, so the message is printed;.
ControlStep get_csteps() const
This method returns the number of control steps.
vertex2float starting_time
The starting time given the scheduling (used for chaining)
boost::graph_traits< graph >::out_edge_iterator OutEdgeIterator
out_edge_iterator definition.
#define GET_TYPE(data, vertex_index)
Helper macro returning the type associated with a node.
const ParametricListBased_Metric parametric_list_based_metric
The metric used in list based.
#define PRINT_DBG_MEX(dbgLevel, curDbgLevel, mex)
We are producing a debug version of the program, so the message is printed;.
Functor used to compare which of two resources has to be considered first in the scheduling.
void Initialize() override
Initialize the step (i.e., like a constructor, but executed just before exec.
const ParameterConstRef Param
class containing all the parameters
#define TYPE_MULTIIF
constant identifying the a multi-way if
#define TYPE_VPHI
constant string identifying an operation node of type virtual phi-nodes
#define CTRL_STEP_MULTIPLIER
#define GET_CLASS(obj)
Macro returning the actual type of an object.
void add_to_priority_queues(PriorityQueues &priority_queue, std::set< unsigned int, resource_ordering_functor > &ready_resources, const vertex v) const
Adds the vertex v to the priority queues.
Dest from_strongtype_cast(Source source)
std::string get_function_name() const
Return the name of the function.
#define TYPE_IF
constant identifying the node type of an IF operation.
const int output_level
The output level.
compare_vertex_by_name(const OpGraphConstRef &G)
Constructor.
RelationshipType
The relationship type.
std::map< std::string, std::set< std::string > > reachable_proxy_functions
reachable proxy from a given function
CustomMap< unsigned int, double > starting_times
The absolute starting time of each operation as computed by the scheduling Key is the index of the gi...
Source must be executed to satisfy target.
AbsControlStep get_cstep(const vertex &op) const
Returns the clock cycle where the given operation has been scheduled.
#define INDENT_OUT_MEX(outLevel, curOutLevel, mex)
unsigned int num_scheduled() const
Returns the number of scheduled operations.
unsigned int get_assign(const vertex &v) const
Returns the functional unit assigned to the vertex.
const unsigned int funId
identifier of the function to be processed (0 means that it is a global step)
void set_csteps(ControlStep cs)
This method sets the number of control steps.
#define GET_NAME(data, vertex_index)
Helper macro returning the name associated with a node.
CustomOrderedMap< T, U > CustomMap
boost::graph_traits< graph >::in_edge_iterator InEdgeIterator
in_edge_iterator definition.
void Initialize() override
Initialize the step (i.e., like a constructor, but executed just before exec.
exceptions managed by PandA
AbsControlStep get_cstep_end(const vertex &op) const
Return the last clock cycle in which the operation execute.
AllocationInformationRef allocation_information
Store the technology information.
resource_ordering_functor(const AllocationInformationConstRef _all)
Constructor.
Class managing map of the vertexes on a generic object.
Functor to sort vertex by node name.
Definition of hash function for EdgeDescriptor.
OpVertexSet operations
Set representing the subset of operations in the specification to be implemented. ...
void xwrite(xml_element *rootnode, const OpGraphConstRef data)
Writes current HLS results to XML node.
std::string GetSignature() const override
Return the contribution to the signature of a step given by the specialization.
~parametric_list_based() override
Destructor.
This class contains the base representation for a generic frontend flow step which works on a single ...
absl::flat_hash_map< T, U, Hash, Eq, Alloc > CustomUnorderedMapUnstable
const OpVertexMap< double > & order
copy of the order: control step associated with the vertices.
Data structure describing a basic block at tree level.
#define OUTPUT_LEVEL_MINIMUM
minimum debugging print is performed.
Absolute Control step First field is the basic block Second field is the relative control step...
Include a set of utilities used to manage CPU time measures.
#define TYPE_LOAD
Constant string identifying a memory load operation.
PrioritySorter(const refcount< priority_data< int >> priority, const OpGraphConstRef op_graph)
Constructor.
void compute_starting_ending_time_asap(const CustomUnorderedSet< vertex > &operations, const vertex v, const unsigned int fu_type, const ControlStep cs, double ¤t_starting_time, double ¤t_ending_time, double &stage_period, bool &cannot_be_chained, fu_bindingRef res_binding, const ScheduleConstRef schedule, double &phi_extra_time, double setup_hold_time, CustomMap< std::pair< unsigned int, unsigned int >, double > &local_connection_map)
Given the control step in which an operation is scheduled, compute the exact starting and ending time...
A set of operation vertices.
bool operator()(const vertex &a, const vertex &b) const
functor function used to compare two vertices with respect to the control step associated with the ve...
#define TYPE_PHI
constant string identifying an operation node of type PHI
static const double EPSILON
static std::string GetMangledFunctionName(const function_decl *fd)
Return the mangled function name.
#define THROW_WARNING(str_expr)
helper function used to throw a warning in a standard way: though it uses PRINT_DBG_MEX, the debug level used is such that the message is always printed
#define STR(s)
Macro which performs a lexical_cast to a string.
Auxiliary methods for manipulating string.
const ParametricListBased_Metric parametric_list_based_metric
The used metric.
const OpNodeInfoConstRef CGetOpNodeInfo(const vertex node) const
Returns the info associated with a node.
Class specifying ALAP and ASAP algorithms.
#define START_TIME(time_var)
Macro used to store the start time into time_var.
#define THROW_UNREACHABLE(str_expr)
helper function used to specify that some points should never be reached
System dependence graph with feedback.
fu_bindingRef Rfu
Store the refcounted functional unit binding of the operations.
std::vector< std::set< vertex, PrioritySorter > > PriorityQueues
ScheduleRef Rsch
Store the refcounted scheduling of the operations.
void WriteDot(const std::string &file_name, OpGraphConstRef sub_op_graph=OpGraphConstRef(), OpVertexSet *opSet=nullptr) const
Function that writes the dot file of the scheduling by using the AT&T direct graph representation...
const OpGraphConstRef & op_graph
#define TYPE_GOTO
A vertex is of type TYPE_GOTO when it is associated with a goto expression.
Functor used to compare two vertices with respect to an order based on the control steps associated w...
This class specifies the characteristic of a particular operation working on a given functional unit...
static bool check_if_is_live_in_next_cycle(const std::set< vertex, cs_ordering_functor > &live_vertices, const ControlStep current_cycle, const OpVertexMap< double > &ending_time, double clock_cycle)
Data structure used to store the schedule of the operations.
const std::map< vertex, unsigned int > & ref
Topological sorted vertices.
Class specification of the data structures used to manage technology information. ...
#define TYPE_EXTERNAL
constant identifying the node type of a EXTERNAL operation (a function call)
static bool has_element_in_common(const std::set< std::string > &set1, const std::set< std::string > &set2)
const OpGraphConstRef op_graph
The operation graph.
void AddConnectionTimes(unsigned int first_operation, unsigned int second_operation, const double value)
Add fan out correction time.
Classes to describe design flow graph.
const OpGraphConstRef & op_graph
void set_execution_end(const vertex &op, ControlStep c_step_end)
Sets the ending clock cycle for the given operation.
Target must be reexecuted.
void write_to_file_formatted(const std::filesystem::path &filename)
Write the document to a file.
void exec(const OpVertexSet &operations, ControlStep current_cycle)
Function that computes the List-Based scheduling of the graph.
void bind(const vertex &v, unsigned int unit, unsigned int index=std::numeric_limits< unsigned int >::max())
Binds an operation vertex to a functional unit.
#define STOP_TIME(time_var)
Macro used to store the elapsed time into time_var.
const OpGraphInfoConstRef CGetOpGraphInfo() const
Returns the property associated with the graph.
xml_element * create_root_node(const std::string &_name)
Creates the root node.
bool operator()(const vertex &a, const vertex &b) const
Datastructure to describe functions allocation in high-level synthesis.
#define TYPE_STORE
Constant string identifying a memory store operation.
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
utility function used to read files.
OpGraphConstRef flow_graph
The dependence graph.
#define TYPE_FOR
constant string identifying the node type of an WHILE operation.
#define TYPE_RW
Constant identifying if a TYPE_EXTERNAL write or read memory.
General class used to describe a graph in PandA.
const BehavioralHelperConstRef CGetBehavioralHelper() const
Returns the helper associated with the function.
boost::graph_traits< graph >::vertex_iterator VertexIterator
vertex_iterator definition.
Classes specification of the tree_node data structures.
const ParameterConstRef parameters
Set of input parameters.
DesignFlowStep_Status
The status of a step.
This file collects some utility functions and macros.
bool operator()(const vertex x, const vertex y) const
Compare position of two vertices.
Class managing ALAP and ASAP algorithms.
#define THROW_ERROR(str_expr)
helper function used to throw an error in a standard way
Data structure definition for HLS constraints.
bool operator()(const unsigned int &a, const unsigned int &b) const
functor function used to compare two resources with respect to their performances ...
Functor used to compare two vertices with respect to a priority object.
This file collects some utility functions.
This is a specialization based on mobility.
This is a specialization based on a given fixed priority value.
Information about specialization of parametric list based step.
bool store_in_chaining_with_load_out(const CustomUnorderedSet< vertex > &operations, unsigned int current_vertex_cstep, vertex v)
void print(fu_bindingRef Rfu=fu_bindingRef()) const
Function that prints the class schedule.
std::string print_cpu_time(long int t)
massage a long which represents a time interval in milliseconds, into a string suitable for output ...
const CustomUnorderedSet< std::tuple< HLSFlowStep_Type, HLSFlowStepSpecializationConstRef, HLSFlowStep_Relationship > > ComputeHLSRelationships(const DesignFlowStep::RelationshipType relationship_type) const override
Compute the relationship of this step.
Class definition of the list_based structure.
cs_ordering_functor(const OpVertexMap< double > &o, const OpGraphConstRef &opGraph)
Constructor.
void set_spec(const CustomUnorderedMap< vertex, bool > &spec_map)
Sets the speculation map.
DesignFlowStep_Status InternalExec() override
Execute the step.
This class describes all classes used to represent a structural object.
#define OUTPUT_LEVEL_PEDANTIC
verbose debugging print is performed.
std::string GetPath(std::filesystem::path path)
Data flow graph with feedback.
ParametricListBased_Metric
bool is_scheduled(const vertex &op) const
Returns true if the given operation has been already scheduled, false otherwise.
parametric_list_based(const ParameterConstRef parameters, const HLS_managerRef HLSMgr, unsigned int _funId, const DesignFlowManagerConstRef design_flow_manager, const HLSFlowStepSpecializationConstRef hls_flow_step_specialization)
This is the constructor of the list_based.
edge_integer_order_by_map(const std::map< vertex, unsigned int > &_ref, const graph *)
Graph.
#define OUTPUT_LEVEL_VERY_PEDANTIC
verbose debugging print is performed.
T * GetPointer(const refcount< U > &t)
Template function used to hide dynamic_cast The template parameter T represents a type of an object h...
Data structure used to store the functional-unit binding of the vertexes.
const OpGraphConstRef CGetOpGraph(FunctionBehavior::graph_type gt) const
This method returns the operation graphs.
OpVertexMap< double > ending_time
The ending time given the scheduling (used for chaining)
Class specification of the basic_block structure.
hlsRef HLS
HLS data structure of the function to be analyzed.
bool BB_update_resources_use(unsigned int &used_resources, const unsigned int fu_type) const
Update the resource map.
CustomMap< unsigned int, double > ending_times
The absolute ending time of each operation as computed by the scheduling Key is the index of the gimp...
const BBNodeInfoConstRef CGetBBNodeInfo(const vertex node) const
Return the info associated with a basic block.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
const BBGraphConstRef CGetBBGraph(FunctionBehavior::bb_graph_type gt=FunctionBehavior::BB) const
This method returns the basic block graphs.
#define TYPE_WHILE
constant string identifying the node type of an WHILE operation.
System dependence + anti-dependence + output dependence graph + flow graph.
const AllocationInformationConstRef all
copy of the order: control step associated with the vertices.
bool store_in_chaining_with_load_in(const CustomUnorderedSet< vertex > &operations, unsigned int current_vertex_cstep, vertex v)
store_in_chaining_with_load checks if a store is chained with a load operation or vice versa ...
bool check_non_direct_operation_chaining(const CustomUnorderedSet< vertex > &operations, vertex current_v, unsigned int v_fu_type, const ControlStep cs, const ScheduleConstRef schedule, fu_bindingRef res_binding) const
this class is used to manage the command-line or XML options.
double clock_cycle
The clock cycle.
#define REMOVE_DIRECT_TO_INDIRECT
Generic class managing scheduling algorithms.
x
Return the smallest n such that 2^n >= _x.
const HLS_constraintsRef HLS_C
store the HLS constraints
int debug_level
The debug level.
This package is used by all HLS packages to manage resource constraints and characteristics.
refcount< const HLSFlowStepSpecialization > HLSFlowStepSpecializationConstRef
const refcount definition of the class
#define TYPE_RET
constant string identifying an operation node of type return expr
virtual const CustomUnorderedSet< std::tuple< HLSFlowStep_Type, HLSFlowStepSpecializationConstRef, HLSFlowStep_Relationship > > ComputeHLSRelationships(const DesignFlowStep::RelationshipType relationship_type) const override
Compute the relationship of this step.
#define DEBUG_LEVEL_VERBOSE
verbose debugging print is performed.
void CheckSchedulabilityConditions(const CustomUnorderedSet< vertex > &operations, const vertex ¤t_vertex, ControlStep current_cycle, double ¤t_starting_time, double ¤t_ending_time, double ¤t_stage_period, CustomMap< std::pair< unsigned int, unsigned int >, double > &local_connection_map, double current_cycle_starting_time, double current_cycle_ending_time, double setup_hold_time, double &phi_extra_time, double scheduling_mux_margins, bool unbounded, bool unbounded_Functions, bool LoadStoreOp, const std::set< std::string > &proxy_functions_used, bool cstep_has_RET_conflict, unsigned int fu_type, const vertex2obj< ControlStep > ¤t_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 &LoadStoreFunctionConflict, bool &FunctionStoreconflict, bool &proxyFunCond, bool unbounded_RW, bool seeMulticycle)
Data structure definition for high-level synthesis flow.
const CustomUnorderedMap< vertex, bool > & get_spec() const
It returns speculation property map.
System dependence + anti-dependence + output dependence graph + flow graph with feedback.
The key comparison function for edge-integer set based on levels.
void set_execution(const vertex &op, ControlStep c_step)
Sets the starting clock cycle for the given operation.
Datastructure to represent memory information in high-level synthesis.
bool check_LOAD_chaining(const CustomUnorderedSet< vertex > &operations, vertex current_v, const ControlStep cs, const ScheduleConstRef schedule) const
OpGraphConstRef flow_graph_with_feedbacks
The dependence graph with feedbacks.
Class specification of the manager of the tree structures extracted from the raw file.
void compute_exec_stage_time(const unsigned int fu_type, double &stage_period, const ControlStep cs, const OpGraphConstRef op_graph, vertex v, double &op_execution_time, double &phi_extra_time, double current_starting_time, double setup_hold_time)
ParametricListBasedSpecialization(const ParametricListBased_Metric parametric_list_based_metric)
Constructor.
A brief description of the C++ Header File.
refcount< ASLAP > ASLAPRef
const bool speculation
flag to check speculation
void compute_function_topological_order()
compute_function_topological_order compute reachable function topological order
bool operator()(const std::pair< std::pair< vertex, vertex >, unsigned int > &x, const std::pair< std::pair< vertex, vertex >, unsigned int > &y) const
Compare position of two vertices in topological sorted.
std::string GetKindText() const override
Return the string representation of this.
boost::graph_traits< graph >::edge_descriptor EdgeDescriptor
edge definition.
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...