Ignore:
Timestamp:
May 4, 2009, 8:51:56 PM (15 years ago)
Author:
buchmann
Message:

SystemCASS now uses autoconf/automake to build the API. Regression tests still
use the old Makefiles.
(thanks to Nicolas Pouillon)

The library directory no longer is "lib-arch-system". The directory now is "lib-linux". Everyone needs to pay attention about SYSTEMCASS environment variable.

Changes:

  • system header includes
  • Add includes to config.h (generated by autoconf/automake)
  • test:
    • linux preprocessor macro instead of _WIN32
    • CONFIG_DEBUG instead of DEBUG

Removes:

  • Makefile
  • guess_endianness.cc
  • guess_os.sh
  • assert.h (we now use standard assert.h)
  • Options.def
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sources/src/schedulers.cc

    r17 r27  
    3535 */
    3636
    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
    4954
    5055using namespace std;
     
    95100                         const method_process_t *a2)
    96101{
    97   ASSERT(a1 != NULL);
    98   ASSERT(a2 != NULL);
     102  assert(a1 != NULL);
     103  assert(a2 != NULL);
    99104  sc_module *m1 = a1->module;
    100105  sc_module *m2 = a2->module;
     
    114119    addr1.func = a1->func;
    115120    addr2.func = a2->func;
    116     ASSERT(addr1.addr_ll != addr2.addr_ll);
     121    assert(addr1.addr_ll != addr2.addr_ll);
    117122    if ( sizeof(SC_ENTRY_FUNC) == 4 ) {
    118123        return (addr1.addr_l < addr2.addr_l);
     
    130135                    const method_process_t *a2)
    131136{
    132   ASSERT(a1 != NULL);
    133   ASSERT(a2 != NULL);
     137  assert(a1 != NULL);
     138  assert(a2 != NULL);
    134139  return (a1->module < a2->module);
    135140}
     
    140145                 const method_process_t *a2)
    141146{
    142     ASSERT(a1 != NULL);
    143     ASSERT(a2 != NULL);
     147    assert(a1 != NULL);
     148    assert(a2 != NULL);
    144149    union {
    145150        SC_ENTRY_FUNC func;
     
    237242{
    238243  SignalDependencyGraph *sig_graph = MakeAcyclicSignalDependencyGraph ();
    239   ASSERT(sig_graph != NULL);
     244  assert(sig_graph != NULL);
    240245  // Create the process evaluation list
    241246  ProcessDependencyList* process_list = MakeMouchardScheduling (*sig_graph);
    242   ASSERT(process_list != NULL);
     247  assert(process_list != NULL);
    243248
    244249  if (dump_all_graph)
     
    284289    // Uses port dependancies like Dr. Mouchard.
    285290    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);
    288295    break;
    289296  }
     
    295302    // and does not use an event-driven scheduler.
    296303    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);
    299308    break;
    300309  }
     
    307316      graph2dot("module_graph", *g);
    308317    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);
    311322    break;
    312323  }
Note: See TracChangeset for help on using the changeset viewer.