Changeset 100 for trunk/IPs/systemC/processor/Morpheo/Common/include
- Timestamp:
- Jan 8, 2009, 2:06:27 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:ignore
set to
Makefile.flags
Makefile.tools
Makefile.tools_path
-
Property
svn:ignore
set to
-
trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h
r97 r100 47 47 48 48 extern debug_verbosity_t debug; 49 50 void debug_init (void); 51 void debug_init (debug_verbosity_t level); 49 extern bool debug_cycle_test; 50 extern double debug_cycle_start; 51 extern double debug_cycle_stop ; 52 53 void debug_init (void); 54 void debug_init (debug_verbosity_t level, 55 double cycle_start, 56 double cycle_stop ); 57 58 #ifdef SYSTEMC 59 #define debug_test_simulation_time \ 60 (not debug_cycle_test or \ 61 ( (sc_simulation_time() >= debug_cycle_start) and \ 62 ((sc_simulation_time() <= debug_cycle_stop) or \ 63 (debug_cycle_stop == -1)))) 64 #else 65 #define debug_test_simulation_time true 66 #endif 67 52 68 #ifdef DEBUG 53 54 69 # define log_printf(level, component, func, str... ) \ 55 70 do \ … … 57 72 debug_init(); \ 58 73 \ 59 if ((debug == DEBUG_ALL ) or \ 60 (DEBUG_ ## level == DEBUG_NONE) or \ 61 (( DEBUG_ ## level <= debug) and \ 62 ( DEBUG_ ## component == true )) ) \ 63 { \ 64 if (DEBUG_ ## level <= DEBUG_INFO) \ 65 { \ 66 msg("%s ",MSG_INFORMATION); \ 67 } \ 68 else \ 69 { \ 70 msg("%s ",MSG_DEBUG); \ 71 } \ 74 if (debug_test_simulation_time) \ 75 if ((debug == DEBUG_ALL ) or \ 76 (DEBUG_ ## level == DEBUG_NONE) or \ 77 (( DEBUG_ ## level <= debug) and \ 78 ( DEBUG_ ## component == true )) ) \ 79 { \ 80 if (DEBUG_ ## level <= DEBUG_INFO) \ 81 { \ 82 msg("%s ",MSG_INFORMATION); \ 83 } \ 84 else \ 85 { \ 86 msg("%s ",MSG_DEBUG); \ 87 } \ 72 88 \ 73 74 {\75 switch (DEBUG_ ## level)\76 77 78 79 80 81 82 83 84 }\85 86 {\87 88 msg(_("In file %s, "),__FILE__);\89 msg(_("at line %d " ),__LINE__);\90 91 }\92 93 msg("\n");\94 89 if (debug >= DEBUG_ALL ) \ 90 { \ 91 switch (DEBUG_ ## level) \ 92 { \ 93 case DEBUG_NONE : msg(_("(none ) ")); break; \ 94 case DEBUG_INFO : msg(_("(information) ")); break; \ 95 case DEBUG_TRACE : msg(_("(trace ) ")); break; \ 96 case DEBUG_FUNC : msg(_("(function ) ")); break; \ 97 case DEBUG_ALL : msg(_("(all ) ")); break; \ 98 default : msg(_("(undefine ) ")); break; \ 99 } \ 100 } \ 101 if (debug >= DEBUG_FUNC) \ 102 { \ 103 msg( "<%s> " ,func); \ 104 msg(_("In file %s, "),__FILE__); \ 105 msg(_("at line %d " ),__LINE__); \ 106 msg( ": " ); \ 107 } \ 108 msg(str); \ 109 msg("\n"); \ 110 } \ 95 111 } while(0) 96 112
Note: See TracChangeset
for help on using the changeset viewer.