Changeset 27 for sources/src/entity.cc


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

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

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

Changes:

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

Removes:

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

Legend:

Unmodified
Added
Removed
  • sources/src/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);
Note: See TracChangeset for help on using the changeset viewer.