Ignore:
Timestamp:
Jun 25, 2008, 1:08:04 PM (16 years ago)
Author:
nipo
Message:

Checkin autotools magic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/with_autoconf/src/schedulers.cc

    r1 r8  
    3535 */
    3636
    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
    4851
    4952using namespace std;
     
    9497                         const method_process_t *a2)
    9598{
    96   ASSERT(a1 != NULL);
    97   ASSERT(a2 != NULL);
     99  assert(a1 != NULL);
     100  assert(a2 != NULL);
    98101  sc_module *m1 = a1->module;
    99102  sc_module *m2 = a2->module;
     
    113116    addr1.func = a1->func;
    114117    addr2.func = a2->func;
    115     ASSERT(addr1.addr_ll != addr2.addr_ll);
     118    assert(addr1.addr_ll != addr2.addr_ll);
    116119    if ( sizeof(SC_ENTRY_FUNC) == 4 ) {
    117120        return (addr1.addr_l < addr2.addr_l);
     
    129132                    const method_process_t *a2)
    130133{
    131   ASSERT(a1 != NULL);
    132   ASSERT(a2 != NULL);
     134  assert(a1 != NULL);
     135  assert(a2 != NULL);
    133136  return (a1->module < a2->module);
    134137}
     
    139142                 const method_process_t *a2)
    140143{
    141     ASSERT(a1 != NULL);
    142     ASSERT(a2 != NULL);
     144    assert(a1 != NULL);
     145    assert(a2 != NULL);
    143146    union {
    144147        SC_ENTRY_FUNC func;
     
    236239{
    237240  SignalDependencyGraph *sig_graph = MakeAcyclicSignalDependencyGraph ();
    238   ASSERT(sig_graph != NULL);
     241  assert(sig_graph != NULL);
    239242  // Create the process evaluation list
    240243  ProcessDependencyList* process_list = MakeMouchardScheduling (*sig_graph);
    241   ASSERT(process_list != NULL);
     244  assert(process_list != NULL);
    242245
    243246  if (dump_all_graph)
     
    283286    // Uses port dependancies like Dr. Mouchard.
    284287    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);
    287292    break;
    288293  }
     
    294299    // and does not use an event-driven scheduler.
    295300    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);
    298305    break;
    299306  }
     
    306313      graph2dot("module_graph", *g);
    307314    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);
    310319    break;
    311320  }
Note: See TracChangeset for help on using the changeset viewer.