Changeset 27 for sources/src/sc_signal.h
- Timestamp:
- May 4, 2009, 8:51:56 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sources/src/sc_signal.h
r22 r27 15 15 16 16 // 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 27 29 #include "fsm_rules.h" 30 #endif 28 31 29 32 namespace sc_core { … … 42 45 ///////////////////// DEPRECATED 43 46 // C ANSI-only since it is needed to link with extern "C" 44 // this declaration is not in casc.h since the C HECK_FSM_RULES macro47 // this declaration is not in casc.h since the CONFIG_CHECK_FSM_RULES macro 45 48 // is not defined. 46 49 … … 79 82 size_t size = (sizeof (T)-1) / sizeof (base_type); 80 83 size_t i = 0; 81 const base_type *pvalue = (const base_type*)( &value_);84 const base_type *pvalue = (const base_type*)(void*)(&value_); 82 85 do { 83 86 #if 0 … … 98 101 post_multiwrite (pointer_,value_); 99 102 } else { 100 #if defined( DEBUG)103 #if defined(CONFIG_DEBUG) 101 104 if (pending_write_vector_nb >= pending_write_vector_capacity) { 102 105 //if (pending_write_vector_nb >= pending_write_vector_capacity * sizeof(pending_write)) { … … 106 109 exit (-1); 107 110 } 108 #endif // DEBUG111 #endif // CONFIG_DEBUG 109 112 pending_write_vector[pending_write_vector_nb].pointer = pointer_; 110 113 // pending_write_vector[pending_write_vector_nb++].value = *(reinterpret_cast<const base_type*const>(&value_)); => bug ! … … 229 232 sc_signal<T>::init() 230 233 { 231 set_pointer ((tab_t*)&val);234 set_pointer ((tab_t*)(void*)&val); 232 235 set_kind (kind_string); 233 236 sc_interface::init (sizeof (data_type)); … … 247 250 << " on signal " << name () << "\n"; 248 251 #endif 249 #ifdef C HECK_FSM_RULES252 #ifdef CONFIG_CHECK_FSM_RULES 250 253 // we can read value from sc_signal type (used like a register) at any time 251 254 #endif … … 259 262 sc_signal<T>::write( const data_type& value_ ) 260 263 { 261 #ifdef C HECK_FSM_RULES264 #ifdef CONFIG_CHECK_FSM_RULES 262 265 if ((casc_fsm_step != TRANSITION) 263 266 && ( casc_fsm_step != STIMULI)) { … … 268 271 } 269 272 #endif 270 #ifdef DEBUG273 #ifdef CONFIG_DEBUG 271 274 if (get_pointer() == NULL) 272 275 { … … 275 278 } 276 279 #endif 277 #ifdef C HECK_MULTIWRITING2REGISTER280 #ifdef CONFIG_CHECK_MULTIWRITING2REGISTER 278 281 pending_writing2register_record_and_check (get_pointer ()); 279 282 #endif
Note: See TracChangeset
for help on using the changeset viewer.