source: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_signal.h @ 129

Last change on this file since 129 was 129, checked in by rosiere, 15 years ago

1) Debug_Signal

  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1#ifndef morpheo_behavioural_Debug_signal_h
2#define morpheo_behavioural_Debug_signal_h
3
4/*
5 * $Id: Debug_signal.h 129 2009-06-29 16:38:40Z rosiere $
6 *
7 * [ Description ]
8 *
9 */
10
11# ifdef DEBUG_SIGNAL
12
13#include <set>
14#include "Common/include/Message.h"
15
16namespace morpheo {
17namespace behavioural {
18
19  extern std::set<void *> _debug_signal;
20 
21#  define DEBUG_SIGNAL_ADD(signal)                                      \
22  do                                                                    \
23    {                                                                   \
24      morpheo::behavioural::_debug_signal.insert(static_cast<void *>( signal)); \
25    } while(0)
26 
27#  define DEBUG_SIGNAL_ACCESS(signal)                                   \
28  do                                                                    \
29    {                                                                   \
30      if (morpheo::behavioural::_debug_signal.find(static_cast<void *>(signal)) == morpheo::behavioural::_debug_signal.end()) \
31        msgError("At file %s, in line %d, invalid signal.\n",__FILE__,__LINE__); \
32    } while(0)
33 
34}; // end namespace behavioural         
35}; // end namespace morpheo             
36# else
37#  define DEBUG_SIGNAL_ADD(signal)    do {} while (0)
38#  define DEBUG_SIGNAL_ACCESS(signal) do {} while (0)
39# endif
40
41
42#endif
Note: See TracBrowser for help on using the repository browser.