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

Checkin autotools magic

Location:
branches/with_autoconf/src
Files:
1 added
6 deleted
69 edited

Legend:

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

    r3 r8  
    3333 */
    3434
    35 #include"alias.h"
    36 #include<string>
    37 //#include<cstdarg.h>
    38 //#include<cstdio.h>
    39 #include<iostream>
     35#include "alias.h"
     36#include <string>
     37//#include <cstdarg.h>
     38//#include <cstdio.h>
     39#include <iostream>
     40#ifdef HAVE_CONFIG_H
     41#include "config.h"
     42#endif
    4043
    4144const char * alias ()
  • branches/with_autoconf/src/bit2string.cc

    r1 r8  
    4141#include <stdlib.h>
    4242#include <iostream>
     43#ifdef HAVE_CONFIG_H
     44#include "config.h"
     45#endif
    4346       
    4447using namespace std;
  • branches/with_autoconf/src/casc.h

    r4 r8  
    4848EXTERN void simulate_1_cycle (void)
    4949{
    50 #ifdef CHECK_FSM_RULES
     50#ifdef CONFIG_CHECK_FSM_RULES
    5151        casc_fsm_step = TRANSITION;
    5252#endif
    5353  transition ();
    5454  update     ();
    55 #ifdef CHECK_FSM_RULES
     55#ifdef CONFIG_CHECK_FSM_RULES
    5656        casc_fsm_step = GEN_MOORE;
    5757#endif
    5858  moore_generation ();
    59 #ifdef CHECK_FSM_RULES
     59#ifdef CONFIG_CHECK_FSM_RULES
    6060        casc_fsm_step = GEN_MEALY;
    6161#endif
    6262  mealy_generation ();
    63 #ifdef CHECK_FSM_RULES
     63#ifdef CONFIG_CHECK_FSM_RULES
    6464        casc_fsm_step = STIMULI;
    6565#endif
  • branches/with_autoconf/src/data_field.h

    r1 r8  
    1313#define __DATA_FIELD_H__
    1414
    15 #include <endianness.h>
    16 
    1715template<int      WIDTH,
    1816         int      PADDING,
    1917         typename data_type>
    20 struct val_field { /* try to work with little endianess */
    21 #if defined(little_endian)
    22   /* little endian */
    23 //  data_type pad:PADDING;
     18struct val_field {
    2419  data_type valW:WIDTH;
    25 #elif defined(big_endian)
    26   /* big endian */
    27   data_type pad:PADDING;
    28   data_type valW:WIDTH;
    29 #else
    30 #error You must define endianness.
    31 #endif
    3220};
    3321
  • branches/with_autoconf/src/dump_dot.cc

    r4 r8  
    4040#include "simplify_string.h"
    4141#include "sc_ver.h" // sc_version
     42#ifdef HAVE_CONFIG_H
     43#include "config.h"
     44#endif
    4245
    4346typedef std::list<sc_core::sc_port_base*> port_list_t;
  • branches/with_autoconf/src/dump_used_env.cc

    r1 r8  
    3535
    3636#include "dump_used_env.h"
     37#ifdef HAVE_CONFIG_H
     38#include "config.h"
     39#endif
    3740
    3841std::string
  • branches/with_autoconf/src/dump_used_options.cc

    r1 r8  
    3535
    3636#include "dump_used_options.h"
     37#ifdef HAVE_CONFIG_H
     38#include "config.h"
     39#endif
    3740
    3841namespace sc_core {
     
    6568  "DUMP_STAGE, "
    6669#endif
    67 #ifdef CHECK_FSM_RULES     
    68   "CHECK_FSM_RULES, "
     70#ifdef CONFIG_CHECK_FSM_RULES     
     71  "CONFIG_CHECK_FSM_RULES, "
    6972#endif
    7073#ifdef COMPIL_DEBUG 
    7174  "COMPIL_DEBUG,"       
    7275#endif
    73 #ifdef DEBUG
    74   "DEBUG, "         
     76#ifdef CONFIG_DEBUG
     77  "CONFIG_DEBUG, "         
    7578#endif
    7679#ifdef UINT64             
  • branches/with_autoconf/src/entity.cc

    r1 r8  
    3535 */
    3636
    37 #include<iomanip>
    38 #include<list>
    39 #include<map>
    40 #include<vector>
    41 
    42 #include"assert.h"
    43 #include"entity.h"
    44 #include"sc_port.h"
    45 #include"sc_signal.h"
    46 #include"sc_module.h"
     37#include <iomanip>
     38#include <list>
     39#include <map>
     40#include <vector>
     41
     42#include <cassert>
     43#include "entity.h"
     44#include "sc_port.h"
     45#include "sc_signal.h"
     46#include "sc_module.h"
     47#ifdef HAVE_CONFIG_H
     48#include "config.h"
     49#endif
    4750
    4851using namespace std;
     
    174177    typedef std::map<const tab_t *,equi_list_t::iterator,predic4tab_t2equi_t_t> tab_t2equi_it_t;
    175178    static tab_t2equi_it_t tab2equi_map;
    176     ASSERT(pointer != NULL);
     179    assert(pointer != NULL);
    177180
    178181    // boost
     
    239242        {
    240243                equi_t::const_iterator top_iter = e.begin ();
    241 #ifdef DEBUG
     244#ifdef CONFIG_DEBUG
    242245                if (top_iter == e.end ()) {
    243246                        cerr << "Internal error : no signal in " << e << endl;
     
    356359        }
    357360       
    358 #if defined(DUMP_SIGNALS_STATS)
     361#if defined(DUMP_SIGNAL_STATS)
    359362        static unsigned int equi_real_size;
    360363#endif
     
    388391    unsigned int table_size = get_sizeof_signals_table ();
    389392                equi_table = new tab_t[table_size]; //(0xCD);
    390 #if defined(DUMP_SIGNALS_STATS)
     393#if defined(DUMP_SIGNAL_STATS)
    391394                equi_real_size = table_size;
    392395#endif
     
    402405  bind_equi_to_table (equi_t &e, tab_t * const pointer)
    403406  {
    404     ASSERT(pointer != NULL);
     407    assert(pointer != NULL);
    405408    equi_t::iterator i;
    406409    for (i = e.begin (); i != e.end (); ++i) {
     
    454457    o << ")";
    455458#else
    456    ASSERT(e.object != NULL);
     459   assert(e.object != NULL);
    457460   o << e.object->name ();
    458461#endif
     
    493496  print_table_stats (ostream &o)
    494497  {
    495 #if defined(DUMP_SIGNALS_STATS)
     498#if defined(DUMP_SIGNAL_STATS)
    496499                int nb_reg = 0;
    497500                int nb_sig = 0;
     
    536539        }
    537540        const entity &ent = *(eq.begin ());
    538 #ifdef DEBUG
     541#ifdef CONFIG_DEBUG
    539542        if (ent.type != sc_core::entity::SIGNAL)
    540543                exit(28);
     
    543546        const char *sig_name = ent.object->name ();
    544547        const char *sep  = strchr (sig_name,'.');
    545 #ifdef DEBUG
     548#ifdef CONFIG_DEBUG
    546549        if (sep == NULL) {
    547550                exit (30);
     
    594597#endif
    595598
    596 #if defined(DUMP_SIGNALS_STATS)
     599#if defined(DUMP_SIGNAL_STATS)
    597600static unsigned int equi_real_size;
    598601#endif
     
    602605{
    603606#if 0
    604 //defined(DEBUG)
     607//defined(CONFIG_DEBUG)
    605608  equi_list_t::iterator x_equi = get_equi (x);
    606609  if ((x_equi != equi_list.end())) {
     
    639642tbind (sc_port_base &x,T &y)
    640643{
    641 //  ASSERT(x.get_pointer () != NULL); // x pointer may be NULL
    642 //  ASSERT(y.get_pointer () != NULL); // y pointer may be NULL
     644//  assert(x.get_pointer () != NULL); // x pointer may be NULL
     645//  assert(y.get_pointer () != NULL); // y pointer may be NULL
    643646  equi_list_t::iterator x_equi = get_equi (x);
    644647  equi_list_t::iterator y_equi = get_equi (y);
  • branches/with_autoconf/src/entity.h

    r1 r8  
    1414#define __ENTITY_H__
    1515
    16 #include<iostream>
    17 #include<list>
    18 #include"sc_fwd.h"
    19 #include"sc_port.h"
    20 #include"sc_signal.h"
     16#include <iostream>
     17#include <list>
     18#include "sc_fwd.h"
     19#include "sc_port.h"
     20#include "sc_signal.h"
    2121
    2222namespace sc_core {
  • branches/with_autoconf/src/fsm_rules.h

    r1 r8  
    1313#define __FSM_RULES_H__
    1414
    15 #ifdef CHECK_FSM_RULES
     15#ifdef HAVE_CONFIG_H
     16#include "config.h"
     17#endif
     18
     19#ifdef CONFIG_CHECK_FSM_RULES
    1620
    1721namespace sc_core {
  • branches/with_autoconf/src/gen_code.cc

    r1 r8  
    3535 */
    3636
    37 #include<stdio.h>
    38 #include<stdlib.h>
    39 #include<iostream>
    40 #include<fstream>
    41 
    42 #include"internal.h"
    43 #include"gen_code.h"
    44 #include"sc_module.h"
    45 #include"sc_ver.h"
    46 #include"process_dependency.h"
    47 
    48 #ifdef CHECK_FSM_RULES
    49 #define fsm_check_flag "-DCHECK_FSM_RULES"
     37#include <stdio.h>
     38#include <stdlib.h>
     39#include <iostream>
     40#include <fstream>
     41
     42#include "internal.h"
     43#include "gen_code.h"
     44#include "sc_module.h"
     45#include "sc_ver.h"
     46#include "process_dependency.h"
     47#ifdef HAVE_CONFIG_H
     48#include "config.h"
     49#endif
     50
     51#ifdef CONFIG_CHECK_FSM_RULES
     52#include "fsm_rules.h"
     53#define fsm_check_flag "-DCONFIG_CHECK_FSM_RULES"
    5054#else
    5155#define fsm_check_flag
    5256#endif
    5357
    54 #define casc_cflags CFLAGS " " fsm_check_flag
    55 
    56 #if defined(darwin)
    57 #define macosx
    58 #endif
     58#define casc_cflags GENERATED_MODULE_CFLAGS " " fsm_check_flag
    5959
    6060using namespace std;
     
    8686                << m.module->name() << "->" << m.name << "()\\n\");\n";
    8787  o << " p.integer = " << func << ";\n";
    88 #if CPP_CALL
     88#ifdef CPP_CALL
    8989  o << " (((sc_module*)(" << m.module << "))->*(p.pmf)) (); /* "
    9090                << m.module->name () << "->" << m.name << "() */\n";
     
    138138  }
    139139
    140 #ifdef DEBUG
     140#ifdef CONFIG_DEBUG
    141141  cerr << "opened temporary filename : " << temp << "\n";
    142142#endif
     
    263263
    264264  o << "// generated by " << sc_version () << endl
    265                 << "#include<casc.h>\n\n"
    266                 << "#include<stdio.h>\n\n"
    267 //              << "#include<iostream>\n\n"
     265                << "#include <casc.h>\n\n"
     266                << "#include <stdio.h>\n\n"
     267//              << "#include <iostream>\n\n"
    268268                << "namespace sc_core {\n"
    269269    << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n"
     
    324324
    325325  o << "// generated by " << sc_version () << endl
    326                 << "#include<casc.h>\n\n"
    327                 << "#include<stdio.h>\n\n"
    328 //              << "#include<iostream>\n\n"
     326                << "#include <casc.h>\n\n"
     327                << "#include <stdio.h>\n\n"
     328//              << "#include <iostream>\n\n"
    329329                << "namespace sc_core {\n"
    330330    << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n"
     
    372372//  const char *target_arch = getenv ("TARGET_ARCH");
    373373        const char *default_compiler =
    374 #if CPP_CALL
     374#ifdef CPP_CALL
    375375                "g++";
    376376#else
     
    413413  /* COMPILE */
    414414  /* ******* */
    415 #if defined(macosx)
    416     sprintf(compil_str,
    417                                 "(cd %s ; %s %s -DSCHEDULING_BY_CASC -I%s/include -fno-common -dynamic -o %s -c %s)",
    418         temporary_dir,
    419                                 compiler,
    420                                 casc_cflags,
    421                                 systemc_dir,
    422                                 target_name,
    423                                 source_name);
    424 //    sprintf(compil_str,"");
    425 #elif defined(linux)
    426     sprintf(compil_str,
    427                                 "(cd %s ; libtool --mode=compile %s %s -DSCHEDULING_BY_CASC -I%s/include -shared -o %s -c %s)",
    428         temporary_dir,
    429                                 compiler,
    430                                 casc_cflags,
    431                                 systemc_dir,
    432                                 target_name,
    433                                 source_name);
     415  const char *commandline_template =
     416#if defined(CONFIG_OS_DARWIN)
     417          "(cd %s ;"                     " %s %s -DSCHEDULING_BY_CASC -I%s/include -fno-common -dynamic -o %s -c %s)"
     418#elif defined(CONFIG_OS_LINUX)
     419          "(cd %s ; libtool --mode=compile %s %s -DSCHEDULING_BY_CASC -I%s/include -shared -o %s -c %s)"
    434420#else
    435     sprintf(compil_str,
    436                                 "(cd %s ; %s %s -DSCHEDULING_BY_CASC -I%s/include -dynamiclib -o %s -c %s)",
    437         temporary_dir,
    438                                 compiler,
    439                                 casc_cflags,
    440                                 systemc_dir,
    441                                 target_name,
    442                                 source_name);
    443 #endif
     421          "(cd %s ;"                     " %s %s -DSCHEDULING_BY_CASC -I%s/include -dynamiclib -o %s -c %s)"
     422#endif
     423          ;
     424  sprintf(compil_str,
     425                  commandline_template,
     426                  temporary_dir,
     427                  compiler,
     428                  casc_cflags,
     429                  systemc_dir,
     430                  target_name,
     431                  source_name);
    444432
    445433  if (dump_stage)
     
    456444  sprintf (target_name, "%s.so", base_name);
    457445
    458 #if defined(linux)
     446#ifdef CONFIG_OS_LINUX
    459447  sprintf (source_name, "%s.lo", base_name);
    460448  sprintf(compil_str, "(cd %s ; pwd ; libtool --mode=link %s %s -shared -rdynamic -o %s %s)", /* -L. -L%s/lib-%s */
     
    555543  for (i = 0; i < n; ++i)
    556544  {
    557 #if 0 //defined(DEBUG)
     545#if 0 //defined(CONFIG_DEBUG)
    558546    sc_module *m = (sc_module*)(fc.instance[i]);
    559547    cerr << m->name () << endl;
     
    570558void static_simulate_1_cycle (void)
    571559{
    572 #ifdef CHECK_FSM_RULES
     560#ifdef CONFIG_CHECK_FSM_RULES
    573561        casc_fsm_step = TRANSITION;
    574562#endif
    575563  call_functions (pf[0]); // transition
    576564  update     ();
    577 #ifdef CHECK_FSM_RULES
     565#ifdef CONFIG_CHECK_FSM_RULES
    578566        casc_fsm_step = GEN_MOORE;
    579567#endif
    580568  call_functions (pf[1]); // moore generation
    581 #ifdef CHECK_FSM_RULES
     569#ifdef CONFIG_CHECK_FSM_RULES
    582570        casc_fsm_step = GEN_MEALY;
    583571#endif
    584572  call_functions (pf[2]); // mealy generation
    585 #ifdef CHECK_FSM_RULES
     573#ifdef CONFIG_CHECK_FSM_RULES
    586574        casc_fsm_step = STIMULI;
    587575#endif
     
    629617void quasistatic_simulate_1_cycle (void)
    630618{
    631 #ifdef CHECK_FSM_RULES
     619#ifdef CONFIG_CHECK_FSM_RULES
    632620        casc_fsm_step = TRANSITION;
    633621#endif
     
    639627  }
    640628  update     ();
    641 #ifdef CHECK_FSM_RULES
     629#ifdef CONFIG_CHECK_FSM_RULES
    642630        casc_fsm_step = GEN_MOORE;
    643631#endif
     
    647635    Call (m);
    648636  }
    649 #ifdef CHECK_FSM_RULES
     637#ifdef CONFIG_CHECK_FSM_RULES
    650638        casc_fsm_step = GEN_MEALY;
    651639#endif
    652640  quasistatic_mealy_generation ();
    653 #ifdef CHECK_FSM_RULES
     641#ifdef CONFIG_CHECK_FSM_RULES
    654642        casc_fsm_step = STIMULI;
    655643#endif
  • branches/with_autoconf/src/gen_code.h

    r1 r8  
    1414#define __GEN_CODE_H__
    1515
    16 #include"internal.h"
    17 #include"global_functions.h"
    18 #include"graph.h"
    19 #include"sc_port.h"
    20 #include"sc_trace.h"
    21 #include"process_dependency.h"
     16#include "internal.h"
     17#include "global_functions.h"
     18#include "graph.h"
     19#include "sc_port.h"
     20#include "sc_trace.h"
     21#include "process_dependency.h"
    2222
    2323//-------------------------------------------------------------------
     
    105105internal_sc_cycle0( double duration )  // in default time units
    106106{
    107 #ifdef DEBUG
     107#ifdef CONFIG_DEBUG
    108108        // Check dynamic linkage
    109109  if ((func_combinationals == NULL) || (func_simulate_1_cycle == NULL)) {
     
    121121#endif
    122122        update ();
    123 #ifdef CHECK_FSM_RULES
     123#ifdef CONFIG_CHECK_FSM_RULES
    124124                casc_fsm_step = GEN_MEALY;
    125125#endif
     
    132132  if (is_posted_write ()) {
    133133    update ();
    134 #ifdef CHECK_FSM_RULES
     134#ifdef CONFIG_CHECK_FSM_RULES
    135135                casc_fsm_step = GEN_MEALY;
    136136#endif
  • branches/with_autoconf/src/global_functions.cc

    r4 r8  
    3535 */
    3636
    37 #include<iostream>
    38 #include<dlfcn.h>
    39 #include"schedulers.h" // get_scheduling & run_schedule_editor
    40 #include"sc_module.h" // check_all_method_process
    41 #include"gen_code.h"  // gen_scheduling_code_for_dynamic_link & gen_scheduling_code_for_static_func
    42 #include"sc_clock_ext.h" // clock list
    43 #include"usage.h"
    44 #include"module_hierarchy2dot.h"
    45 #include"assert.h"
     37#include <iostream>
     38#include <dlfcn.h>
     39#include "schedulers.h" // get_scheduling & run_schedule_editor
     40#include "sc_module.h" // check_all_method_process
     41#include "gen_code.h"  // gen_scheduling_code_for_dynamic_link & gen_scheduling_code_for_static_func
     42#include "sc_clock_ext.h" // clock list
     43#include "usage.h"
     44#include "module_hierarchy2dot.h"
     45#include "assert.h"
     46#ifdef HAVE_CONFIG_H
     47#include "config.h"
     48#endif
     49
     50#ifdef CONFIG_CHECK_FSM_RULES
     51#include "fsm_rules.h"
     52#endif
    4653
    4754using namespace std;
     
    218225   
    219226  char lib_absolutepath[256];
    220 #if defined(darwin) //macosx)
     227#if defined(CONFIG_OS_DARWIN)
    221228  sprintf(lib_absolutepath, "/tmp/%s.so", base_name);
    222 #elif defined(linux)
     229#elif defined(CONFIG_OS_LINUX)
    223230  sprintf(lib_absolutepath, "/tmp/%s.so", base_name);
    224231#else
     
    255262  }
    256263  // Init variables to be able to run combinational functions
    257 #ifdef CHECK_FSM_RULES
     264#ifdef CONFIG_CHECK_FSM_RULES
    258265        casc_fsm_step = STIMULI;
    259266#endif
  • branches/with_autoconf/src/global_functions.h

    r4 r8  
    1313#define __GLOBAL_FUNCTIONS_H__
    1414
    15 #include"sc_fwd.h"
    16 #include"sc_time.h"
     15#include "sc_fwd.h"
     16#include "sc_time.h"
    1717
    1818extern int sc_main(int, char **);
  • branches/with_autoconf/src/graph.cc

    r1 r8  
    113113#include "sc_module.h"
    114114#include "sc_port.h"
     115#ifdef HAVE_CONFIG_H
     116#include "config.h"
     117#endif
    115118
    116119using namespace std;
     
    154157{
    155158Arc *a;
    156 #ifdef DEBUG
     159#ifdef CONFIG_DEBUG
    157160        if ((u == NULL) || (v == NULL))
    158161                exit(29042004);
  • branches/with_autoconf/src/graph_cass.cc

    r1 r8  
    129129#include "simplify_string.h" // simplify_string
    130130#include "sc_ver_ext.h"      // sc_version for dumping to DOT
     131#ifdef HAVE_CONFIG_H
     132#include "config.h"
     133#endif
    131134
    132135using namespace std;
  • branches/with_autoconf/src/graph_signals.cc

    r1 r8  
    139139#include "sc_module.h"
    140140#include "sc_port.h"
     141#ifdef HAVE_CONFIG_H
     142#include "config.h"
     143#endif
    141144
    142145using namespace std;
  • branches/with_autoconf/src/hex2string.cc

    r1 r8  
    4141#include <stdlib.h>
    4242#include <iostream>
     43#ifdef HAVE_CONFIG_H
     44#include "config.h"
     45#endif
    4346       
    4447using namespace std;
  • branches/with_autoconf/src/methodprocess_dependency.cc

    r1 r8  
    3434 */
    3535
    36 #include "assert.h"
     36#include <cassert>
    3737#include "methodprocess_dependency.h"
    3838#include "simplify_string.h"
     
    4040#include <iostream>
    4141#include <fstream>
     42#ifdef HAVE_CONFIG_H
     43#include "config.h"
     44#endif
    4245
    4346using namespace std;
     
    4750get_name (const method_process_t *method)
    4851{
    49   ASSERT(method != NULL);
     52  assert(method != NULL);
    5053  const sc_module *module = method->module;
    51   ASSERT(module != NULL);
     54  assert(module != NULL);
    5255  const char *module_name = module->name ();
    5356  const char *function_name = method->name;
     
    8588    const SignalDependency &sd = *it;
    8689    const equi_t           *source_equi     = sd.source;
    87     ASSERT(source_equi != NULL);
     90    assert(source_equi != NULL);
    8891          const method_process_t *source_method   = table[source_equi];
    8992    if (source_method == NULL)
  • branches/with_autoconf/src/module_hierarchy.cc

    r1 r8  
    3636#include "module_hierarchy.h"
    3737#include "sc_module.h"
    38 #include "assert.h"
     38#include <cassert>
    3939#include <map>
     40#ifdef HAVE_CONFIG_H
     41#include "config.h"
     42#endif
    4043
    4144using namespace std;
     
    7174      return; //obj_list = &top_level_objects;
    7275    else {
    73       ASSERT(parent != &obj);
     76      assert(parent != &obj);
    7477      const sc_object *pobj      = (const sc_module *) parent;
    7578      obj_list = &(object2childs[pobj]);
  • branches/with_autoconf/src/module_hierarchy2dot.cc

    r1 r8  
    4343#include "sc_signal.h"
    4444#include "entity.h"
    45 #include "assert.h"
     45#include <cassert>
    4646#include "internal.h"
     47#ifdef HAVE_CONFIG_H
     48#include "config.h"
     49#endif
    4750
    4851using namespace std;
     
    8891      const entity &in_entity  = *it;
    8992      sc_object    *in_obj     = in_entity.object;
    90       ASSERT(in_obj != NULL);
     93      assert(in_obj != NULL);
    9194      const sc_module *in_parent = NULL;
    9295      switch (in_entity.type) {
  • branches/with_autoconf/src/mouchard_scheduling.cc

    r1 r8  
    4545#include "sc_module.h"
    4646#include "sc_ver.h"
     47#ifdef HAVE_CONFIG_H
     48#include "config.h"
     49#endif
    4750
    4851using namespace std;
  • branches/with_autoconf/src/port_dependency.cc

    r1 r8  
    4444#include "sc_port.h"
    4545#include "sc_ver_ext.h"
     46#ifdef HAVE_CONFIG_H
     47#include "config.h"
     48#endif
    4649
    4750using namespace std;
     
    107110        p.destination = &b;
    108111        aPortDependencyGraph.push_back (p);
    109 #if DUMP_PORT_DEPENDENCY
     112#ifdef DUMP_PORT_DEPENDENCY
    110113        if (a) {
    111114                cerr << "'" << ((sc_object&)b).name()
  • branches/with_autoconf/src/process_dependency.cc

    r1 r8  
    4444#include "sc_module.h"
    4545#include "sc_ver.h"
     46#ifdef HAVE_CONFIG_H
     47#include "config.h"
     48#endif
    4649
    4750using namespace std;
  • branches/with_autoconf/src/sc_bigint.h

    r1 r8  
    2222// ----------------------------------------------------------------------------
    2323
    24 #include"sc_nbdefs.h"
     24#include "sc_nbdefs.h"
    2525
    2626namespace sc_dt {
  • branches/with_autoconf/src/sc_biguint.h

    r1 r8  
    1818// ----------------------------------------------------------------------------
    1919
    20 #include"sc_nbdefs.h"
     20#include "sc_nbdefs.h"
    2121
    2222namespace sc_dt {
  • branches/with_autoconf/src/sc_bit.h

    r1 r8  
    1313#define __SC_BIT_H__
    1414
    15 #include"sc_nbdefs.h"
    16 #include"sc_fwd.h"
    17 #include"sc_logic.h"
    18 #include"sc_string.h"
    19 #include"sc_numrep.h"
     15#include "sc_nbdefs.h"
     16#include "sc_fwd.h"
     17#include "sc_logic.h"
     18#include "sc_string.h"
     19#include "sc_numrep.h"
    2020
    2121// ----------------------------------------------------------------------------
  • branches/with_autoconf/src/sc_bv.h

    r1 r8  
    1818// ----------------------------------------------------------------------------
    1919
    20 #include"sc_nbdefs.h"
    21 #include"sc_logic.h"
    22 #include"sc_unsigned.h"
    23 #include"sc_signed.h"
    24 #include"sc_uint.h"
    25 #include"sc_int.h"
     20#include "sc_nbdefs.h"
     21#include "sc_logic.h"
     22#include "sc_unsigned.h"
     23#include "sc_signed.h"
     24#include "sc_uint.h"
     25#include "sc_int.h"
    2626
    2727namespace sc_dt {
  • branches/with_autoconf/src/sc_clock.cc

    r1 r8  
    3535 */
    3636
    37 #include"sc_clock.h"
    38 #include"assert.h"
     37#include "sc_clock.h"
     38#include <cassert>
     39#ifdef HAVE_CONFIG_H
     40#include "config.h"
     41#endif
    3942
    4043using namespace std;
     
    6972{
    7073        init ();
    71   ASSERT(period_     == 1);
    72   ASSERT(duty_cycle_ == 0.5);
    73   ASSERT(start_time_ == SC_ZERO_TIME);
     74  assert(period_     == 1);
     75  assert(duty_cycle_ == 0.5);
     76  assert(start_time_ == SC_ZERO_TIME);
    7477  posedge_first = posedge_first_;
    7578}
     
    8285{
    8386        init ();
    84   ASSERT(period_     == 1);
    85   ASSERT(duty_cycle_ == 0.5);
    86   ASSERT(start_time_ == SC_ZERO_TIME);
     87  assert(period_     == 1);
     88  assert(duty_cycle_ == 0.5);
     89  assert(start_time_ == SC_ZERO_TIME);
    8790  posedge_first = posedge_first_;
    8891}
  • branches/with_autoconf/src/sc_clock.h

    r1 r8  
    1414#define __SC_CLOCK_H__
    1515
    16 #include"sc_clock_ext.h"
     16#include "sc_clock_ext.h"
    1717
    1818
  • branches/with_autoconf/src/sc_event.cc

    r1 r8  
    3535
    3636
    37 #include<iostream>
    38 #include"sc_event.h"
    39 #include"sc_interface.h"
    40 #include"sc_port_ext.h"
     37#include <iostream>
     38#include "sc_event.h"
     39#include "sc_interface.h"
     40#include "sc_port_ext.h"
     41#ifdef HAVE_CONFIG_H
     42#include "config.h"
     43#endif
    4144
    4245using namespace std;
  • branches/with_autoconf/src/sc_event.h

    r1 r8  
    1313#define __SC_EVENT_H__
    1414
    15 #include"sc_fwd.h"
     15#include "sc_fwd.h"
    1616
    1717namespace sc_core {
  • branches/with_autoconf/src/sc_event_finder.cc

    r4 r8  
    3535
    3636
    37 #include"sc_event_finder.h"
     37#include "sc_event_finder.h"
     38#ifdef HAVE_CONFIG_H
     39#include "config.h"
     40#endif
    3841
    3942namespace sc_core {
  • branches/with_autoconf/src/sc_event_finder.h

    r4 r8  
    1313#define __SC_EVENT_FINDER_H__
    1414
    15 #include"sc_fwd.h"
     15#include "sc_fwd.h"
    1616
    1717namespace sc_core {
  • branches/with_autoconf/src/sc_int.h

    r1 r8  
    2828// ----------------------------------------------------------------------------
    2929
    30 #include"sc_nbdefs.h"
     30#include "sc_nbdefs.h"
    3131
    3232namespace sc_dt {
  • branches/with_autoconf/src/sc_interface.cc

    r1 r8  
    3434 */
    3535
    36 #include"sc_interface.h"
    37 #include"sc_event.h"
    38 #include"assert.h"
    39 #include<iostream>
    40 #include<map>
     36#include "sc_interface.h"
     37#include "sc_event.h"
     38#include "assert.h"
     39#include <iostream>
     40#include <map>
     41#ifdef HAVE_CONFIG_H
     42#include "config.h"
     43#endif
    4144
    4245using namespace std;
     
    105108{
    106109        interface2infos_t::iterator i = interface2infos.find (this);
    107 #ifdef DEBUG
     110#ifdef CONFIG_DEBUG
    108111        if (i == interface2infos.end ()) {
    109112                cerr << "Internal error : can't find data size of " << this << "\n";
     
    118121{
    119122        interface2infos_t::iterator i = interface2infos.find (this);
    120 #ifdef DEBUG
     123#ifdef CONFIG_DEBUG
    121124        if (i == interface2infos.end ()) {
    122125                cerr << "Internal error : can't find default event of " << this << "\n";
  • branches/with_autoconf/src/sc_interface.h

    r1 r8  
    1313#define __SC_INTERFACE_H__
    1414
    15 #include"sc_fwd.h"
    16 #include"internal_ext.h"
     15#include "sc_fwd.h"
     16#include "internal_ext.h"
    1717
    1818namespace sc_core {
  • branches/with_autoconf/src/sc_logic.cc

    r1 r8  
    3939// ----------------------------------------------------------------------------
    4040
    41 #include"sc_logic.h"
     41#include "sc_logic.h"
     42#ifdef HAVE_CONFIG_H
     43#include "config.h"
     44#endif
    4245
    4346namespace sc_dt {
  • branches/with_autoconf/src/sc_logic.h

    r1 r8  
    1818// ----------------------------------------------------------------------------
    1919
    20 #include"sc_nbdefs.h"
    21 #include"sc_fwd.h"
     20#include "sc_nbdefs.h"
     21#include "sc_fwd.h"
    2222
    2323namespace sc_dt {
  • branches/with_autoconf/src/sc_lv.h

    r1 r8  
    1818// ----------------------------------------------------------------------------
    1919
    20 #include"sc_nbdefs.h"
    21 #include"sc_logic.h"
    22 #include"sc_unsigned.h"
    23 #include"sc_signed.h"
    24 #include"sc_uint.h"
    25 #include"sc_int.h"
     20#include "sc_nbdefs.h"
     21#include "sc_logic.h"
     22#include "sc_unsigned.h"
     23#include "sc_signed.h"
     24#include "sc_uint.h"
     25#include "sc_int.h"
    2626
    2727
  • branches/with_autoconf/src/sc_main.cc

    r4 r8  
    3535 */
    3636
    37 #include<sstream>
    38 #include<string>
    39 #include<list>
    40 #include<set>
    41 #include"internal.h"
    42 #include"global_functions.h"
    43 #include"sc_ver.h"
    44 #include"sc_module.h"
    45 #include"sc_signal.h" // pending_write_vector
    46 #include"dump_dot.h"
    47 #include"dump_used_options.h"
    48 #include"dump_used_env.h"
    49 #include"assert.h"
     37#include <sstream>
     38#include <string>
     39#include <list>
     40#include <set>
     41#include "internal.h"
     42#include "global_functions.h"
     43#include "sc_ver.h"
     44#include "sc_module.h"
     45#include "sc_signal.h" // pending_write_vector
     46#include "dump_dot.h"
     47#include "dump_used_options.h"
     48#include "dump_used_env.h"
     49#include <cassert>
     50#ifdef HAVE_CONFIG_H
     51#include "config.h"
     52#endif
    5053
    5154//
     
    5962
    6063bool        check_port_dependencies = false;
     64#ifdef CONFIG_DEFAULT_RUNTIME_COMPILATION
     65bool        dynamic_link_of_scheduling_code = true;
     66#else
    6167bool        dynamic_link_of_scheduling_code = false;
     68#endif
    6269bool        dump_netlist_info       = false;
    6370bool        dump_funclist_info      = false;
     
    107114  switch (scheduling_method) {
    108115  case CASS_SCHEDULING :
    109     ASSERT(use_port_dependency == false);
     116    assert(use_port_dependency == false);
    110117    break;
    111118  case BUCHMANN_SCHEDULING :
     
    124131    exit (33);
    125132  }
    126   ASSERT(use_port_dependency || use_sensitivity_list);
     133  assert(use_port_dependency || use_sensitivity_list);
    127134}
    128135
  • branches/with_autoconf/src/sc_module.cc

    r1 r8  
    4949#include "sc_clock.h" // is_clock
    5050#include "entity.h"
    51 #include "assert.h"
     51#include <cassert>
     52#ifdef HAVE_CONFIG_H
     53#include "config.h"
     54#endif
    5255
    5356//
     
    161164  sensitivity_list_t::iterator i;
    162165  for (i = sensitivity_list.begin (); i != sensitivity_list.end (); ++i) {
    163 #if defined(_DEBUG)
     166#if defined(CONFIG_DEBUG) && 0
    164167    if (i->get_interface() == NULL)
    165168    {
     
    239242          sensitive (this)
    240243{
    241   ASSERT(nm != NULL);
     244  assert(nm != NULL);
    242245#if 0
    243246  cerr << "sc_module constructor with const char * parameter\n";
     
    499502  if (m_pushed == false)
    500503    return;
    501   ASSERT(sc_core::module_name_stack.empty () == false);
     504  assert(sc_core::module_name_stack.empty () == false);
    502505  sc_core::module_name_stack.pop_back ();
    503506        modules_stack.pop ();
     
    505508  cout << "~sc_module_name <- " << m_name << endl;
    506509#endif
    507   ASSERT(temp_list.empty () == false);
     510  assert(temp_list.empty () == false);
    508511  sc_module *last1 = temp_list.back();
    509512  temp_list.pop_back();
     
    527530  if (m.dont_initialize == false)
    528531  {
    529     ASSERT(m.module != NULL);
    530 #if DEBUG
     532    assert(m.module != NULL);
     533#ifdef CONFIG_DEBUG
    531534    std::cerr << "Warning : SystemCASS doesn't perform SC_METHOD(S) initializations.\n"
    532535              << "Please turn off automatic initialization for '" << m.name
  • branches/with_autoconf/src/sc_module.h

    r1 r8  
    1616#include "sc_module_ext.h"
    1717
    18 #include<list>
    19 #include<set>
    20 #include<stack>
    21 #include"sc_fwd.h"
    22 #include"internal.h"
    23 #include"sc_object.h"
    24 #include"sc_sensitive.h"
     18#include <list>
     19#include <set>
     20#include <stack>
     21#include "sc_fwd.h"
     22#include "internal.h"
     23#include "sc_object.h"
     24#include "sc_sensitive.h"
    2525
    2626namespace sc_core {
  • branches/with_autoconf/src/sc_module_ext.h

    r1 r8  
    3838#define __SC_MODULE_EXT_H__
    3939
    40 #include"sc_fwd.h"
    41 #include"internal_ext.h"
    42 #include"sc_object.h"
    43 #include"sc_sensitive.h"
    44 #include"serialization_ext.h"
     40#include "sc_fwd.h"
     41#include "internal_ext.h"
     42#include "sc_object.h"
     43#include "sc_sensitive.h"
     44#include "serialization_ext.h"
    4545
    4646namespace sc_core {
  • branches/with_autoconf/src/sc_module_name.h

    r1 r8  
    1414#define __SC_MODULE_NAME_H__
    1515
    16 #include"sc_fwd.h"
     16#include "sc_fwd.h"
    1717
    1818namespace sc_core {
  • branches/with_autoconf/src/sc_numrep.cc

    r1 r8  
    3636#include <string>
    3737#include "sc_numrep.h"
     38#ifdef HAVE_CONFIG_H
     39#include "config.h"
     40#endif
    3841
    3942namespace sc_dt {
  • branches/with_autoconf/src/sc_object.cc

    r1 r8  
    3939#include <map>
    4040
    41 #include "assert.h"
     41#include <cassert>
    4242#include "sc_object.h"
    4343//#include "sc_port.h"
     
    4545#include "sc_signal.h"
    4646#include "module_hierarchy.h"
     47#ifdef HAVE_CONFIG_H
     48#include "config.h"
     49#endif
    4750
    4851using namespace std;
     
    7073//    out += ".";
    7174  }
    72 //  ASSERT(name != NULL);
     75//  assert(name != NULL);
    7376  if (name)
    7477    out += name;
     
    202205{
    203206        object2name_t::iterator i = object2fullname.find (this);
    204 #ifdef DEBUG
     207#ifdef CONFIG_DEBUG
    205208        if (i == object2fullname.end ()) {
    206209                cerr << "Internal error : can't find name of " << this << "\n";
     
    216219/*
    217220        object2name_t::iterator i = object2fullname.find (this);
    218 #ifdef DEBUG
     221#ifdef CONFIG_DEBUG
    219222        if (i == object2fullname.end ()) {
    220223                cerr << "Internal error : can't find name of " << this << "\n";
     
    234237    string     out;
    235238    sc_object* obj = *it;
    236     ASSERT(obj != NULL);
     239    assert(obj != NULL);
    237240    build_full_name (out, *obj);
    238241  }
     
    242245{
    243246        object2infos_t::iterator i = object2infos.find (this);
    244 #ifdef DEBUG
     247#ifdef CONFIG_DEBUG
    245248        if (i == object2infos.end ()) {
    246249                cerr << "Internal error : can't find kind of " << this << "\n";
  • branches/with_autoconf/src/sc_pat_trace.cc

    r1 r8  
    3636
    3737
    38 #include"sc_trace.h"
    39 #include"sc_pat_trace.h"
    40 #include"sc_ver.h"
    41 #include"internal.h" // notrace
     38#include "sc_trace.h"
     39#include "sc_pat_trace.h"
     40#include "sc_ver.h"
     41#include "internal.h" // notrace
    4242
    43 #include<time.h>
    44 #include<string>
     43#include <time.h>
     44#include <string>
     45#ifdef HAVE_CONFIG_H
     46#include "config.h"
     47#endif
    4548
    46 #ifdef PAT_TRACE_FORMAT
     49#ifdef CONFIG_PAT_TRACE_FORMAT
    4750
    4851//-----------------------------------------
  • branches/with_autoconf/src/sc_port.cc

    r4 r8  
    3636
    3737
    38 #include<iomanip>
    39 #include<list>
    40 #include<map>
    41 #include<vector>
    42 
    43 #include"sc_port.h"
    44 #include"sc_signal.h"
    45 #include"sc_module.h"
    46 #include"entity.h"
    47 #include"global_functions.h"
    48 #include"assert.h"
     38#include <iomanip>
     39#include <list>
     40#include <map>
     41#include <vector>
     42
     43#include "sc_port.h"
     44#include "sc_signal.h"
     45#include "sc_module.h"
     46#include "entity.h"
     47#include "global_functions.h"
     48#include <cassert>
     49#ifdef HAVE_CONFIG_H
     50#include "config.h"
     51#endif
    4952
    5053extern "C" {
     
    5659using namespace std;
    5760
    58 #ifdef CHECK_FSM_RULES
    59 #include"fsm_rules.h"
     61#ifdef CONFIG_CHECK_FSM_RULES
     62#include "fsm_rules.h"
    6063namespace sc_core {
    6164casc_fsm_step_t casc_fsm_step = ELABORATION;
     
    110113sc_port_base::init ()
    111114{
    112 #ifdef DEBUG
     115#ifdef CONFIG_DEBUG
    113116        if (modules_stack.empty ()) {
    114117                cerr << "Internal error : modules stack empty\n";
     
    235238#endif
    236239#define iter (sc_core::pending_write_vector[i])
    237 #ifdef DEBUG
     240#ifdef CONFIG_DEBUG
    238241                if (iter.pointer == NULL) {
    239242                        cerr << "Internal error : trying to apply a posted write from an unassigned signal/port\n";
     
    257260  cerr << "done.\n";
    258261#endif
    259 #if defined(CHECK_MULTIWRITING2REGISTER)
     262#if defined(CONFIG_CHECK_MULTIWRITING2REGISTER)
    260263  sc_core::pending_writing2register_clear ();
    261264#endif
     
    312315{
    313316  const tab_t *pointer = port.get_pointer ();
    314   //ASSERT(pointer != NULL);
     317  //assert(pointer != NULL);
    315318  if (pointer == NULL)
    316319    return false; // case : sc_in not bound
     
    345348  {
    346349    /*const*/ sc_port_base *port = i->first;
    347     ASSERT(port != NULL);
     350    assert(port != NULL);
    348351    check_port (*port);
    349352  }
     
    352355}
    353356
    354 #if defined(CHECK_MULTIWRITING2REGISTER)
     357#if defined(CONFIG_CHECK_MULTIWRITING2REGISTER)
    355358typedef set<const tab_t*> pending_writing2register_set_t;
    356359pending_writing2register_set_t pending_writing2register_set;
  • branches/with_autoconf/src/sc_port.h

    r1 r8  
    1414#define __SC_PORT_H__
    1515
    16 #include"sc_port_ext.h"
    17 #include"sc_fwd.h"
    18 //#include"internal_ext.h"
     16#include "sc_port_ext.h"
     17#include "sc_fwd.h"
     18//#include "internal_ext.h"
    1919
    2020#include <list>
  • branches/with_autoconf/src/sc_port_ext.h

    r4 r8  
    1515
    1616// Define registers writing method
    17 #include<iostream>
    18 #include"sc_fwd.h"
    19 #include"sc_nbdefs.h"
    20 //#include"sc_event_finder.h"
    21 #include"sc_event.h"
    22 #include"sc_object.h"
    23 #include"sc_interface.h"
    24 #include"internal_ext.h"
    25 #include"port_dependency_ext.h"
    26 #include"fsm_rules.h"
     17#include <iostream>
     18#include "sc_fwd.h"
     19#include "sc_nbdefs.h"
     20//#include "sc_event_finder.h"
     21#include "sc_event.h"
     22#include "sc_object.h"
     23#include "sc_interface.h"
     24#include "internal_ext.h"
     25#include "port_dependency_ext.h"
     26#include "fsm_rules.h"
    2727
    2828
     
    5353        ///////////////////// DEPRECATED
    5454// C ANSI-only since it is needed to link with extern "C"
    55 // this declaration is not in casc.h since the CHECK_FSM_RULES macro
     55// this declaration is not in casc.h since the CONFIG_CHECK_FSM_RULES macro
    5656// is not defined.
    5757
     
    183183                << " on signal " << name () << "\n";
    184184#endif
    185 #ifdef CHECK_FSM_RULES
     185#ifdef CONFIG_CHECK_FSM_RULES
    186186        if (casc_fsm_step == GEN_MOORE) {
    187187                std::cerr << "FSM rules error : trying to read on input port '"
     
    293293                << " on signal " << name () << "\n";
    294294#endif
    295 #ifdef CHECK_FSM_RULES
     295#ifdef CONFIG_CHECK_FSM_RULES
    296296        if (casc_fsm_step == GEN_MOORE) {
    297297                std::cerr << "FSM rules error : trying to read on input/output port "
     
    315315            << " on in/out port (writing into a signal) '" << name () << "'\n";
    316316#endif
    317 #ifdef CHECK_FSM_RULES
     317#ifdef CONFIG_CHECK_FSM_RULES
    318318        if ((casc_fsm_step != GEN_MOORE) && ( casc_fsm_step != GEN_MEALY)) {
    319319                std::cerr << "FSM rules error : trying to write on output port "
     
    324324#endif
    325325//      T& ref = *(T*)(get_pointer());
    326 #if defined(CHECK_MULTIWRITING2PORT)
     326#if defined(CONFIG_CHECK_MULTIWRITING2PORT)
    327327  check_multiwriting2port ();
    328328#endif
  • branches/with_autoconf/src/sc_sensitive.cc

    r1 r8  
    3535
    3636
    37 #include"sc_sensitive.h"
    38 #include"sc_port.h"
    39 #include"sc_event.h"
    40 #include"sc_event_finder.h"
    41 #include"sc_module.h"
    42 #include"internal.h"
     37#include "sc_sensitive.h"
     38#include "sc_port.h"
     39#include "sc_event.h"
     40#include "sc_event_finder.h"
     41#include "sc_module.h"
     42#include "internal.h"
     43#ifdef HAVE_CONFIG_H
     44#include "config.h"
     45#endif
    4346
    4447using namespace std;
  • branches/with_autoconf/src/sc_sensitive.h

    r1 r8  
    1313#define __SC_SENSITIVE_H__
    1414
    15 #include<list>
    16 #include"sc_fwd.h"
    17 //#include"sc_event.h"
    18 //#include"sc_interface.h"
    19 //#include"internal_ext.h"
     15#include <list>
     16#include "sc_fwd.h"
     17//#include "sc_event.h"
     18//#include "sc_interface.h"
     19//#include "internal_ext.h"
    2020
    2121namespace sc_core {
  • branches/with_autoconf/src/sc_signal.h

    r1 r8  
    1515
    1616// Define registers writing method
    17 #include<iostream>
    18 #include"sc_fwd.h"
    19 #include"sc_nbdefs.h"
    20 //#include"sc_event_finder.h"
    21 //#include"sc_event.h"
    22 #include"sc_time.h" // SC_ZERO_TIME
    23 #include"sc_object.h"
    24 #include"sc_interface.h"
    25 #include"internal_ext.h"
     17#include <iostream>
     18#include "sc_fwd.h"
     19#include "sc_nbdefs.h"
     20//#include "sc_event_finder.h"
     21//#include "sc_event.h"
     22#include "sc_time.h" // SC_ZERO_TIME
     23#include "sc_object.h"
     24#include "sc_interface.h"
     25#include "internal_ext.h"
     26
     27#ifdef CONFIG_CHECK_FSM_RULES
    2628#include "fsm_rules.h"
     29#endif
    2730
    2831namespace sc_core {
     
    4144        ///////////////////// DEPRECATED
    4245// C ANSI-only since it is needed to link with extern "C"
    43 // this declaration is not in casc.h since the CHECK_FSM_RULES macro
     46// this declaration is not in casc.h since the CONFIG_CHECK_FSM_RULES macro
    4447// is not defined.
    4548
     
    97100                post_multiwrite (pointer_,value_);
    98101        } else {
    99 #if defined(DEBUG)
     102#if defined(CONFIG_DEBUG)
    100103        if (pending_write_vector_nb >= pending_write_vector_capacity) {
    101104        //if (pending_write_vector_nb >= pending_write_vector_capacity * sizeof(pending_write)) {
     
    105108                exit (-1);
    106109        }
    107 #endif // DEBUG
     110#endif // CONFIG_DEBUG
    108111  pending_write_vector[pending_write_vector_nb].pointer = pointer_;
    109112//      pending_write_vector[pending_write_vector_nb++].value = *(reinterpret_cast<const base_type*const>(&value_)); => bug !
     
    244247                << " on signal " << name () << "\n";
    245248#endif
    246 #ifdef CHECK_FSM_RULES
     249#ifdef CONFIG_CHECK_FSM_RULES
    247250        // we can read value from sc_signal type (used like a register) at any time
    248251#endif 
     
    256259sc_signal<T>::write( const data_type& value_ )
    257260{
    258 #ifdef CHECK_FSM_RULES
     261#ifdef CONFIG_CHECK_FSM_RULES
    259262        if ((casc_fsm_step != TRANSITION)
    260263                        && ( casc_fsm_step != STIMULI)) {
     
    265268        }               
    266269#endif
    267 #ifdef DEBUG
     270#ifdef CONFIG_DEBUG
    268271  if (get_pointer() == NULL)
    269272  {
     
    272275  }
    273276#endif
    274 #ifdef CHECK_MULTIWRITING2REGISTER
     277#ifdef CONFIG_CHECK_MULTIWRITING2REGISTER
    275278  pending_writing2register_record_and_check (get_pointer ());
    276279#endif
  • branches/with_autoconf/src/sc_time.cc

    r4 r8  
    3535
    3636
    37 #include"sc_time.h"
     37#include "sc_time.h"
    3838#include <time.h>
    3939#include <sys/time.h>
    4040#include <string>
    4141#include <sstream>
     42#ifdef HAVE_CONFIG_H
     43#include "config.h"
     44#endif
    4245
    4346namespace sc_core {
  • branches/with_autoconf/src/sc_trace.cc

    r1 r8  
    4141#include "bit2string.h"
    4242#include "hex2string.h"
    43 #include "assert.h"
     43#include <cassert>
    4444
    4545#include <list>
    4646#include <stdio.h>
    4747#include <iostream>
     48#ifdef HAVE_CONFIG_H
     49#include "config.h"
     50#endif
    4851
    4952//-----------------------------------------
     
    5255
    5356//-----------------------------------------
    54 #ifdef PAT_TRACE_FORMAT
     57#ifdef CONFIG_PAT_TRACE_FORMAT
    5558
    5659extern "C" {
     
    6265#include <stdio.h>
    6366
    64 #endif // PAT_TRACE_FORMAT
     67#endif // CONFIG_PAT_TRACE_FORMAT
    6568//-----------------------------------------
    6669
     
    164167    {
    165168      sc_trace_file *tf = *ptf;
    166       ASSERT(tf != NULL);
     169      assert(tf != NULL);
    167170                trace (*tf, part);
    168171    }
     
    172175}
    173176
    174 #if PAT_TRACE_FORMAT
     177#ifdef CONFIG_PAT_TRACE_FORMAT
    175178static void
    176179pat_set_value (char *buf, const signal2trace &s)
     
    282285{
    283286}
    284 #endif // PAT_TRACE_FORMAT
     287#endif // CONFIG_PAT_TRACE_FORMAT
    285288
    286289static
     
    413416  else
    414417    vcd_signal_table = (tab_t*) malloc (sizeof (tab_t) * size);
    415 #if DEBUG
     418#ifdef CONFIG_DEBUG
    416419  if (vcd_signal_table == NULL)
    417420  {
     
    485488      vcd_trace_init (tf);
    486489  } else {
    487 #if defined(DEBUG)
     490#if defined(CONFIG_DEBUG)
    488491      if (vcd_signal_table == NULL)
    489492      {
     
    579582&name)
    580583{
    581 #ifdef PAT_TRACE_FORMAT
     584#ifdef CONFIG_PAT_TRACE_FORMAT
    582585        //exemple:
    583586        //DECLAR ("a", ":2", "X", IN, "3  downto 0", "" );
     
    629632#endif
    630633        DECLAR ((char*)(name.c_str ()), ":1", format, dir,(char *) downto.c_str(), "" );
    631 #endif // PAT_TRACE_FORMAT
     634#endif // CONFIG_PAT_TRACE_FORMAT
    632635}
    633636
  • branches/with_autoconf/src/sc_uint.h

    r1 r8  
    2424// ----------------------------------------------------------------------------
    2525
    26 #include"sc_nbdefs.h"
     26#include "sc_nbdefs.h"
    2727
    2828namespace sc_dt {
  • branches/with_autoconf/src/sc_uint_subref_r.cc

    r1 r8  
    3636#include <iostream>
    3737#include "sc_uint.h"
     38#ifdef HAVE_CONFIG_H
     39#include "config.h"
     40#endif
    3841
    3942using namespace std;
  • branches/with_autoconf/src/sc_unsigned.h

    r1 r8  
    1818// ----------------------------------------------------------------------------
    1919
    20 #include"sc_nbdefs.h"
    21 #include"sc_logic.h"
     20#include "sc_nbdefs.h"
     21#include "sc_logic.h"
    2222
    2323
  • branches/with_autoconf/src/sc_vcd_trace.cc

    r1 r8  
    3636
    3737
    38 #include"sc_trace.h"
    39 #include"sc_vcd_trace.h"
    40 #include"sc_ver.h"
    41 #include"internal.h"
    42 #include"assert.h"
     38#include "sc_trace.h"
     39#include "sc_vcd_trace.h"
     40#include "sc_ver.h"
     41#include "internal.h"
     42#include <cassert>
    4343
    44 #include<time.h>
    45 #include<string>
     44#include <time.h>
     45#include <string>
     46#ifdef HAVE_CONFIG_H
     47#include "config.h"
     48#endif
    4649
    4750//-----------------------------------------*/
     
    5861  if (notrace)
    5962    return NULL;
    60   ASSERT(name != NULL);
     63  assert(name != NULL);
    6164        string filename;
    6265        filename = name;
  • branches/with_autoconf/src/sc_ver.cc

    r1 r8  
    3838#include <string>
    3939#include <iostream>
     40#ifdef HAVE_CONFIG_H
     41#include "config.h"
     42#endif
    4043
    4144namespace sc_core {
     
    6063        "\n"
    6164        "         Cycle Accurate System Simulator\n"
    62 #ifdef DEBUG
     65#ifdef CONFIG_DEBUG
    6366  "            DEBUG version\n"
    6467#endif
  • 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  }
  • branches/with_autoconf/src/schedulers.h

    r1 r8  
    1313#define __SCHEDULERS_H__
    1414
    15 #include"sc_fwd.h"
    16 #include"sc_time.h"
     15#include "sc_fwd.h"
     16#include "sc_time.h"
    1717
    1818namespace sc_core {
  • branches/with_autoconf/src/serialization.cc

    r1 r8  
    3535
    3636
    37 #include<vector>
    38 #include<map>
    39 #include<fstream> // save_module_hierarchy
    40 #include"internal_ext.h" // tab_t
    41 #include"serialization.h"
    42 #include"entity.h"
    43 #include"sc_module.h"
    44 #include"sc_object.h"
    45 #include"hex2string.h"
    46 #include"assert.h"
     37#include <vector>
     38#include <map>
     39#include <fstream> // save_module_hierarchy
     40#include "internal_ext.h" // tab_t
     41#include "serialization.h"
     42#include "entity.h"
     43#include "sc_module.h"
     44#include "sc_object.h"
     45#include "hex2string.h"
     46#include <cassert>
     47#ifdef HAVE_CONFIG_H
     48#include "config.h"
     49#endif
    4750
    4851using namespace std;
     
    8386            int          bit_number)
    8487{
    85   ASSERT(bit_number <= 64);
     88  assert(bit_number <= 64);
    8689  if (bit_number == 1) {
    8790    bool v = *((const bool*) val);
     
    139142                    save_fct_t1      fct)
    140143{
    141   //ASSERT(fct != NULL);
     144  //assert(fct != NULL);
    142145  //sc_module2save_fct_t1::value_type pair(&mod,fct);
    143146  //save_handler_table.insert (pair);
     
    157160    const sc_module *mod = it->first;
    158161    save_fct_t1      fct = it->second;
    159     ASSERT(mod != NULL);
    160 //    ASSERT(fct != NULL);
     162    assert(mod != NULL);
     163//    assert(fct != NULL);
    161164    //o << mod->name () << endl;
    162165    fprintf (o,"module\n%s\n",mod->name ());
     
    184187  file.close ();
    185188  FILE *f = fopen (filename, "a+");
    186   ASSERT(f != NULL);
     189  assert(f != NULL);
    187190  save_modules (f);
    188191  fclose (f);
  • branches/with_autoconf/src/serialization.h

    r1 r8  
    1313#define __SERIALIZATION_H__
    1414
    15 #include"serialization_ext.h"
    16 #include"sc_fwd.h"
     15#include "serialization_ext.h"
     16#include "sc_fwd.h"
    1717
    1818namespace sc_core {
  • branches/with_autoconf/src/serialization_ext.h

    r1 r8  
    3737#define __SERIALIZATION_EXT_H__
    3838
    39 #include<iostream>
    40 #include"sc_fwd.h"
     39#include <iostream>
     40#include "sc_fwd.h"
    4141
    4242namespace sc_core {
  • branches/with_autoconf/src/signal_dependency.cc

    r1 r8  
    4343#include "sc_module.h"
    4444#include "sc_ver_ext.h"
     45#ifdef HAVE_CONFIG_H
     46#include "config.h"
     47#endif
    4548
    4649using namespace std;
  • branches/with_autoconf/src/simplify_string.cc

    r1 r8  
    3535
    3636#include "simplify_string.h"
     37#ifdef HAVE_CONFIG_H
     38#include "config.h"
     39#endif
    3740
    3841using namespace std;
  • branches/with_autoconf/src/systemc

    r4 r8  
    2929#include"sc_vcd_trace.h"
    3030#include"sc_pat_trace.h"
    31 #include"endianness.h"
    3231
    3332#endif
Note: See TracChangeset for help on using the changeset viewer.