Changeset 27 for sources/src/sc_signal.h


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/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
Note: See TracChangeset for help on using the changeset viewer.