Ignore:
Timestamp:
Jan 31, 2008, 6:46:41 PM (16 years ago)
Author:
rosiere
Message:

Update all component (except front_end) to :

  • new statistics model
  • no namespace std
Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit
Files:
12 deleted
15 edited
4 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Makefile.deps

    r74 r75  
    4242#-----[ Rules ]--------------------------------------------
    4343
    44 #.NOTPARALLEL                   : Register_unit_library Register_unit_library_clean     
     44.NOTPARALLEL                    : Register_unit_library Register_unit_library_clean     
    4545
    4646Register_unit_library           : $(Register_unit_DEPENDENCIES)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Parameters.h

    r60 r75  
    5050  public : ~Parameters () ;
    5151
    52   public : string msg_error (void);
     52  public :        std::string   msg_error (void);
    5353
    54   public :        string   print      (uint32_t depth);
    55   public : friend ostream& operator<< (ostream& output_stream,
    56                                        morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Parameters & x);
     54  public :        std::string   print      (uint32_t depth);
     55  public : friend std::ostream& operator<< (std::ostream& output_stream,
     56                                            morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Parameters & x);
    5757  };
    5858
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h

    r61 r75  
    2020#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Parameters.h"
    2121#ifdef STATISTICS
    22 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Statistics.h"
     22#include "Behavioural/include/Stat.h"
    2323#endif
    2424#include "Behavioural/include/Component.h"
     
    2727#endif
    2828#include "Behavioural/include/Usage.h"
    29 
    30 using namespace std;
    3129
    3230namespace morpheo {
     
    4745    // -----[ fields ]----------------------------------------------------
    4846    // Parameters
    49   protected : const string       _name;
     47  protected : const std::string       _name;
    5048  protected : const Parameters * _param;
    5149  private   : const Tusage_t     _usage;
    5250
    53 //#ifdef STATISTICS
    54 //  protected : const morpheo::behavioural::Parameters_Statistics * _param_statistics;
    55 //#endif
    56 
    57 #ifdef STATISTICS
    58   private   : Statistics                     * _stat;
     51#ifdef STATISTICS
     52  public    : Stat                           * _stat;
    5953#endif
    6054
     
    169163   sc_module_name                                name,
    170164#else                                         
    171    string                                        name,
     165   std::string                                        name,
    172166#endif                                         
    173167#ifdef STATISTICS
     
    183177                                               
    184178#ifdef SYSTEMC                                 
    185 //#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    186179  public  : void     transition                      (void);
    187180  public  : void     genMealy_gpr_read               (void);
     
    199192  public  : void     genMealy_insert                 (void);
    200193  public  : void     genMealy_retire                 (void);
    201 
    202 //#endif
    203194#endif                                         
    204 #ifdef STATISTICS
    205   public  : string   statistics                (uint32_t depth);
     195
     196#ifdef STATISTICS
     197  public  : void     statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
    206198#endif
    207199                                               
     
    212204#endif                                         
    213205                                               
    214 #ifdef VHDL_TESTBENCH                         
    215   private : void     vhdl_testbench_transition (void);
     206#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     207  private : void     end_cycle                (void);
    216208#endif
    217209  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Parameters_msg_error.cpp

    r60 r75  
    99#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Parameters.h"
    1010#include <sstream>
    11 using namespace std;
    1211
    1312namespace morpheo                    {
     
    2221#undef  FUNCTION
    2322#define FUNCTION "Register_unit_Glue::msg_error"
    24   string Parameters::msg_error(void)
     23  std::string Parameters::msg_error(void)
    2524  {
    2625    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
    2726
    28     string msg = "";
     27    std::string msg = "";
    2928
    3029    return msg;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Parameters_print.cpp

    r60 r75  
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Parameters.h"
    99#include "Behavioural/include/XML.h"
    10 using namespace std;
    1110
    1211namespace morpheo                    {
     
    2120#undef  FUNCTION
    2221#define FUNCTION "Register_unit_Glue::print"
    23   string Parameters::print (uint32_t depth)
     22  std::string Parameters::print (uint32_t depth)
    2423  {
    2524    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     
    5655#undef  FUNCTION
    5756#define FUNCTION "Register_unit_Glue::operator<<"
    58   ostream& operator<< (ostream& output_stream ,
    59                        morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Parameters & x)
     57  std::ostream& operator<< (std::ostream& output_stream ,
     58                            morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Parameters & x)
    6059  {
    6160    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue.cpp

    r61 r75  
    2424   sc_module_name name,
    2525#else
    26    string name,
     26   std::string name,
    2727#endif
    2828#ifdef STATISTICS
     
    3535    ,_param            (param)
    3636    ,_usage            (usage)
    37 // #ifdef STATISTICS
    38 //                            ,_param_statistics (param_statistics)
    39 // #endif
    4037  {
    4138    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     
    4845
    4946    // Allocation of statistics
    50     _stat = new Statistics (static_cast<string>(_name),
    51                             param_statistics          ,
    52                             param);
     47    statistics_declaration(param_statistics);
    5348#endif
    5449
     
    549544    log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate Statistics file");
    550545
    551     _stat->generate_file(statistics(0));
    552546    delete _stat;
    553547#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_allocation.cpp

    r60 r75  
    2222  void Register_unit_Glue::allocation (void)
    2323  {
    24     string rename;
    25 
    2624    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
    2725
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_end_cycle.cpp

    r60 r75  
    1 #ifdef VHDL_TESTBENCH
     1#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    22/*
    33 * $Id$
     
    1717namespace register_unit_glue {
    1818
    19 
    2019#undef  FUNCTION
    21 #define FUNCTION "Register_unit_Glue::vhdl_testbench_transition"
    22   void Register_unit_Glue::vhdl_testbench_transition ()
     20#define FUNCTION "Register_unit_Glue::end_cycle"
     21void Register_unit_Glue::end_cycle ()
    2322  {
    2423    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
    2524
     25#ifdef STATISTICS
     26    _stat->end_cycle();
     27#endif   
     28
     29#ifdef VHDL_TESTBENCH
    2630    // Evaluation before read the ouput signal
    27 //     sc_start(0);
    28 
     31//  sc_start(0);
    2932    _interfaces->testbench();
     33#endif
    3034
    3135    log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_statistics_declaration.cpp

    r60 r75  
    1717namespace register_unit_glue {
    1818
    19 
    2019#undef  FUNCTION
    21 #define FUNCTION "Register_unit_Glue::statistics"
    22   string Register_unit_Glue::statistics (uint32_t depth)
     20#define FUNCTION "Register_unit_Glue::statistics_declaration"
     21  void Register_unit_Glue::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics)
    2322  {
    2423    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
    2524
    26     string txt = _stat->print(depth);
     25    _stat = new Stat (static_cast<std::string>(_name),
     26                      "Register_unit_Glue",
     27                      param_statistics);
    2728   
    2829    log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
    29 
    30     return txt;
    3130  };
    3231
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_transition.cpp

    r60 r75  
    11#ifdef SYSTEMC
    2 //#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    32/*
    43 * $Id$
     
    2524    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
    2625
    27 #ifdef STATISTICS
    28     _stat->add();
    29 #endif   
    30 
    31 #ifdef VHDL_TESTBENCH
    32     vhdl_testbench_transition ();
     26#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     27    end_cycle();
    3328#endif
    3429
     
    4540}; // end namespace morpheo             
    4641#endif
    47 //#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Parameters.h

    r60 r75  
    7979  public : ~Parameters () ;
    8080
    81   public : string msg_error (void);
    82 
    83   public :        string   print      (uint32_t depth);
    84   public : friend ostream& operator<< (ostream& output_stream,
    85                                        morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::Parameters & x);
     81  public :        std::string   msg_error  (void);
     82  public :        std::string   print      (uint32_t depth);
     83  public : friend std::ostream& operator<< (std::ostream& output_stream,
     84                                            morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::Parameters & x);
    8685  };
    8786
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Register_unit.h

    r60 r75  
    2424#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Parameters.h"
    2525#ifdef STATISTICS
    26 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Statistics.h"
     26#include "Behavioural/include/Stat.h"
    2727#endif
    2828#include "Behavioural/include/Component.h"
     
    3232#include "Behavioural/include/Usage.h"
    3333
    34 using namespace std;
    35 
    3634namespace morpheo {
    3735namespace behavioural {
    38 
    3936namespace core {
    4037namespace multi_execute_loop {
     
    5047    // -----[ fields ]----------------------------------------------------
    5148    // Parameters
    52   protected : const string       _name;
     49  protected : const std::string       _name;
    5350  protected : const Parameters * _param;
    5451  private   : const Tusage_t     _usage;
    5552
    5653#ifdef STATISTICS
    57   protected : morpheo::behavioural::Parameters_Statistics * _param_statistics;
    58 #endif
    59 
    60 #ifdef STATISTICS
    61   private   : Statistics                     * _stat;
     54  public    : Stat                           * _stat;
    6255#endif
    6356
     
    143136   sc_module_name                                name,
    144137#else                                         
    145    string                                        name,
     138   std::string                                        name,
    146139#endif                                         
    147140#ifdef STATISTICS
     
    153146  public  :          ~Register_unit             (void);
    154147                                               
    155   private : void     allocation                (void);
     148  private : void     allocation                (
     149#ifdef STATISTICS
     150                                                morpheo::behavioural::Parameters_Statistics * param_statistics
     151#else
     152                                                void
     153#endif
     154                                                );
    156155  private : void     deallocation              (void);
    157156                                               
     
    161160//#endif
    162161#endif                                         
    163 #ifdef STATISTICS
    164   public  : string   statistics                (uint32_t depth);
    165 #endif
    166162                                               
    167163#if VHDL                                       
     
    171167#endif                                         
    172168                                               
    173 #ifdef VHDL_TESTBENCH                         
    174   private : void     vhdl_testbench_transition (void);
     169#ifdef STATISTICS
     170  public  : void        statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
     171#endif
     172#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     173  private : void        end_cycle                 (void);
    175174#endif
    176175  };
     176
    177177
    178178}; // end namespace register_unit
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Parameters_msg_error.cpp

    r60 r75  
    66 */
    77
    8 #include "Behavioural/include/Types.h"
    98#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Parameters.h"
    10 #include <sstream>
    11 using namespace std;
    129
    1310namespace morpheo                    {
     
    2118#undef  FUNCTION
    2219#define FUNCTION "Register_unit::msg_error"
    23   string Parameters::msg_error(void)
     20  std::string Parameters::msg_error(void)
    2421  {
    2522    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
    2623
    27     string msg = "";
     24    std::string msg = "";
    2825
    2926    return msg;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Parameters_print.cpp

    r60 r75  
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Parameters.h"
    99#include "Behavioural/include/XML.h"
    10 using namespace std;
    1110
    1211namespace morpheo                    {
     
    2019#undef  FUNCTION
    2120#define FUNCTION "Register_unit::print"
    22   string Parameters::print (uint32_t depth)
     21  std::string Parameters::print (uint32_t depth)
    2322  {
    2423    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
     
    7372#undef  FUNCTION
    7473#define FUNCTION "Register_unit::operator<<"
    75   ostream& operator<< (ostream& output_stream ,
    76                        morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::Parameters & x)
     74  std::ostream& operator<< (std::ostream& output_stream ,
     75                            morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::Parameters & x)
    7776  {
    7877    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit.cpp

    r60 r75  
    3434    ,_param            (param)
    3535    ,_usage            (usage)
    36 #ifdef STATISTICS
    37     ,_param_statistics (param_statistics)
    38 #endif
    3936  {
    4037    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
    4138
    4239    log_printf(INFO,Register_unit,FUNCTION,"Allocation");
    43     allocation ();
     40    allocation (
     41#ifdef STATISTICS
     42                param_statistics
     43#endif
     44                );
    4445
    4546#ifdef STATISTICS
     
    4748
    4849    // Allocation of statistics
    49     _stat = new Statistics (static_cast<string>(_name),
    50                             param_statistics          ,
    51                             param);
     50    statistics_declaration(param_statistics);
    5251#endif
    5352
     
    8483#ifdef STATISTICS
    8584    log_printf(INFO,Register_unit,FUNCTION,"Generate Statistics file");
    86 
    87     _stat->generate_file(statistics(0));
    8885    delete _stat;
    8986#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp

    r65 r75  
    1919#undef  FUNCTION
    2020#define FUNCTION "Register_unit::allocation"
    21   void Register_unit::allocation (void)
     21  void Register_unit::allocation (
     22#ifdef STATISTICS
     23                                  morpheo::behavioural::Parameters_Statistics * param_statistics
     24#else
     25                                  void
     26#endif
     27                                  )
    2228  {
    23     string rename, name_component;
    24 
    2529    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
    2630
     
    249253    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    250254
    251     string name;
     255    std::string name;
    252256     
    253257    component_gpr        = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine];
     
    263267          (name.c_str()
    264268#ifdef STATISTICS
    265            ,_param_statistics
     269           ,param_statistics
    266270#endif
    267271           ,_param->_param_gpr [i]
     
    283287          (name.c_str()
    284288#ifdef STATISTICS
    285            ,_param_statistics
     289           ,param_statistics
    286290#endif
    287291           ,_param->_param_gpr_status [i]
     
    303307          (name.c_str()
    304308#ifdef STATISTICS
    305            ,_param_statistics
     309           ,param_statistics
    306310#endif
    307311           ,_param->_param_spr [i]
     
    322326          (name.c_str()
    323327#ifdef STATISTICS
    324            ,_param_statistics
     328           ,param_statistics
    325329#endif
    326330           ,_param->_param_spr_status [i]
     
    343347      (name.c_str()
    344348#ifdef STATISTICS
    345        ,_param_statistics
     349       ,param_statistics
    346350#endif
    347351       ,_param->_param_glue
     
    358362     
    359363    // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    360 
     364    std::string name_component;
     365   
    361366    for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    362367      {
    363368        name_component = _name+"_gpr_"+toString(i);
    364369       
    365         cout << "Instance : " << name_component << endl;
     370        std::cout << "Instance : " << name_component << std::endl;
    366371       
    367372#ifdef POSITION
     
    420425          name_component = _name+"_gpr_status_"+toString(i);
    421426         
    422           cout << "Instance : " << name_component << endl;
     427          std::cout << "Instance : " << name_component << std::endl;
    423428         
    424429#ifdef POSITION
     
    544549        name_component = _name+"_spr_"+toString(i);
    545550       
    546         cout << "Instance : " << name_component << endl;
     551        std::cout << "Instance : " << name_component << std::endl;
    547552       
    548553#ifdef POSITION
     
    601606          name_component = _name+"_spr_status_"+toString(i);
    602607         
    603           cout << "Instance : " << name_component << endl;
     608          std::cout << "Instance : " << name_component << std::endl;
    604609         
    605610#ifdef POSITION
     
    724729      name_component = _name+"_glue";
    725730     
    726       cout << "Instance : " << name_component << endl;
     731      std::cout << "Instance : " << name_component << std::endl;
    727732     
    728733#ifdef POSITION
     
    10341039#endif
    10351040
    1036 //     cout << *_component << endl;
     1041//     std::cout << *_component << std::endl;
    10371042
    10381043    log_printf(FUNC,Register_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_end_cycle.cpp

    r60 r75  
    1 #ifdef VHDL_TESTBENCH
     1#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    22/*
    33 * $Id$
     
    1616namespace register_unit {
    1717
    18 
    1918#undef  FUNCTION
    20 #define FUNCTION "Register_unit::vhdl_testbench_transition"
    21   void Register_unit::vhdl_testbench_transition ()
     19#define FUNCTION "Register_unit::end_cycle"
     20void Register_unit::end_cycle ()
    2221  {
    2322    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
    2423
     24#ifdef STATISTICS
     25    _stat->end_cycle();
     26#endif   
     27
     28#ifdef VHDL_TESTBENCH
    2529    // Evaluation before read the ouput signal
    26 //     sc_start(0);
    27 
     30//  sc_start(0);
    2831    _interfaces->testbench();
     32#endif
    2933
    3034    log_printf(FUNC,Register_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_statistics_declaration.cpp

    r60 r75  
    1616namespace register_unit {
    1717
    18 
    1918#undef  FUNCTION
    20 #define FUNCTION "Register_unit::statistics"
    21   string Register_unit::statistics (uint32_t depth)
     19#define FUNCTION "Register_unit::statistics_declaration"
     20  void Register_unit::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics)
    2221  {
    2322    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
    2423
    25     string txt = _stat->print(depth);
    26    
     24    _stat = new Stat (static_cast<std::string>(_name),
     25                      "Register_unit",
     26                      param_statistics);
     27
     28    for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     29      {
     30        _stat->add_stat(component_gpr       [i]->_stat);
     31        _stat->add_stat(component_gpr_status[i]->_stat);
     32        _stat->add_stat(component_spr       [i]->_stat);
     33        _stat->add_stat(component_spr_status[i]->_stat);
     34      }
     35    _stat->add_stat(component_glue->_stat);
     36
    2737    log_printf(FUNC,Register_unit,FUNCTION,"End");
    28 
    29     return txt;
    3038  };
    3139
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_transition.cpp

    r60 r75  
    2424    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
    2525
    26 #ifdef STATISTICS
    27     _stat->add();
    28 #endif   
    29 
    30 #ifdef VHDL_TESTBENCH
    31     vhdl_testbench_transition ();
     26#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     27    end_cycle();
    3228#endif
    3329
Note: See TracChangeset for help on using the changeset viewer.