source: trunk/IPs/systemC/processor/Morpheo/Common/src/Debug.cpp @ 97

Last change on this file since 97 was 97, checked in by rosiere, 16 years ago

1) Update Prediction Table : statistics
2) Size instruction address on 30 bits
3) Change Log File
4) Add debug_level in simulation configuration file

  • Property svn:keywords set to Id
File size: 697 bytes
Line 
1/*
2 * $Id: Debug.cpp 97 2008-12-19 15:34:00Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Common/include/Debug.h"
9#include "Common/include/Environment.h"
10
11namespace morpheo {
12
13#ifdef DEBUG
14static bool       debug_initialized;
15#endif
16debug_verbosity_t debug;
17
18#undef  FUNCTION
19#define FUNCTION "debug_init"
20void debug_init (void)
21{
22#ifdef DEBUG
23  if (not debug_initialized)
24    {
25      debug = DEBUG;
26
27//       debug_initialized = true;
28    }
29#endif
30}
31
32#undef  FUNCTION
33#define FUNCTION "debug_init"
34void debug_init (debug_verbosity_t level)
35{
36#ifdef DEBUG
37  if (not debug_initialized)
38    {
39      // Take min
40      debug = (level < DEBUG)?level:DEBUG;
41     
42      debug_initialized = true;
43    }
44#endif
45}
46
47}; // end namespace morpheo
Note: See TracBrowser for help on using the repository browser.