Ignore:
Timestamp:
Mar 27, 2008, 11:04:49 AM (16 years ago)
Author:
rosiere
Message:

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
Location:
trunk/IPs/systemC/processor/Morpheo/Common
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h

    r71 r78  
    99#include <sstream>
    1010#include <string>
     11
     12std::string debug_tab            (void);
     13void        debug_function_begin (std::string component, std::string function);
     14void        debug_function_end   (std::string component, std::string function);
    1115
    1216// Debug's Level :
     
    2731
    2832#ifdef DEBUG
    29 //Debug
    30 #  define log_printf(level, component, func, str... )                   \
     33# define log_printf(level, component, func, str... )                    \
    3134  do                                                                    \
    3235    {                                                                   \
     
    3639           ( DEBUG_ ## component == true )) )                           \
    3740        {                                                               \
     41          msg(_("%s"),debug_tab().c_str());                             \
    3842          if (DEBUG >= DEBUG_ALL )                                      \
    3943            {                                                           \
     
    4852                }                                                       \
    4953            }                                                           \
    50           msg(_("<%s> "),func);                                         \
    5154          if (DEBUG >= DEBUG_FUNC)                                      \
    5255            {                                                           \
     56              msg(_("<%s> "),func);                                     \
    5357              msg(_("In file %s, "),__FILE__);                          \
    54               msg(_("at line %d, "),__LINE__);                          \
     58              msg(_("at line %d " ),__LINE__);                          \
     59              msg(_(": "));                                             \
    5560            }                                                           \
    56           msg(_(": "));                                                 \
    5761          msg(str);                                                     \
    5862          msg(_("\n"));                                                 \
     
    6064        }                                                               \
    6165    } while(0)
    62 
    6366#else
    64 // No debug
    65 
    66 #  define log_printf(level, component, func, str... )                                 \
    67 do                                                                                    \
    68 {                                                                                     \
    69 } while(0)
    70 
     67# define log_printf(level, component, func, str... )                    \
     68  do                                                                    \
     69    {                                                                   \
     70    } while(0)
    7171#endif // DEBUG
    72 
    7372#endif // !DEBUG_H
  • trunk/IPs/systemC/processor/Morpheo/Common/include/FromString.h

    r43 r78  
    1717namespace morpheo {
    1818 
    19   template<typename T> inline T   fromString             (const std::string& x)
     19  template<typename T> inline T        fromString             (const std::string& x)
    2020  {
    2121    return static_cast<T>(x.c_str());
    2222  }
    2323 
    24   template<>           inline int fromString<int>        (const std::string& x)
     24  template<>           inline uint32_t fromString<uint32_t>   (const std::string& x)
    2525  {
    26     return atoi(x.c_str());
     26    return static_cast<uint32_t>(atoi(x.c_str()));
     27  }
     28
     29  template<>           inline bool     fromString<bool>       (const std::string& x)
     30  {
     31    return atoi(x.c_str())!=0;
    2732  }
    2833 
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Time.h

    r71 r78  
    3434    uint32_t nb_cycles = static_cast<uint32_t>(sc_simulation_time());
    3535
    36     double average = static_cast<double>(nb_cycles) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec);
     36    double average = static_cast<double>(nb_cycles) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec+1);
    3737   
    38     output_stream << nb_cycles << "\t(" << average << " cycles / seconds )" << std::endl;
     38    output_stream << "Timing : " << nb_cycles << " cycles \t(" << average << " cycles/s)" << std::endl;
    3939
    4040    return output_stream;
  • trunk/IPs/systemC/processor/Morpheo/Common/include/ToString.h

    r71 r78  
    5858  }
    5959
    60 //   template<>           inline std::string toString< int8_t>       (const int8_t& x)
    61 //   {
    62 //     std::ostringstream out("");
    63 //     out << x;
    64 //     return out.str();
    65 //   }
     60  template<>           inline std::string toString< int8_t>       (const int8_t& x)
     61  {
     62    std::ostringstream out("");
     63    out << static_cast< int32_t>(x);
     64    return out.str();
     65  }
    6666
    67 //   template<>           inline std::string toString<uint8_t>       (const uint8_t& x)
    68 //   {
    69 //     std::ostringstream out("");
    70 //     out << x;
    71 //     return out.str();
    72 //   }
     67  template<>           inline std::string toString<uint8_t>       (const uint8_t& x)
     68  {
     69    std::ostringstream out("");
     70    out << static_cast<uint32_t>(x);
     71    return out.str();
     72  }
    7373
    74 //   template<>           inline std::string toString< int16_t>      (const int16_t& x)
    75 //   {
    76 //     std::ostringstream out("");
    77 //     out << x;
    78 //     return out.str();
    79 //   }
     74  template<>           inline std::string toString< int16_t>      (const int16_t& x)
     75  {
     76    std::ostringstream out("");
     77    out << static_cast< int32_t>(x);
     78    return out.str();
     79  }
    8080
    81 //   template<>           inline std::string toString<uint16_t>      (const uint16_t& x)
    82 //   {
    83 //     std::ostringstream out("");
    84 //     out << x;
    85 //     return out.str();
    86 //   }
     81  template<>           inline std::string toString<uint16_t>      (const uint16_t& x)
     82  {
     83    std::ostringstream out("");
     84    out << static_cast<uint32_t>(x);
     85    return out.str();
     86  }
    8787
    88 //   template<>           inline std::string toString< int32_t>      (const int32_t& x)
    89 //   {
    90 //     std::ostringstream out("");
    91 //     out << x;
    92 //     return out.str();
    93 //   }
     88  template<>           inline std::string toString< int32_t>      (const int32_t& x)
     89  {
     90    std::ostringstream out("");
     91    out << x;
     92    return out.str();
     93  }
    9494
    95 //   template<>           inline std::string toString<uint32_t>      (const uint32_t& x)
    96 //   {
    97 //     std::ostringstream out("");
    98 //     out << x;
    99 //     return out.str();
    100 //   }
     95  template<>           inline std::string toString<uint32_t>      (const uint32_t& x)
     96  {
     97    std::ostringstream out("");
     98    out << x;
     99    return out.str();
     100  }
    101101 
    102102}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Types.h

    r43 r78  
    1616
    1717// Definition of type
    18 #if ( defined(SC_CLOCK) || defined(SC_INTERNAL) || defined(SC_SIGNAL) || defined(SC_REGISTER) || defined(SC_IN) || defined(SC_OUT) )
     18//#if ( defined(SC_CLOCK) || defined(SC_INTERNAL) || defined(SC_SIGNAL) || defined(SC_REGISTER) || defined(SC_IN) || defined(SC_OUT) )
     19#if ( defined(SC_CLOCK) || defined(SC_IN) || defined(SC_OUT) )
    1920#  error "A type is already defined"
    2021#endif
     
    2324#  error "Action is already defined"
    2425#endif
    25 #if ( defined(INTERNAL_READ) || defined(INTERNAL_WRITE) )
    26 #  error "Action is already defined"
    27 #endif
    28 #if ( defined(SIGNAL_READ)   || defined(SIGNAL_WRITE) )
    29 #  error "Action is already defined"
    30 #endif
    31 #if ( defined(REGISTER_READ) || defined(REGISTER_WRITE) )
    32 #  error "Action is already defined"
    33 #endif
     26// #if ( defined(INTERNAL_READ) || defined(INTERNAL_WRITE) )
     27// #  error "Action is already defined"
     28// #endif
     29// #if ( defined(SIGNAL_READ)   || defined(SIGNAL_WRITE) )
     30// #  error "Action is already defined"
     31// #endif
     32// #if ( defined(REGISTER_READ) || defined(REGISTER_WRITE) )
     33// #  error "Action is already defined"
     34// #endif
    3435
    3536#define SC_CLOCK                 sc_in_clk       
    36 #define SC_INTERNAL(type)        type
    37 #define SC_REGISTER(type)        sc_signal<type >
    38 #define SC_SIGNAL(type)          sc_signal<type >
     37// #define SC_INTERNAL(type)        type
     38// #define SC_REGISTER(type)        sc_signal<type >
     39// #define SC_SIGNAL(type)          sc_signal<type >
    3940#define SC_IN(type)              sc_in    <type >
    4041#define SC_OUT(type)             sc_out   <type >
     
    4243#define PORT_READ(sig)           sig->read()
    4344#define PORT_WRITE(sig,val)      sig->write(val)
    44 #define INTERNAL_READ(sig)       (*sig)
    45 #define INTERNAL_WRITE(sig,val)  (*sig) = val
    46 #define SIGNAL_READ(sig)         sig->read()
    47 #define SIGNAL_WRITE(sig,val)    sig->write(val)
    48 #define REGISTER_READ(sig)       sig->read()
    49 #define REGISTER_WRITE(sig,val)  sig->write(val)
     45// #define INTERNAL_READ(sig)       (*sig)
     46// #define INTERNAL_WRITE(sig,val)  (*sig) = val
     47// #define SIGNAL_READ(sig)         sig->read()
     48// #define SIGNAL_WRITE(sig,val)    sig->write(val)
     49// #define REGISTER_READ(sig)       sig->read()
     50// #define REGISTER_WRITE(sig,val)  sig->write(val)
    5051
    5152#endif 
Note: See TracChangeset for help on using the changeset viewer.