Changeset 27 for sources/src/schedulers.cc
- Timestamp:
- May 4, 2009, 8:51:56 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sources/src/schedulers.cc
r17 r27 35 35 */ 36 36 37 #include<iostream> 38 #include<algorithm> //std::sort 39 #include"sc_module.h" // method_process_t 40 #include"gen_code.h" // gen_scheduling_code_for_dynamic_link & gen_scheduling_code_for_static_func 41 #include"internal.h" // dump_all_graph 42 #include"graph_cass.h" // makegraph 43 #include"process_dependency.h" // MakeProcessDependencyList 44 #include"signal_dependency.h" // MakeSignalDependencyGraph 45 #include"mouchard_scheduling.h" // MakeMouchardScheduling 46 #include"graph_signals.h" // makegraph 47 //#include"module_hierarchy2dot.h" 48 #include"assert.h" 37 #include "sc_module.h" // method_process_t 38 #include "gen_code.h" // gen_scheduling_code_for_dynamic_link & gen_scheduling_code_for_static_func 39 #include "internal.h" // dump_all_graph 40 #include "graph_cass.h" // makegraph 41 #include "process_dependency.h" // MakeProcessDependencyList 42 #include "signal_dependency.h" // MakeSignalDependencyGraph 43 #include "mouchard_scheduling.h" // MakeMouchardScheduling 44 #include "graph_signals.h" // makegraph 45 //#include "module_hierarchy2dot.h" 46 47 #include <cassert> 48 #include <iostream> 49 #include <algorithm> //std::sort 50 51 #ifdef HAVE_CONFIG_H 52 #include "config.h" 53 #endif 49 54 50 55 using namespace std; … … 95 100 const method_process_t *a2) 96 101 { 97 ASSERT(a1 != NULL);98 ASSERT(a2 != NULL);102 assert(a1 != NULL); 103 assert(a2 != NULL); 99 104 sc_module *m1 = a1->module; 100 105 sc_module *m2 = a2->module; … … 114 119 addr1.func = a1->func; 115 120 addr2.func = a2->func; 116 ASSERT(addr1.addr_ll != addr2.addr_ll);121 assert(addr1.addr_ll != addr2.addr_ll); 117 122 if ( sizeof(SC_ENTRY_FUNC) == 4 ) { 118 123 return (addr1.addr_l < addr2.addr_l); … … 130 135 const method_process_t *a2) 131 136 { 132 ASSERT(a1 != NULL);133 ASSERT(a2 != NULL);137 assert(a1 != NULL); 138 assert(a2 != NULL); 134 139 return (a1->module < a2->module); 135 140 } … … 140 145 const method_process_t *a2) 141 146 { 142 ASSERT(a1 != NULL);143 ASSERT(a2 != NULL);147 assert(a1 != NULL); 148 assert(a2 != NULL); 144 149 union { 145 150 SC_ENTRY_FUNC func; … … 237 242 { 238 243 SignalDependencyGraph *sig_graph = MakeAcyclicSignalDependencyGraph (); 239 ASSERT(sig_graph != NULL);244 assert(sig_graph != NULL); 240 245 // Create the process evaluation list 241 246 ProcessDependencyList* process_list = MakeMouchardScheduling (*sig_graph); 242 ASSERT(process_list != NULL);247 assert(process_list != NULL); 243 248 244 249 if (dump_all_graph) … … 284 289 // Uses port dependancies like Dr. Mouchard. 285 290 ProcessDependencyList* process_list = BuchmannScheduling (); 286 base_name = gen_scheduling_code_for_dynamic_link (transition_func_list, moore_func_list,*process_list); 287 gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list); 291 if (dynamic_link_of_scheduling_code) 292 base_name = gen_scheduling_code_for_dynamic_link (transition_func_list, moore_func_list,*process_list); 293 else 294 gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list); 288 295 break; 289 296 } … … 295 302 // and does not use an event-driven scheduler. 296 303 ProcessDependencyList* process_list = MouchardScheduling (); 297 base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*process_list); 298 gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list); 304 if (dynamic_link_of_scheduling_code) 305 base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*process_list); 306 else 307 gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list); 299 308 break; 300 309 } … … 307 316 graph2dot("module_graph", *g); 308 317 strong_component_list_t *strong_list = strong_component (g); 309 base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*strong_list); 310 gen_scheduling_code_for_quasistatic_func (transition_func_list, moore_func_list, *strong_list); 318 if (dynamic_link_of_scheduling_code) 319 base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*strong_list); 320 else 321 gen_scheduling_code_for_quasistatic_func (transition_func_list, moore_func_list, *strong_list); 311 322 break; 312 323 }
Note: See TracChangeset
for help on using the changeset viewer.