Last change
on this file since 104 was
100,
checked in by rosiere, 16 years ago
|
1) Bug fix (Operation, Instruction)
2) Modif Return Address Stack
3) Add Soft Test
4) Add Soc Test
|
-
Property svn:keywords set to
Id
|
File size:
1.1 KB
|
Rev | Line | |
---|
[82] | 1 | /* |
---|
| 2 | * $Id: Debug.cpp 100 2009-01-08 13:06:27Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
[78] | 8 | #include "Common/include/Debug.h" |
---|
[88] | 9 | #include "Common/include/Environment.h" |
---|
[78] | 10 | |
---|
[88] | 11 | namespace morpheo { |
---|
| 12 | |
---|
[97] | 13 | #ifdef DEBUG |
---|
| 14 | static bool debug_initialized; |
---|
| 15 | #endif |
---|
| 16 | debug_verbosity_t debug; |
---|
[100] | 17 | bool debug_cycle_test; |
---|
| 18 | double debug_cycle_start; |
---|
| 19 | double debug_cycle_stop ; |
---|
[78] | 20 | |
---|
[88] | 21 | #undef FUNCTION |
---|
[97] | 22 | #define FUNCTION "debug_init" |
---|
| 23 | void debug_init (void) |
---|
[78] | 24 | { |
---|
[97] | 25 | #ifdef DEBUG |
---|
| 26 | if (not debug_initialized) |
---|
| 27 | { |
---|
| 28 | debug = DEBUG; |
---|
[100] | 29 | debug_cycle_test = false; |
---|
| 30 | // debug_initialized = true; |
---|
[97] | 31 | } |
---|
| 32 | #endif |
---|
[78] | 33 | } |
---|
| 34 | |
---|
[88] | 35 | #undef FUNCTION |
---|
[97] | 36 | #define FUNCTION "debug_init" |
---|
[100] | 37 | void debug_init (debug_verbosity_t level, |
---|
| 38 | double cycle_start, |
---|
| 39 | double cycle_stop ) |
---|
[78] | 40 | { |
---|
[97] | 41 | #ifdef DEBUG |
---|
| 42 | if (not debug_initialized) |
---|
| 43 | { |
---|
| 44 | // Take min |
---|
| 45 | debug = (level < DEBUG)?level:DEBUG; |
---|
[100] | 46 | |
---|
| 47 | #ifdef SYSTEMC |
---|
| 48 | debug_cycle_test = (cycle_stop > cycle_start) or (cycle_stop == -1); |
---|
| 49 | debug_cycle_start = cycle_start; |
---|
| 50 | debug_cycle_stop = cycle_stop; |
---|
| 51 | #else |
---|
| 52 | debug_cycle_test = false; |
---|
| 53 | #endif |
---|
| 54 | |
---|
[97] | 55 | debug_initialized = true; |
---|
| 56 | } |
---|
| 57 | #endif |
---|
[78] | 58 | } |
---|
[88] | 59 | |
---|
| 60 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.