Go to the documentation of this file.
11 #ifndef INC_CGRA_OPSCHEDULER_H_
12 #define INC_CGRA_OPSCHEDULER_H_
22 #include <unordered_map>
27 #include <gurobi_c++.h>
36 using OpCodeEdge = std::pair<OpGraphOpCode, OpGraphOpCode>;
44 std::string arch_name,
45 std::string supported_ops_file_name =
"");
49 int addOpConstr(GRBmodel* model,
unsigned II,
int max_step,
bool ignore_backedge,
int exit_id);
71 std::map<OpGraphOp*, int>& last_use);
76 throw make_from_stream<cgrame_model_error>([&](
auto&& s){
77 s <<
"Could not find edge of opcode" << op1 <<
" and opcode " << op2;
88 using opPair = std::pair<OpGraphOp*, OpGraphOp*>;
99 std::unordered_map<const OpGraphOp*, int>
schedule;
105 #endif // INC_CGRA_OPSCHEDULER_H_
std::unordered_map< const OpGraphOp *, int > getSchedule(SchedType type)
std::unordered_map< const OpGraphOp *, int > asap_schedule
void parseNetworkSchedule(std::string netwrok_latency_filename)
int getLowerBoundEdge(OpGraphOpCode op1, OpGraphOpCode op2)
OpScheduler(const OpGraph &opgraph, const MRRG &mrrg, std::string arch_name, std::string supported_ops_file_name="")
std::pair< OpGraphOpCode, OpGraphOpCode > OpCodeEdge
void buildLastUseTable(int &ext_node_count, int exit_id, std::map< OpGraphOp *, int > &last_use)
bool isBackEdge(OpGraphOp *)
signed char OpCode OpGraphOpCode
std::unordered_map< const OpGraphOp *, int > alap_schedule
std::unordered_map< const OpGraphOp *, int > sdc_lro_schedule
int addLastUseConstr(GRBmodel *model, std::map< OpGraphOp *, int > last_use)
int schedASLAP(unsigned II, unsigned max_cycles, SchedType algo)
int calcLowerBound(OpGraphOp *op)
int schedSDCMod(unsigned II, SchedType algo)
std::pair< OpGraphOp *, OpGraphOp * > opPair
std::unordered_map< const OpGraphOp *, int > sdc_mod_schedule
std::unordered_map< opPair, int, pair_hash > extended_sched_const
std::unordered_map< OpGraphOpCode, int > op_latency
std::unordered_map< OpCodeEdge, int, pair_hash > upper_bound_op_code_edge
std::vector< const MRRGNode * > function_nodes
std::unordered_map< const OpGraphOp *, int > schedule
int calcNodePrio(OpGraphOp *, int)
int calcEdgeDist(OpGraphVal *val, OpGraphOp *sink_op, unsigned II, bool ignore_backedge)
std::unordered_map< OpCodeEdge, int, pair_hash > lower_bound_op_code_edge
int addOpConstr(GRBmodel *model, unsigned II, int max_step, bool ignore_backedge, int exit_id)