Changeset 27 for sources/src


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
Location:
sources/src
Files:
7 deleted
69 edited
1 copied

Legend:

Unmodified
Added
Removed
  • sources/src/alias.cc

    r12 r27  
    3333 */
    3434
    35 #include"alias.h"
    36 #include<iostream>
     35#include "alias.h"
     36#include <iostream>
     37#ifdef HAVE_CONFIG_H
     38#include "config.h"
     39#endif
    3740
    3841const char * alias ()
  • sources/src/bit2string.cc

    r12 r27  
    4141#include <cstdlib>
    4242#include <iostream>
     43#ifdef HAVE_CONFIG_H
     44#include "config.h"
     45#endif
    4346       
    4447using namespace std;
  • sources/src/casc.h

    r4 r27  
    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
  • sources/src/data_field.h

    r1 r27  
    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
  • sources/src/dump_dot.cc

    r4 r27  
    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;
  • sources/src/dump_used_env.cc

    r17 r27  
    3636#include <cstdlib>
    3737#include "dump_used_env.h"
     38#ifdef HAVE_CONFIG_H
     39#include "config.h"
     40#endif
    3841
    3942std::string
  • sources/src/dump_used_options.cc

    r1 r27  
    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             
  • sources/src/entity.cc

    r17 r27  
    3535 */
    3636
    37 #include<cstring>
    38 #include<iomanip>
    39 #include<list>
    40 #include<map>
    41 #include<vector>
    42 
    43 #include"assert.h"
    44 #include"entity.h"
    45 #include"sc_port.h"
    46 #include"sc_signal.h"
    47 #include"sc_module.h"
     37#include <cstring>
     38#include <iomanip>
     39#include <list>
     40#include <map>
     41#include <vector>
     42
     43#include <cassert>
     44#include "entity.h"
     45#include "sc_port.h"
     46#include "sc_signal.h"
     47#include "sc_module.h"
     48#ifdef HAVE_CONFIG_H
     49#include "config.h"
     50#endif
    4851
    4952using namespace std;
     
    175178    typedef std::map<const tab_t *,equi_list_t::iterator,predic4tab_t2equi_t_t> tab_t2equi_it_t;
    176179    static tab_t2equi_it_t tab2equi_map;
    177     ASSERT(pointer != NULL);
     180    assert(pointer != NULL);
    178181
    179182    // boost
     
    240243        {
    241244                equi_t::const_iterator top_iter = e.begin ();
    242 #ifdef DEBUG
     245#ifdef CONFIG_DEBUG
    243246                if (top_iter == e.end ()) {
    244247                        cerr << "Internal error : no signal in " << e << endl;
     
    357360        }
    358361       
    359 #if defined(DUMP_SIGNALS_STATS)
     362#if defined(DUMP_SIGNAL_STATS)
    360363        static unsigned int equi_real_size;
    361364#endif
     
    389392    unsigned int table_size = get_sizeof_signals_table ();
    390393                equi_table = new tab_t[table_size]; //(0xCD);
    391 #if defined(DUMP_SIGNALS_STATS)
     394#if defined(DUMP_SIGNAL_STATS)
    392395                equi_real_size = table_size;
    393396#endif
     
    403406  bind_equi_to_table (equi_t &e, tab_t * const pointer)
    404407  {
    405     ASSERT(pointer != NULL);
     408    assert(pointer != NULL);
    406409    equi_t::iterator i;
    407410    for (i = e.begin (); i != e.end (); ++i) {
     
    455458    o << ")";
    456459#else
    457    ASSERT(e.object != NULL);
     460   assert(e.object != NULL);
    458461   o << e.object->name ();
    459462#endif
     
    494497  print_table_stats (ostream &o)
    495498  {
    496 #if defined(DUMP_SIGNALS_STATS)
     499#if defined(DUMP_SIGNAL_STATS)
    497500                int nb_reg = 0;
    498501                int nb_sig = 0;
     
    537540        }
    538541        const entity &ent = *(eq.begin ());
    539 #ifdef DEBUG
     542#ifdef CONFIG_DEBUG
    540543        if (ent.type != sc_core::entity::SIGNAL)
    541544                exit(28);
     
    544547        const char *sig_name = ent.object->name ();
    545548        const char *sep  = strchr (sig_name,'.');
    546 #ifdef DEBUG
     549#ifdef CONFIG_DEBUG
    547550        if (sep == NULL) {
    548551                exit (30);
     
    595598#endif
    596599
    597 #if defined(DUMP_SIGNALS_STATS)
     600#if defined(DUMP_SIGNAL_STATS)
    598601static unsigned int equi_real_size;
    599602#endif
     
    603606{
    604607#if 0
    605 //defined(DEBUG)
     608//defined(CONFIG_DEBUG)
    606609  equi_list_t::iterator x_equi = get_equi (x);
    607610  if ((x_equi != equi_list.end())) {
     
    640643tbind (sc_port_base &x,T &y)
    641644{
    642 //  ASSERT(x.get_pointer () != NULL); // x pointer may be NULL
    643 //  ASSERT(y.get_pointer () != NULL); // y pointer may be NULL
     645//  assert(x.get_pointer () != NULL); // x pointer may be NULL
     646//  assert(y.get_pointer () != NULL); // y pointer may be NULL
    644647  equi_list_t::iterator x_equi = get_equi (x);
    645648  equi_list_t::iterator y_equi = get_equi (y);
  • sources/src/entity.h

    r1 r27  
    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 {
  • sources/src/fsm_rules.h

    r1 r27  
    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 {
  • sources/src/gen_code.cc

    r17 r27  
    3434 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    3535 */
    36 #ifndef _WIN32
     36#if defined(__linux__)
    3737#include <linux/limits.h>
    38 #else
     38#elif defined(WIN32)
    3939#include <windows.h>
    4040#endif
     
    4545#include<fstream>
    4646
    47 #include"internal.h"
    48 #include"gen_code.h"
    49 #include"sc_module.h"
    50 #include"sc_ver.h"
    51 #include"process_dependency.h"
    52 
    53 #ifdef CHECK_FSM_RULES
    54 #define fsm_check_flag "-DCHECK_FSM_RULES"
     47#include "internal.h"
     48#include "gen_code.h"
     49#include "sc_module.h"
     50#include "sc_ver.h"
     51#include "process_dependency.h"
     52#ifdef HAVE_CONFIG_H
     53#include "config.h"
     54#endif
     55
     56#ifdef CONFIG_CHECK_FSM_RULES
     57#include "fsm_rules.h"
     58#define fsm_check_flag "-DCONFIG_CHECK_FSM_RULES"
    5559#else
    5660#define fsm_check_flag
    5761#endif
    5862
    59 #define casc_cflags CFLAGS " " fsm_check_flag
    60 
    61 #if defined(darwin)
    62 #define macosx
    63 #endif
     63#define casc_cflags GENERATED_MODULE_CFLAGS " " fsm_check_flag
     64
     65// Enable CPP call, this is useful for typeinfo-enabled classes
     66#define CPP_CALL
    6467
    6568using namespace std;
     
    9194                << m.module->name() << "->" << m.name << "()\\n\");\n";
    9295  o << " p.integer = " << func << ";\n";
    93 #if CPP_CALL
     96#ifdef CPP_CALL
    9497  o << " (((sc_module*)(" << m.module << "))->*(p.pmf)) (); /* "
    9598                << m.module->name () << "->" << m.name << "() */\n";
     
    143146  }
    144147
    145 #ifdef DEBUG
     148#ifdef CONFIG_DEBUG
    146149  cerr << "opened temporary filename : " << temp << "\n";
    147150#endif
     
    268271
    269272  o << "// generated by " << sc_version () << endl
    270                 << "#include<casc.h>\n\n"
    271                 << "#include<cstdio>\n\n"
    272 //              << "#include<iostream>\n\n"
     273                << "#include <casc.h>\n\n"
     274                << "#include <cstdio>\n\n"
     275//              << "#include <iostream>\n\n"
    273276                << "namespace sc_core {\n"
    274277    << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n"
     
    329332
    330333  o << "// generated by " << sc_version () << endl
    331                 << "#include<casc.h>\n\n"
    332                 << "#include<cstdio>\n\n"
    333 //              << "#include<iostream>\n\n"
     334                << "#include <casc.h>\n\n"
     335                << "#include <cstdio>\n\n"
     336//              << "#include <iostream>\n\n"
    334337                << "namespace sc_core {\n"
    335338    << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n"
     
    377380//  const char *target_arch = getenv ("TARGET_ARCH");
    378381        const char *default_compiler =
    379 #if CPP_CALL
     382#ifdef CPP_CALL
    380383                "g++";
    381384#else
     
    418421  /* COMPILE */
    419422  /* ******* */
    420 #if defined(macosx)
    421     sprintf(compil_str,
    422                                 "(cd %s ; %s %s -DSCHEDULING_BY_CASC -I%s/include -fno-common -dynamic -o %s -c %s)",
    423         temporary_dir,
    424                                 compiler,
    425                                 casc_cflags,
    426                                 systemc_dir,
    427                                 target_name,
    428                                 source_name);
    429 //    sprintf(compil_str,"");
    430 #elif defined(linux)
    431     sprintf(compil_str,
    432                                 "(cd %s ; libtool --mode=compile %s %s -DSCHEDULING_BY_CASC -I%s/include -shared -o %s -c %s)",
    433         temporary_dir,
    434                                 compiler,
    435                                 casc_cflags,
    436                                 systemc_dir,
    437                                 target_name,
    438                                 source_name);
     423  const char *commandline_template =
     424#if defined(CONFIG_OS_DARWIN)
     425          "(cd %s ;"                     " %s %s -DSCHEDULING_BY_CASC -I%s/include -fno-common -dynamic -o %s -c %s)"
     426#elif defined(CONFIG_OS_LINUX)
     427          "(cd %s ; libtool --mode=compile %s %s -DSCHEDULING_BY_CASC -I%s/include -shared -o %s -c %s)"
    439428#else
    440     sprintf(compil_str,
    441                                 "(cd %s ; %s %s -DSCHEDULING_BY_CASC -I%s/include -dynamiclib -o %s -c %s)",
    442         temporary_dir,
    443                                 compiler,
    444                                 casc_cflags,
    445                                 systemc_dir,
    446                                 target_name,
    447                                 source_name);
    448 #endif
     429          "(cd %s ;"                     " %s %s -DSCHEDULING_BY_CASC -I%s/include -dynamiclib -o %s -c %s)"
     430#endif
     431          ;
     432  sprintf(compil_str,
     433                  commandline_template,
     434                  temporary_dir,
     435                  compiler,
     436                  casc_cflags,
     437                  systemc_dir,
     438                  target_name,
     439                  source_name);
    449440
    450441  if (dump_stage)
     
    461452  sprintf (target_name, "%s.so", base_name);
    462453
    463 #if defined(linux)
     454#ifdef CONFIG_OS_LINUX
    464455  sprintf (source_name, "%s.lo", base_name);
    465456  sprintf(compil_str, "(cd %s ; pwd ; libtool --mode=link %s %s -shared -rdynamic -o %s %s)", /* -L. -L%s/lib-%s */
     
    560551  for (i = 0; i < n; ++i)
    561552  {
    562 #if 0 //defined(DEBUG)
     553#if 0 //defined(CONFIG_DEBUG)
    563554    sc_module *m = (sc_module*)(fc.instance[i]);
    564555    cerr << m->name () << endl;
     
    575566void static_simulate_1_cycle (void)
    576567{
    577 #ifdef CHECK_FSM_RULES
     568#ifdef CONFIG_CHECK_FSM_RULES
    578569        casc_fsm_step = TRANSITION;
    579570#endif
    580571  call_functions (pf[0]); // transition
    581572  update     ();
    582 #ifdef CHECK_FSM_RULES
     573#ifdef CONFIG_CHECK_FSM_RULES
    583574        casc_fsm_step = GEN_MOORE;
    584575#endif
    585576  call_functions (pf[1]); // moore generation
    586 #ifdef CHECK_FSM_RULES
     577#ifdef CONFIG_CHECK_FSM_RULES
    587578        casc_fsm_step = GEN_MEALY;
    588579#endif
    589580  call_functions (pf[2]); // mealy generation
    590 #ifdef CHECK_FSM_RULES
     581#ifdef CONFIG_CHECK_FSM_RULES
    591582        casc_fsm_step = STIMULI;
    592583#endif
     
    634625void quasistatic_simulate_1_cycle (void)
    635626{
    636 #ifdef CHECK_FSM_RULES
     627#ifdef CONFIG_CHECK_FSM_RULES
    637628        casc_fsm_step = TRANSITION;
    638629#endif
     
    644635  }
    645636  update     ();
    646 #ifdef CHECK_FSM_RULES
     637#ifdef CONFIG_CHECK_FSM_RULES
    647638        casc_fsm_step = GEN_MOORE;
    648639#endif
     
    652643    Call (m);
    653644  }
    654 #ifdef CHECK_FSM_RULES
     645#ifdef CONFIG_CHECK_FSM_RULES
    655646        casc_fsm_step = GEN_MEALY;
    656647#endif
    657648  quasistatic_mealy_generation ();
    658 #ifdef CHECK_FSM_RULES
     649#ifdef CONFIG_CHECK_FSM_RULES
    659650        casc_fsm_step = STIMULI;
    660651#endif
  • sources/src/gen_code.h

    r1 r27  
    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
  • sources/src/global_functions.cc

    r4 r27  
    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
  • sources/src/global_functions.h

    r4 r27  
    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 **);
  • sources/src/graph.cc

    r17 r27  
    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);
  • sources/src/graph_cass.cc

    r17 r27  
    130130#include "simplify_string.h" // simplify_string
    131131#include "sc_ver_ext.h"      // sc_version for dumping to DOT
     132#ifdef HAVE_CONFIG_H
     133#include "config.h"
     134#endif
    132135
    133136using namespace std;
  • sources/src/graph_signals.cc

    r12 r27  
    138138#include "sc_module.h"
    139139#include "sc_port.h"
     140#ifdef HAVE_CONFIG_H
     141#include "config.h"
     142#endif
    140143
    141144using namespace std;
  • sources/src/hex2string.cc

    r12 r27  
    4141#include <cstdlib>
    4242#include <iostream>
     43#ifdef HAVE_CONFIG_H
     44#include "config.h"
     45#endif
    4346       
    4447using namespace std;
  • sources/src/methodprocess_dependency.cc

    r1 r27  
    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)
  • sources/src/module_hierarchy.cc

    r17 r27  
    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#include <cstdlib>
    4144#include <cstring>
     
    7376      return; //obj_list = &top_level_objects;
    7477    else {
    75       ASSERT(parent != &obj);
     78      assert(parent != &obj);
    7679      const sc_object *pobj      = (const sc_module *) parent;
    7780      obj_list = &(object2childs[pobj]);
  • sources/src/module_hierarchy2dot.cc

    r1 r27  
    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) {
  • sources/src/mouchard_scheduling.cc

    r1 r27  
    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;
  • sources/src/port_dependency.cc

    r17 r27  
    4545#include "sc_port.h"
    4646#include "sc_ver_ext.h"
     47#ifdef HAVE_CONFIG_H
     48#include "config.h"
     49#endif
    4750
    4851using namespace std;
     
    108111        p.destination = &b;
    109112        aPortDependencyGraph.push_back (p);
    110 #if DUMP_PORT_DEPENDENCY
     113#ifdef DUMP_PORT_DEPENDENCY
    111114        if (a) {
    112115                cerr << "'" << ((sc_object&)b).name()
  • sources/src/process_dependency.cc

    r1 r27  
    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;
  • sources/src/sc_bigint.h

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

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

    r1 r27  
    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// ----------------------------------------------------------------------------
  • sources/src/sc_bv.h

    r1 r27  
    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 {
  • sources/src/sc_clock.cc

    r1 r27  
    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}
  • sources/src/sc_clock.h

    r1 r27  
    1414#define __SC_CLOCK_H__
    1515
    16 #include"sc_clock_ext.h"
     16#include "sc_clock_ext.h"
    1717
    1818
  • sources/src/sc_event.cc

    r1 r27  
    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;
  • sources/src/sc_event.h

    r17 r27  
    1313#define __SC_EVENT_H__
    1414
    15 #include"sc_fwd.h"
     15#include "sc_fwd.h"
     16#include <iostream>
    1617#include<iostream>
    1718
  • sources/src/sc_event_finder.cc

    r4 r27  
    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 {
  • sources/src/sc_event_finder.h

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

    r22 r27  
    2929// ----------------------------------------------------------------------------
    3030
    31 #include"sc_nbdefs.h"
     31#include "sc_nbdefs.h"
    3232
    3333namespace sc_dt {
  • sources/src/sc_interface.cc

    r17 r27  
    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
     44#include <cstdlib>  //exit
    4145#include<cstdlib>  //exit
    4246
     
    106110{
    107111        interface2infos_t::iterator i = interface2infos.find (this);
    108 #ifdef DEBUG
     112#ifdef CONFIG_DEBUG
    109113        if (i == interface2infos.end ()) {
    110114                cerr << "Internal error : can't find data size of " << this << "\n";
     
    119123{
    120124        interface2infos_t::iterator i = interface2infos.find (this);
    121 #ifdef DEBUG
     125#ifdef CONFIG_DEBUG
    122126        if (i == interface2infos.end ()) {
    123127                cerr << "Internal error : can't find default event of " << this << "\n";
  • sources/src/sc_interface.h

    r1 r27  
    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 {
  • sources/src/sc_logic.cc

    r1 r27  
    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 {
  • sources/src/sc_logic.h

    r1 r27  
    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 {
  • sources/src/sc_lv.h

    r1 r27  
    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
  • sources/src/sc_main.cc

    r17 r27  
    3535 */
    3636
    37 #include<sstream>
    38 #include<list>
    39 #include<set>
    40 #include<cstring> // strcmp
    41 
    42 #include"internal.h"
    43 #include"global_functions.h"
    44 #include"sc_ver.h"
    45 #include"sc_module.h"
    46 #include"sc_signal.h" // pending_write_vector
    47 #include"dump_dot.h"
    48 #include"dump_used_options.h"
    49 #include"dump_used_env.h"
    50 #include"assert.h"
     37#include <sstream>
     38#include <list>
     39#include <set>
     40#include <cstring> // strcmp
     41#include <cassert>
     42
     43#include "internal.h"
     44#include "global_functions.h"
     45#include "sc_ver.h"
     46#include "sc_module.h"
     47#include "sc_signal.h" // pending_write_vector
     48#include "dump_dot.h"
     49#include "dump_used_options.h"
     50#include "dump_used_env.h"
     51
     52#ifdef HAVE_CONFIG_H
     53#include "config.h"
     54#endif
    5155
    5256//
     
    6064
    6165bool        check_port_dependencies = false;
     66#ifdef CONFIG_DEFAULT_RUNTIME_COMPILATION
     67bool        dynamic_link_of_scheduling_code = true;
     68#else
    6269bool        dynamic_link_of_scheduling_code = false;
     70#endif
    6371bool        dump_netlist_info       = false;
    6472bool        dump_funclist_info      = false;
     
    108116  switch (scheduling_method) {
    109117  case CASS_SCHEDULING :
    110     ASSERT(use_port_dependency == false);
     118    assert(use_port_dependency == false);
    111119    break;
    112120  case BUCHMANN_SCHEDULING :
     
    125133    exit (33);
    126134  }
    127   ASSERT(use_port_dependency || use_sensitivity_list);
     135  assert(use_port_dependency || use_sensitivity_list);
    128136}
    129137
  • sources/src/sc_module.cc

    r12 r27  
    4848#include "sc_clock.h" // is_clock
    4949#include "entity.h"
    50 #include "assert.h"
     50#include <cassert>
     51#ifdef HAVE_CONFIG_H
     52#include "config.h"
     53#endif
    5154
    5255//
     
    160163  sensitivity_list_t::iterator i;
    161164  for (i = sensitivity_list.begin (); i != sensitivity_list.end (); ++i) {
    162 #if defined(_DEBUG)
     165#if defined(CONFIG_DEBUG) && 0
    163166    if (i->get_interface() == NULL)
    164167    {
     
    238241          sensitive (this)
    239242{
    240   ASSERT(nm != NULL);
     243  assert(nm != NULL);
    241244#if 0
    242245  cerr << "sc_module constructor with const char * parameter\n";
     
    498501  if (m_pushed == false)
    499502    return;
    500   ASSERT(sc_core::module_name_stack.empty () == false);
     503  assert(sc_core::module_name_stack.empty () == false);
    501504  sc_core::module_name_stack.pop_back ();
    502505        modules_stack.pop ();
     
    504507  cout << "~sc_module_name <- " << m_name << endl;
    505508#endif
    506   ASSERT(temp_list.empty () == false);
     509  assert(temp_list.empty () == false);
    507510  sc_module *last1 = temp_list.back();
    508511  temp_list.pop_back();
     
    526529  if (m.dont_initialize == false)
    527530  {
    528     ASSERT(m.module != NULL);
    529 #if DEBUG
     531    assert(m.module != NULL);
     532#ifdef CONFIG_DEBUG
    530533    std::cerr << "Warning : SystemCASS doesn't perform SC_METHOD(S) initializations.\n"
    531534              << "Please turn off automatic initialization for '" << m.name
  • sources/src/sc_module.h

    r1 r27  
    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 {
  • sources/src/sc_module_ext.h

    r1 r27  
    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 {
  • sources/src/sc_module_name.h

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

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

    r17 r27  
    4040#include <map>
    4141
    42 #include "assert.h"
     42#include <cassert>
    4343#include "sc_object.h"
    4444//#include "sc_port.h"
     
    4646#include "sc_signal.h"
    4747#include "module_hierarchy.h"
     48#ifdef HAVE_CONFIG_H
     49#include "config.h"
     50#endif
    4851
    4952using namespace std;
     
    7174//    out += ".";
    7275  }
    73 //  ASSERT(name != NULL);
     76//  assert(name != NULL);
    7477  if (name)
    7578    out += name;
     
    203206{
    204207        object2name_t::iterator i = object2fullname.find (this);
    205 #ifdef DEBUG
     208#ifdef CONFIG_DEBUG
    206209        if (i == object2fullname.end ()) {
    207210                cerr << "Internal error : can't find name of " << this << "\n";
     
    217220/*
    218221        object2name_t::iterator i = object2fullname.find (this);
    219 #ifdef DEBUG
     222#ifdef CONFIG_DEBUG
    220223        if (i == object2fullname.end ()) {
    221224                cerr << "Internal error : can't find name of " << this << "\n";
     
    235238    string     out;
    236239    sc_object* obj = *it;
    237     ASSERT(obj != NULL);
     240    assert(obj != NULL);
    238241    build_full_name (out, *obj);
    239242  }
     
    243246{
    244247        object2infos_t::iterator i = object2infos.find (this);
    245 #ifdef DEBUG
     248#ifdef CONFIG_DEBUG
    246249        if (i == object2infos.end ()) {
    247250                cerr << "Internal error : can't find kind of " << this << "\n";
  • sources/src/sc_pat_trace.cc

    r12 r27  
    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<ctime>
     43#include <ctime>
     44#ifdef HAVE_CONFIG_H
     45#include "config.h"
     46#endif
    4447
    45 #ifdef PAT_TRACE_FORMAT
     48#ifdef CONFIG_PAT_TRACE_FORMAT
    4649
    4750//-----------------------------------------
  • sources/src/sc_port.cc

    r12 r27  
    3636
    3737
    38 #include<iomanip>
    39 #include<map>
    40 
    41 #include"sc_port.h"
    42 #include"sc_signal.h"
    43 #include"sc_module.h"
    44 #include"entity.h"
    45 #include"global_functions.h"
    46 #include"assert.h"
     38#include <iomanip>
     39#include <map>
     40#include <cassert>
     41
     42#include "sc_port.h"
     43#include "sc_signal.h"
     44#include "sc_module.h"
     45#include "entity.h"
     46#include "global_functions.h"
     47
     48#ifdef HAVE_CONFIG_H
     49#include "config.h"
     50#endif
    4751
    4852extern "C" {
     
    5458using namespace std;
    5559
    56 #ifdef CHECK_FSM_RULES
    57 #include"fsm_rules.h"
     60#ifdef CONFIG_CHECK_FSM_RULES
     61#include "fsm_rules.h"
    5862namespace sc_core {
    5963casc_fsm_step_t casc_fsm_step = ELABORATION;
     
    108112sc_port_base::init ()
    109113{
    110 #ifdef DEBUG
     114#ifdef CONFIG_DEBUG
    111115        if (modules_stack.empty ()) {
    112116                cerr << "Internal error : modules stack empty\n";
     
    233237#endif
    234238#define iter (sc_core::pending_write_vector[i])
    235 #ifdef DEBUG
     239#ifdef CONFIG_DEBUG
    236240                if (iter.pointer == NULL) {
    237241                        cerr << "Internal error : trying to apply a posted write from an unassigned signal/port\n";
     
    255259  cerr << "done.\n";
    256260#endif
    257 #if defined(CHECK_MULTIWRITING2REGISTER)
     261#if defined(CONFIG_CHECK_MULTIWRITING2REGISTER)
    258262  sc_core::pending_writing2register_clear ();
    259263#endif
     
    310314{
    311315  const tab_t *pointer = port.get_pointer ();
    312   //ASSERT(pointer != NULL);
     316  //assert(pointer != NULL);
    313317  if (pointer == NULL)
    314318    return false; // case : sc_in not bound
     
    343347  {
    344348    /*const*/ sc_port_base *port = i->first;
    345     ASSERT(port != NULL);
     349    assert(port != NULL);
    346350    check_port (*port);
    347351  }
     
    350354}
    351355
    352 #if defined(CHECK_MULTIWRITING2REGISTER)
     356#if defined(CONFIG_CHECK_MULTIWRITING2REGISTER)
    353357typedef set<const tab_t*> pending_writing2register_set_t;
    354358pending_writing2register_set_t pending_writing2register_set;
  • sources/src/sc_port.h

    r1 r27  
    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>
  • sources/src/sc_port_ext.h

    r17 r27  
    1515
    1616// Define registers writing method
    17 #include<iostream>
    18 #include<cstdlib>
    19 #include"sc_fwd.h"
    20 #include"sc_nbdefs.h"
    21 //#include"sc_event_finder.h"
    22 #include"sc_event.h"
    23 #include"sc_object.h"
    24 #include"sc_interface.h"
    25 #include"internal_ext.h"
    26 #include"port_dependency_ext.h"
    27 #include"fsm_rules.h"
     17#include <iostream>
     18#include <cstdlib>
     19#include "sc_fwd.h"
     20#include "sc_nbdefs.h"
     21//#include "sc_event_finder.h"
     22#include "sc_event.h"
     23#include "sc_object.h"
     24#include "sc_interface.h"
     25#include "internal_ext.h"
     26#include "port_dependency_ext.h"
     27#include "fsm_rules.h"
    2828
    2929
     
    5454        ///////////////////// DEPRECATED
    5555// C ANSI-only since it is needed to link with extern "C"
    56 // this declaration is not in casc.h since the CHECK_FSM_RULES macro
     56// this declaration is not in casc.h since the CONFIG_CHECK_FSM_RULES macro
    5757// is not defined.
    5858
     
    184184                << " on signal " << name () << "\n";
    185185#endif
    186 #ifdef CHECK_FSM_RULES
     186#ifdef CONFIG_CHECK_FSM_RULES
    187187        if (casc_fsm_step == GEN_MOORE) {
    188188                std::cerr << "FSM rules error : trying to read on input port '"
     
    294294                << " on signal " << name () << "\n";
    295295#endif
    296 #ifdef CHECK_FSM_RULES
     296#ifdef CONFIG_CHECK_FSM_RULES
    297297        if (casc_fsm_step == GEN_MOORE) {
    298298                std::cerr << "FSM rules error : trying to read on input/output port "
     
    316316            << " on in/out port (writing into a signal) '" << name () << "'\n";
    317317#endif
    318 #ifdef CHECK_FSM_RULES
     318#ifdef CONFIG_CHECK_FSM_RULES
    319319        if ((casc_fsm_step != GEN_MOORE) && ( casc_fsm_step != GEN_MEALY)) {
    320320                std::cerr << "FSM rules error : trying to write on output port "
     
    325325#endif
    326326//      T& ref = *(T*)(get_pointer());
    327 #if defined(CHECK_MULTIWRITING2PORT)
     327#if defined(CONFIG_CHECK_MULTIWRITING2PORT)
    328328  check_multiwriting2port ();
    329329#endif
  • sources/src/sc_sensitive.cc

    r1 r27  
    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;
  • sources/src/sc_sensitive.h

    r1 r27  
    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 {
  • sources/src/sc_signal.h

    r22 r27  
    1515
    1616// Define registers writing method
    17 #include<iostream>
    18 #include<cstdlib>
    19 #include"sc_fwd.h"
    20 #include"sc_nbdefs.h"
    21 //#include"sc_event_finder.h"
    22 //#include"sc_event.h"
    23 #include"sc_time.h" // SC_ZERO_TIME
    24 #include"sc_object.h"
    25 #include"sc_interface.h"
    26 #include"internal_ext.h"
     17#include <iostream>
     18#include <cstdlib>
     19#include "sc_fwd.h"
     20#include "sc_nbdefs.h"
     21//#include "sc_event_finder.h"
     22//#include "sc_event.h"
     23#include "sc_time.h" // SC_ZERO_TIME
     24#include "sc_object.h"
     25#include "sc_interface.h"
     26#include "internal_ext.h"
     27
     28#ifdef CONFIG_CHECK_FSM_RULES
    2729#include "fsm_rules.h"
     30#endif
    2831
    2932namespace sc_core {
     
    4245        ///////////////////// DEPRECATED
    4346// C ANSI-only since it is needed to link with extern "C"
    44 // this declaration is not in casc.h since the CHECK_FSM_RULES macro
     47// this declaration is not in casc.h since the CONFIG_CHECK_FSM_RULES macro
    4548// is not defined.
    4649
     
    7982        size_t size = (sizeof (T)-1) / sizeof (base_type);
    8083        size_t i = 0;
    81         const base_type *pvalue = (const base_type*)(&value_);
     84        const base_type *pvalue = (const base_type*)(void*)(&value_);
    8285        do {
    8386#if 0
     
    98101  post_multiwrite (pointer_,value_);
    99102  } else {
    100 #if defined(DEBUG)
     103#if defined(CONFIG_DEBUG)
    101104    if (pending_write_vector_nb >= pending_write_vector_capacity) {
    102105      //if (pending_write_vector_nb >= pending_write_vector_capacity * sizeof(pending_write)) {
     
    106109      exit (-1);
    107110    }
    108 #endif // DEBUG
     111#endif // CONFIG_DEBUG
    109112    pending_write_vector[pending_write_vector_nb].pointer = pointer_;
    110113//      pending_write_vector[pending_write_vector_nb++].value = *(reinterpret_cast<const base_type*const>(&value_)); => bug !
     
    229232sc_signal<T>::init()
    230233{
    231   set_pointer ((tab_t*)&val);
     234        set_pointer ((tab_t*)(void*)&val);
    232235  set_kind    (kind_string);
    233236  sc_interface::init (sizeof (data_type));
     
    247250                << " on signal " << name () << "\n";
    248251#endif
    249 #ifdef CHECK_FSM_RULES
     252#ifdef CONFIG_CHECK_FSM_RULES
    250253        // we can read value from sc_signal type (used like a register) at any time
    251254#endif 
     
    259262sc_signal<T>::write( const data_type& value_ )
    260263{
    261 #ifdef CHECK_FSM_RULES
     264#ifdef CONFIG_CHECK_FSM_RULES
    262265        if ((casc_fsm_step != TRANSITION)
    263266                        && ( casc_fsm_step != STIMULI)) {
     
    268271        }               
    269272#endif
    270 #ifdef DEBUG
     273#ifdef CONFIG_DEBUG
    271274  if (get_pointer() == NULL)
    272275  {
     
    275278  }
    276279#endif
    277 #ifdef CHECK_MULTIWRITING2REGISTER
     280#ifdef CONFIG_CHECK_MULTIWRITING2REGISTER
    278281  pending_writing2register_record_and_check (get_pointer ());
    279282#endif
  • sources/src/sc_time.cc

    r12 r27  
    3535
    3636
    37 #include"sc_time.h"
     37#include "sc_time.h"
    3838#include <ctime>
    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 {
  • sources/src/sc_trace.cc

    r17 r27  
    4141#include "bit2string.h"
    4242#include "hex2string.h"
    43 #include "assert.h"
    44 
     43
     44#include <cassert>
    4545#include <list>
    4646#include <cstdio>
     
    4848#include <cstring> //strlen
    4949
     50#ifdef HAVE_CONFIG_H
     51#include "config.h"
     52#endif
     53
    5054//-----------------------------------------
    5155
     
    5357
    5458//-----------------------------------------
    55 #ifdef PAT_TRACE_FORMAT
     59#ifdef CONFIG_PAT_TRACE_FORMAT
    5660
    5761extern "C" {
     
    6367#include <cstdio>
    6468
    65 #endif // PAT_TRACE_FORMAT
     69#endif // CONFIG_PAT_TRACE_FORMAT
    6670//-----------------------------------------
    6771
     
    165169    {
    166170      sc_trace_file *tf = *ptf;
    167       ASSERT(tf != NULL);
     171      assert(tf != NULL);
    168172                trace (*tf, part);
    169173    }
     
    173177}
    174178
    175 #if PAT_TRACE_FORMAT
     179#ifdef CONFIG_PAT_TRACE_FORMAT
    176180static void
    177181pat_set_value (char *buf, const signal2trace &s)
     
    283287{
    284288}
    285 #endif // PAT_TRACE_FORMAT
     289#endif // CONFIG_PAT_TRACE_FORMAT
    286290
    287291static
     
    414418  else
    415419    vcd_signal_table = (tab_t*) malloc (sizeof (tab_t) * size);
    416 #if DEBUG
     420#ifdef CONFIG_DEBUG
    417421  if (vcd_signal_table == NULL)
    418422  {
     
    486490      vcd_trace_init (tf);
    487491  } else {
    488 #if defined(DEBUG)
     492#if defined(CONFIG_DEBUG)
    489493      if (vcd_signal_table == NULL)
    490494      {
     
    580584&name)
    581585{
    582 #ifdef PAT_TRACE_FORMAT
     586#ifdef CONFIG_PAT_TRACE_FORMAT
    583587        //exemple:
    584588        //DECLAR ("a", ":2", "X", IN, "3  downto 0", "" );
     
    630634#endif
    631635        DECLAR ((char*)(name.c_str ()), ":1", format, dir,(char *) downto.c_str(), "" );
    632 #endif // PAT_TRACE_FORMAT
     636#endif // CONFIG_PAT_TRACE_FORMAT
    633637}
    634638
  • sources/src/sc_uint.h

    r22 r27  
    2525// ----------------------------------------------------------------------------
    2626
    27 #include"sc_nbdefs.h"
     27#include "sc_nbdefs.h"
    2828
    2929namespace sc_dt {
  • sources/src/sc_uint_subref_r.cc

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

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

    r12 r27  
    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"
    4342
    44 #include<ctime>
    45 #include<string>
     43#include <cassert>
     44#include <ctime>
     45#include <string>
     46
     47#ifdef HAVE_CONFIG_H
     48#include "config.h"
     49#endif
    4650
    4751//-----------------------------------------*/
     
    5862  if (notrace)
    5963    return NULL;
    60   ASSERT(name != NULL);
     64  assert(name != NULL);
    6165        string filename;
    6266        filename = name;
  • sources/src/sc_ver.cc

    r17 r27  
    4040#include <cstdlib> //exit
    4141
     42#ifdef HAVE_CONFIG_H
     43#include "config.h"
     44#endif
     45
    4246namespace sc_core {
    4347
     
    6165        "\n"
    6266        "         Cycle Accurate System Simulator\n"
    63 #ifdef DEBUG
     67#ifdef CONFIG_DEBUG
    6468  "            DEBUG version\n"
    6569#endif
  • 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  }
  • sources/src/schedulers.h

    r1 r27  
    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 {
  • sources/src/serialization.cc

    r12 r27  
    3535
    3636
    37 #include<map>
    38 #include<fstream>
    39 //#include<vector> // save_module_hierarchy
    40 
    41 #include"internal_ext.h" // tab_t
    42 #include"serialization.h"
    43 #include"entity.h"
    44 #include"sc_module.h"
    45 #include"sc_object.h"
    46 #include"hex2string.h"
    47 #include"assert.h"
     37#include "internal_ext.h" // tab_t
     38#include "serialization.h"
     39#include "entity.h"
     40#include "sc_module.h"
     41#include "sc_object.h"
     42#include "hex2string.h"
     43
     44#include <cassert>
     45#include <map>
     46#include <fstream>
     47//#include <vector> // save_module_hierarchy
     48
     49#ifdef HAVE_CONFIG_H
     50#include "config.h"
     51#endif
    4852
    4953using namespace std;
     
    8488            int          bit_number)
    8589{
    86   ASSERT(bit_number <= 64);
     90  assert(bit_number <= 64);
    8791  if (bit_number == 1) {
    8892    bool v = *((const bool*) val);
     
    140144                    save_fct_t1      fct)
    141145{
    142   //ASSERT(fct != NULL);
     146  //assert(fct != NULL);
    143147  //sc_module2save_fct_t1::value_type pair(&mod,fct);
    144148  //save_handler_table.insert (pair);
     
    158162    const sc_module *mod = it->first;
    159163    save_fct_t1      fct = it->second;
    160     ASSERT(mod != NULL);
    161 //    ASSERT(fct != NULL);
     164    assert(mod != NULL);
     165//    assert(fct != NULL);
    162166    //o << mod->name () << endl;
    163167    fprintf (o,"module\n%s\n",mod->name ());
     
    185189  file.close ();
    186190  FILE *f = fopen (filename, "a+");
    187   ASSERT(f != NULL);
     191  assert(f != NULL);
    188192  save_modules (f);
    189193  fclose (f);
  • sources/src/serialization.h

    r1 r27  
    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 {
  • sources/src/serialization_ext.h

    r1 r27  
    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 {
  • sources/src/signal_dependency.cc

    r12 r27  
    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;
  • sources/src/simplify_string.cc

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

    r4 r27  
    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.