Ignore:
Timestamp:
Jan 8, 2009, 2:06:27 PM (15 years ago)
Author:
rosiere
Message:

1) Bug fix (Operation, Instruction)
2) Modif Return Address Stack
3) Add Soft Test
4) Add Soc Test

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore set to
      Makefile.flags
      Makefile.tools
      Makefile.tools_path
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h

    r97 r100  
    4747
    4848  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 
    5268#ifdef DEBUG
    53 
    5469# define log_printf(level, component, func, str... )                    \
    5570  do                                                                    \
     
    5772      debug_init();                                                     \
    5873                                                                        \
    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              }                                                         \
    7288                                                                        \
    73           if (debug >= DEBUG_ALL )                                      \
    74             {                                                           \
    75               switch (DEBUG_ ## level)                                  \
    76                 {                                                       \
    77                 case DEBUG_NONE  : msg(_("(none       ) ")); break;     \
    78                 case DEBUG_INFO  : msg(_("(information) ")); break;     \
    79                 case DEBUG_TRACE : msg(_("(trace      ) ")); break;     \
    80                 case DEBUG_FUNC  : msg(_("(function   ) ")); break;     \
    81                 case DEBUG_ALL   : msg(_("(all        ) ")); break;     \
    82                 default          : msg(_("(undefine   ) ")); break;     \
    83                 }                                                       \
    84             }                                                           \
    85           if (debug >= DEBUG_FUNC)                                      \
    86             {                                                           \
    87               msg(  "<%s> " ,func);                                     \
    88               msg(_("In file %s, "),__FILE__);                          \
    89               msg(_("at line %d " ),__LINE__);                          \
    90               msg(  ": " );                                             \
    91             }                                                           \
    92           msg(str);                                                     \
    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          }                                                             \
    95111    } while(0)
    96112
Note: See TracChangeset for help on using the changeset viewer.