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