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/Multi_Read_unit/Read_unit
Files:
12 deleted
23 edited
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Parameters.h

    r68 r75  
    7777  public : ~Parameters () ;
    7878
    79   public : string msg_error (void);
     79  public : std::string          msg_error (void);
    8080
    81   public :        string   print      (uint32_t depth);
    82   public : friend ostream& operator<< (ostream& output_stream,
    83                                        morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters & x);
     81  public :        std::string   print      (uint32_t depth);
     82  public : friend std::ostream& operator<< (std::ostream& output_stream,
     83                                            morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters & x);
    8484  };
    8585
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Read_queue.h

    r66 r75  
    2121#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Parameters.h"
    2222#ifdef STATISTICS
    23 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Statistics.h"
     23#include "Behavioural/include/Stat.h"
    2424#endif
    2525#include "Behavioural/include/Component.h"
     
    2727#include "Behavioural/include/Vhdl.h"
    2828#endif
    29 
    30 using namespace std;
    3129
    3230namespace morpheo {
     
    6058  public    : Tspecial_address_t _num_reg_re   ;
    6159
    62     friend ostream& operator<< (ostream& output_stream,
     60    friend std::ostream& operator<< (std::ostream& output_stream,
    6361                                morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Tread_queue_entry_t & x)
    6462    {
    65       output_stream << " * _context_id    : " << toString(x._context_id   ) << endl
    66                     << " * _front_end_id  : " << toString(x._front_end_id ) << endl
    67                     << " * _ooo_engine_id : " << toString(x._ooo_engine_id) << endl
    68                     << " * _rob_id        : " << toString(x._rob_id       ) << endl
    69                     << " * _operation     : " << toString(x._operation    ) << endl
    70                     << " * _type          : " << toString(x._type         ) << endl
    71                     << " * _has_immediat  : " << toString(x._has_immediat ) << endl
    72                     << " * _immediat      : " << toString(x._immediat     ) << endl
    73                     << " * _read_ra       : " << toString(x._read_ra      ) << endl
    74                     << " * _num_reg_ra    : " << toString(x._num_reg_ra   ) << endl
    75                     << " * _read_rb       : " << toString(x._read_rb      ) << endl
    76                     << " * _num_reg_rb    : " << toString(x._num_reg_rb   ) << endl
    77                     << " * _read_rc       : " << toString(x._read_rc      ) << endl
    78                     << " * _num_reg_rc    : " << toString(x._num_reg_rc   ) << endl
    79                     << " * _write_rd      : " << toString(x._write_rd     ) << endl
    80                     << " * _num_reg_rd    : " << toString(x._num_reg_rd   ) << endl
    81                     << " * _write_re      : " << toString(x._write_re     ) << endl
    82                     << " * _num_reg_re    : " << toString(x._num_reg_re   ) << endl;
     63      output_stream << " * _context_id    : " << toString(x._context_id   ) << std::endl
     64                    << " * _front_end_id  : " << toString(x._front_end_id ) << std::endl
     65                    << " * _ooo_engine_id : " << toString(x._ooo_engine_id) << std::endl
     66                    << " * _rob_id        : " << toString(x._rob_id       ) << std::endl
     67                    << " * _operation     : " << toString(x._operation    ) << std::endl
     68                    << " * _type          : " << toString(x._type         ) << std::endl
     69                    << " * _has_immediat  : " << toString(x._has_immediat ) << std::endl
     70                    << " * _immediat      : " << toString(x._immediat     ) << std::endl
     71                    << " * _read_ra       : " << toString(x._read_ra      ) << std::endl
     72                    << " * _num_reg_ra    : " << toString(x._num_reg_ra   ) << std::endl
     73                    << " * _read_rb       : " << toString(x._read_rb      ) << std::endl
     74                    << " * _num_reg_rb    : " << toString(x._num_reg_rb   ) << std::endl
     75                    << " * _read_rc       : " << toString(x._read_rc      ) << std::endl
     76                    << " * _num_reg_rc    : " << toString(x._num_reg_rc   ) << std::endl
     77                    << " * _write_rd      : " << toString(x._write_rd     ) << std::endl
     78                    << " * _num_reg_rd    : " << toString(x._num_reg_rd   ) << std::endl
     79                    << " * _write_re      : " << toString(x._write_re     ) << std::endl
     80                    << " * _num_reg_re    : " << toString(x._num_reg_re   ) << std::endl;
    8381
    8482      return output_stream;
     
    156154    }
    157155
    158     friend ostream& operator<< (ostream& output_stream,
     156    friend std::ostream& operator<< (std::ostream& output_stream,
    159157                                morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Tread_queue_head_entry_t & x)
    160158    {
    161       output_stream << " * _context_id    : " << x._context_id   << endl
    162                     << " * _front_end_id  : " << x._front_end_id << endl
    163                     << " * _ooo_engine_id : " << x._ooo_engine_id<< endl
    164                     << " * _rob_id        : " << x._rob_id       << endl
    165                     << " * _operation     : " << x._operation    << endl
    166                     << " * _type          : " << x._type         << endl
    167                     << " * _has_immediat  : " << x._has_immediat << endl
    168                     << " * _immediat      : " << x._immediat     << endl
    169                     << " * _read_ra       : " << x._read_ra      << endl
    170                     << " * _read_ra_val   : " << x._read_ra_val  << endl
    171                     << " * _num_reg_ra    : " << x._num_reg_ra   << endl
    172                     << " * _data_ra_val   : " << x._data_ra_val  << endl
    173                     << " * _data_ra       : " << x._data_ra      << endl
    174                     << " * _read_rb       : " << x._read_rb      << endl
    175                     << " * _read_rb_val   : " << x._read_rb_val  << endl
    176                     << " * _num_reg_rb    : " << x._num_reg_rb   << endl
    177                     << " * _data_rb_val   : " << x._data_rb_val  << endl
    178                     << " * _data_rb       : " << x._data_rb      << endl
    179                     << " * _read_rc       : " << x._read_rc      << endl
    180                     << " * _read_rc_val   : " << x._read_rc_val  << endl
    181                     << " * _num_reg_rc    : " << x._num_reg_rc   << endl
    182                     << " * _data_rc_val   : " << x._data_rc_val  << endl
    183                     << " * _data_rc       : " << x._data_rc      << endl
    184                     << " * _write_rd      : " << x._write_rd     << endl
    185                     << " * _num_reg_rd    : " << x._num_reg_rd   << endl
    186                     << " * _write_re      : " << x._write_re     << endl
    187                     << " * _num_reg_re    : " << x._num_reg_re   << endl;
     159      output_stream << " * _context_id    : " << x._context_id   << std::endl
     160                    << " * _front_end_id  : " << x._front_end_id << std::endl
     161                    << " * _ooo_engine_id : " << x._ooo_engine_id<< std::endl
     162                    << " * _rob_id        : " << x._rob_id       << std::endl
     163                    << " * _operation     : " << x._operation    << std::endl
     164                    << " * _type          : " << x._type         << std::endl
     165                    << " * _has_immediat  : " << x._has_immediat << std::endl
     166                    << " * _immediat      : " << x._immediat     << std::endl
     167                    << " * _read_ra       : " << x._read_ra      << std::endl
     168                    << " * _read_ra_val   : " << x._read_ra_val  << std::endl
     169                    << " * _num_reg_ra    : " << x._num_reg_ra   << std::endl
     170                    << " * _data_ra_val   : " << x._data_ra_val  << std::endl
     171                    << " * _data_ra       : " << x._data_ra      << std::endl
     172                    << " * _read_rb       : " << x._read_rb      << std::endl
     173                    << " * _read_rb_val   : " << x._read_rb_val  << std::endl
     174                    << " * _num_reg_rb    : " << x._num_reg_rb   << std::endl
     175                    << " * _data_rb_val   : " << x._data_rb_val  << std::endl
     176                    << " * _data_rb       : " << x._data_rb      << std::endl
     177                    << " * _read_rc       : " << x._read_rc      << std::endl
     178                    << " * _read_rc_val   : " << x._read_rc_val  << std::endl
     179                    << " * _num_reg_rc    : " << x._num_reg_rc   << std::endl
     180                    << " * _data_rc_val   : " << x._data_rc_val  << std::endl
     181                    << " * _data_rc       : " << x._data_rc      << std::endl
     182                    << " * _write_rd      : " << x._write_rd     << std::endl
     183                    << " * _num_reg_rd    : " << x._num_reg_rd   << std::endl
     184                    << " * _write_re      : " << x._write_re     << std::endl
     185                    << " * _num_reg_re    : " << x._num_reg_re   << std::endl;
    188186
    189187      return output_stream;
     
    198196    // -----[ fields ]----------------------------------------------------
    199197    // Parameters
    200   protected : const string                     _name;
     198  protected : const std::string                _name;
    201199  protected : const Parameters               * _param;
    202200
    203201#ifdef STATISTICS
    204   private   : Statistics                     * _stat;
     202  public    : Stat                           * _stat;
    205203#endif
    206204
     
    302300    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    303301  protected : Tread_queue_head_entry_t       * _queue_head;
    304   protected : queue<Tread_queue_entry_t *>   * _queue;
     302  protected : std::queue<Tread_queue_entry_t *>   * _queue;
    305303
    306304    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    328326                                              sc_module_name                              name,
    329327#else                                         
    330                                               string                                      name,
     328                                              std::string                                 name,
    331329#endif                                         
    332330#ifdef STATISTICS
     
    349347#endif                                         
    350348#ifdef STATISTICS
    351   public  : string   statistics                (uint32_t depth);
     349  public  : void     statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
    352350#endif
    353351                                               
     
    357355  private : void     vhdl_body                 (Vhdl * & vhdl);
    358356#endif                                         
    359                                                
    360 #ifdef VHDL_TESTBENCH                         
    361   private : void     vhdl_testbench_transition (void);
     357                       
     358#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     359  private : void     end_cycle                (void);
    362360#endif
    363361  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Parameters_msg_error.cpp

    r68 r75  
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Parameters.h"
    99#include <sstream>
    10 using namespace std;
    1110
    1211namespace morpheo                    {
     
    2019
    2120
    22   string Parameters::msg_error(void)
     21  std::string Parameters::msg_error(void)
    2322  {
    2423    log_printf(FUNC,Read_queue,"msg_error","Begin");
    2524
    26     string msg = "";
     25    std::string msg = "";
    2726
    2827//     if (_size_queue < 2)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Parameters_print.cpp

    r66 r75  
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Parameters.h"
    99#include "Behavioural/include/XML.h"
    10 using namespace std;
    1110
    1211namespace morpheo                    {
     
    2019
    2120
    22   string Parameters::print (uint32_t depth)
     21  std::string Parameters::print (uint32_t depth)
    2322  {
    2423    log_printf(FUNC,Read_queue,"print","Begin");
     
    4746  };
    4847
    49   ostream& operator<< (ostream& output_stream ,
    50                        morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters & x)
     48  std::ostream& operator<< (std::ostream& output_stream ,
     49                            morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters & x)
    5150  {
    5251    output_stream << x.print(0);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue.cpp

    r68 r75  
    3939
    4040#ifdef STATISTICS
    41     log_printf(INFO,Read_queue,"Read_queue","Allocation of statistics");
    42 
    43     // Allocation of statistics
    44     _stat = new Statistics (static_cast<string>(_name),
    45                             param_statistics          ,
    46                             param);
     41    log_printf(INFO,Read_queue,FUNCTION,"Allocation of statistics");
     42   
     43    statistics_declaration(param_statistics);
    4744#endif
    4845
     
    217214    log_printf(INFO,Read_queue,"~Read_queue","Generate Statistics file");
    218215
    219     _stat->generate_file(statistics(0));
    220    
    221216    delete _stat;
    222217#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_allocation.cpp

    r68 r75  
    2121  void Read_queue::allocation (void)
    2222  {
    23     string rename;
    24 
    2523    log_printf(FUNC,Read_queue,"allocation","Begin");
    2624
     
    238236
    239237    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    240     _queue      = new queue<Tread_queue_entry_t *>;
     238    _queue      = new std::queue<Tread_queue_entry_t *>;
    241239    _queue_head = new Tread_queue_head_entry_t;
    242240
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_end_cycle.cpp

    r59 r75  
    1 #ifdef VHDL_TESTBENCH
     1#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    22/*
    33 * $Id$
     
    1919
    2020
    21   void Read_queue::vhdl_testbench_transition ()
     21  void Read_queue::end_cycle ()
    2222  {
    2323    log_printf(FUNC,Read_queue,"vhdl_testbench_transition","Begin");
    2424
     25#ifdef STATISTICS
     26    _stat->end_cycle();
     27#endif   
     28
     29#ifdef VHDL_TESTBENCH
    2530    // Evaluation before read the ouput signal
    26 //     sc_start(0);
    27 
     31//  sc_start(0);
    2832    _interfaces->testbench();
     33#endif
    2934
    3035    log_printf(FUNC,Read_queue,"vhdl_testbench_transition","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_statistics_declaration.cpp

    r59 r75  
    1818namespace read_queue {
    1919
     20#undef  FUNCTION
     21#define FUNCTION "Read_queue::statistics_declaration"
     22  void Read_queue::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics)
     23  {
     24    log_printf(FUNC,Read_queue,FUNCTION,"Begin");
    2025
    21   string Read_queue::statistics (uint32_t depth)
    22   {
    23     log_printf(FUNC,Read_queue,"statistics","Begin");
    24 
    25     string txt = _stat->print(depth);
     26    _stat = new Stat (static_cast<std::string>(_name),
     27                      "Read_queue",
     28                      param_statistics);
    2629   
    27     log_printf(FUNC,Read_queue,"statistics","End");
    28 
    29     return txt;
     30    log_printf(FUNC,Read_queue,FUNCTION,"End");
    3031  };
    3132
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_transition.cpp

    r68 r75  
    138138      }
    139139
    140 #ifdef STATISTICS
    141     _stat->add();
    142 #endif   
    143 
    144 #ifdef VHDL_TESTBENCH
    145     vhdl_testbench_transition ();
     140#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     141    end_cycle ();
    146142#endif
    147143
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_vhdl.cpp

    r68 r75  
    3535       );
    3636   
    37     string queue_name = _name + "_queue";
     37    std::string queue_name = _name + "_queue";
    3838    queue = new morpheo::behavioural::generic::queue::Queue
    3939      (queue_name.c_str()
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_vhdl_body.cpp

    r68 r75  
    208208      for (int32_t i=_param->_nb_gpr_write-1; i>=0 ; i--)
    209209        {
    210           string cmp;
     210          std::string cmp;
    211211         
    212212          if (_param->_have_port_ooo_engine_id)
     
    228228      for (int32_t i=_param->_nb_gpr_write-1; i>=0 ; i--)
    229229        {
    230           string cmp;
     230          std::string cmp;
    231231         
    232232          if (_param->_have_port_ooo_engine_id)
     
    248248      for (int32_t i=_param->_nb_spr_write-1; i>=0 ; i--)
    249249        {
    250           string cmp;
     250          std::string cmp;
    251251         
    252252          if (_param->_have_port_ooo_engine_id)
     
    278278      for (int32_t i=_param->_nb_gpr_write-1; i>=0 ; i--)
    279279        {
    280           string cmp;
     280          std::string cmp;
    281281       
    282282          if (_param->_have_port_ooo_engine_id)
     
    298298      for (int32_t i=_param->_nb_gpr_write-1; i>=0 ; i--)
    299299        {
    300           string cmp;
     300          std::string cmp;
    301301         
    302302          if (_param->_have_port_ooo_engine_id)
     
    318318      for (int32_t i=_param->_nb_spr_write-1; i>=0 ; i--)
    319319        {
    320           string cmp;
     320          std::string cmp;
    321321         
    322322          if (_param->_have_port_ooo_engine_id)
     
    343343      for (int32_t i=_param->_nb_gpr_write-1; i>=0 ; i--)
    344344        {
    345           string cmp;
     345          std::string cmp;
    346346       
    347347          if (_param->_have_port_ooo_engine_id)
     
    365365      for (int32_t i=_param->_nb_gpr_write-1; i>=0 ; i--)
    366366        {
    367           string cmp;
     367          std::string cmp;
    368368       
    369369          if (_param->_have_port_ooo_engine_id)
     
    387387      for (int32_t i=_param->_nb_spr_write-1; i>=0 ; i--)
    388388        {
    389           string cmp;
     389          std::string cmp;
    390390       
    391391          if (_param->_have_port_ooo_engine_id)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/configuration_multi_port_bypass_memory.cfg

    r71 r75  
    8832      32      +1      # size_general_data 
    992       2       +1      # size_special_data 
    10 256     256     *2      # nb_general_register
    11 32      32      +1      # nb_special_register
     1016      16      *2      # nb_general_register
     118       8       +1      # nb_special_register
    12128       8       +1      # nb_operation       
    13134       4       +1      # nb_type           
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/configuration_multi_port_bypass_write.cfg

    r71 r75  
    8832      32      +1      # size_general_data 
    992       2       +1      # size_special_data 
    10 256     256     *2      # nb_general_register
    11 32      32      +1      # nb_special_register
     1016      16      *2      # nb_general_register
     118       8       +1      # nb_special_register
    12128       8       +1      # nb_operation       
    13134       4       +1      # nb_type           
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/configuration_multi_port_retire2.cfg

    r71 r75  
    8832      32      +1      # size_general_data 
    992       2       +1      # size_special_data 
    10 256     256     *2      # nb_general_register
    11 32      32      +1      # nb_special_register
     1018      16      *2      # nb_general_register
     118       8       +1      # nb_special_register
    12128       8       +1      # nb_operation       
    13134       4       +1      # nb_type           
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/configuration_multi_port_retire4.cfg

    r71 r75  
    8832      32      +1      # size_general_data 
    992       2       +1      # size_special_data 
    10 256     256     *2      # nb_general_register
    11 32      32      +1      # nb_special_register
     1016      16      *2      # nb_general_register
     118       8       +1      # nb_special_register
    12128       8       +1      # nb_operation       
    13134       4       +1      # nb_type           
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/configuration_multi_port_write.cfg

    r71 r75  
    8832      32      +1      # size_general_data 
    992       2       +1      # size_special_data 
    10 256     256     *2      # nb_general_register
    11 32      32      +1      # nb_special_register
     1016      16      *2      # nb_general_register
     118       8       +1      # nb_special_register
    12128       8       +1      # nb_operation       
    13134       4       +1      # nb_type           
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/src/test.cpp

    r69 r75  
    99#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/include/test.h"
    1010#include "Common/include/Test.h"
     11#include "Common/include/BitManipulation.h"
    1112
    1213#define NB_ITERATION  2
     
    368369            {
    369370              _gpr_val      [i][j] = ((rand()%100) < percent_registerfile_valid);
    370               _gpr          [i][j] = rand()%((1<<_param->_size_general_data)-1);
     371              _gpr          [i][j] = range<Tgeneral_data_t>(rand(),_param->_size_general_data);
    371372            }
    372373          for (uint32_t i=0; i<_param->_nb_special_register; i++)
    373374            {
    374375              _spr_val      [i][j] = ((rand()%100) < percent_registerfile_valid);
    375               _spr          [i][j] = rand()%(1<<_param->_size_special_data);
     376              _spr          [i][j] = range<Tspecial_data_t>(rand(),_param->_size_special_data);
    376377            }
    377378        }
     
    479480              Tcontext_t         ooo_engine = rand()% _param->_nb_ooo_engine;
    480481              Tcontrol_t         val     = (_gpr_val [num_reg][ooo_engine]== 0)?((rand()%100) < percent_transaction_registerfile):0;
    481               Tgeneral_data_t    data    = rand()%((1<<_param->_size_general_data)-1);
     482              Tgeneral_data_t    data    = range<Tgeneral_data_t>(rand(),_param->_size_general_data);
    482483           
    483484              val = (val and can_gpr_use [ooo_engine][num_reg] and need_gpr [ooo_engine][num_reg]);
     
    505506              Tcontext_t         ooo_engine = rand()% _param->_nb_ooo_engine;
    506507              Tcontrol_t         val     = (_spr_val [num_reg][ooo_engine]== 0)?((rand()%100) < percent_transaction_registerfile):0;
    507               Tspecial_data_t    data    = rand()%(1<<_param->_size_special_data);
     508              Tspecial_data_t    data    = range<Tspecial_data_t>(rand(),_param->_size_special_data);
    508509
    509510              val = (val and can_spr_use [ooo_engine][num_reg] and need_spr[ooo_engine][num_reg]);
     
    534535              Tgeneral_address_t gpr_num_reg = rand()% _param->_nb_general_register;
    535536              Tcontrol_t         gpr_val     = (_gpr_val [gpr_num_reg][ooo_engine]== 0)?((rand()%100) < percent_transaction_bypass):0;
    536               Tgeneral_data_t    gpr_data    = rand()%((1<<_param->_size_general_data)-1);
     537              Tgeneral_data_t    gpr_data    = range<Tgeneral_data_t>(rand(),_param->_size_general_data);
    537538             
    538539              gpr_val = (gpr_val and can_gpr_use [ooo_engine][gpr_num_reg] and need_gpr[ooo_engine][gpr_num_reg]);
     
    554555              Tspecial_address_t spr_num_reg = rand()% _param->_nb_special_register;
    555556              Tcontrol_t         spr_val     = (_spr_val [spr_num_reg][ooo_engine]== 0)?((rand()%100) < percent_transaction_bypass):0;
    556               Tspecial_data_t    spr_data    = rand()%(1<<_param->_size_special_data);
     557              Tspecial_data_t    spr_data    = range<Tspecial_data_t>(rand(),_param->_size_special_data);
    557558             
    558559              spr_val = (spr_val and can_spr_use [ooo_engine][spr_num_reg] and need_spr[ooo_engine][spr_num_reg]);
     
    582583              Tgeneral_address_t num_reg = rand()% _param->_nb_general_register;
    583584              Tcontrol_t         val     = (_gpr_val [num_reg][ooo_engine]== 0)?((rand()%100) < percent_transaction_bypass):0;
    584               Tgeneral_data_t    data    = rand()%((1<<_param->_size_general_data)-1);
     585              Tgeneral_data_t    data    = range<Tgeneral_data_t>(rand(),_param->_size_general_data);
    585586             
    586587              val = (val and can_gpr_use [ooo_engine][num_reg] and need_gpr [ooo_engine][num_reg]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Parameters.h

    r69 r75  
    8585  public : ~Parameters () ;
    8686
    87   public : string msg_error (void);
     87  public :        std::string   msg_error (void);
    8888
    89   public :        string   print      (uint32_t depth);
    90   public : friend ostream& operator<< (ostream& output_stream,
    91                                        morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters & x);
     89  public :        std::string   print      (uint32_t depth);
     90  public : friend std::ostream& operator<< (std::ostream& output_stream,
     91                                            morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters & x);
    9292  };
    9393
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Reservation_station.h

    r69 r75  
    2323#include "Behavioural/include/Types.h"
    2424#ifdef STATISTICS
    25 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Statistics.h"
     25#include "Behavioural/include/Stat.h"
    2626#endif
    2727#include "Behavioural/include/Component.h"
     
    2929#include "Behavioural/include/Vhdl.h"
    3030#endif
    31 
    32 using namespace std;
    33 using namespace morpheo::behavioural::generic::queue_control;
    3431
    3532namespace morpheo {
     
    6966  public    : Tspecial_address_t _num_reg_re  ;
    7067
    71     friend ostream& operator<< (ostream& output_stream,
     68    friend std::ostream& operator<< (std::ostream& output_stream,
    7269                                morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Treservation_station_entry_t & x)
    7370    {
    74       output_stream << " * _context_id     : " << toString(x._context_id     ) << endl
    75                     << " * _front_end_id   : " << toString(x._front_end_id   ) << endl
    76                     << " * _ooo_engine_id  : " << toString(x._ooo_engine_id  ) << endl
    77                     << " * _rob_id         : " << toString(x._rob_id         ) << endl
    78                     << " * _operation      : " << toString(x._operation      ) << endl
    79                     << " * _type           : " << toString(x._type           ) << endl
    80                     << " * _has_immediat   : " << toString(x._has_immediat   ) << endl
    81                     << " * _immediat       : " << toString(x._immediat       ) << endl
    82 //                  << " * _read_ra        : " << toString(x._read_ra        ) << endl
    83                     << " * _num_reg_ra     : " << toString(x._num_reg_ra     ) << endl
    84                     << " * _data_ra_val    : " << toString(x._data_ra_val    ) << endl
    85                     << " * _data_ra        : " << toString(x._data_ra        ) << endl
    86 //                  << " * _read_rb        : " << toString(x._read_rb        ) << endl
    87                     << " * _num_reg_rb     : " << toString(x._num_reg_rb     ) << endl
    88                     << " * _data_rb_val    : " << toString(x._data_rb_val    ) << endl
    89                     << " * _data_rb        : " << toString(x._data_rb        ) << endl
    90 //                  << " * _read_rc        : " << toString(x._read_rc        ) << endl
    91                     << " * _num_reg_rc     : " << toString(x._num_reg_rc     ) << endl
    92                     << " * _data_rc_val    : " << toString(x._data_rc_val    ) << endl
    93                     << " * _data_rc        : " << toString(x._data_rc        ) << endl
    94                     << " * _write_rd       : " << toString(x._write_rd       ) << endl
    95                     << " * _num_reg_rd     : " << toString(x._num_reg_rd     ) << endl
    96                     << " * _write_re       : " << toString(x._write_re       ) << endl
    97                     << " * _num_reg_re     : " << toString(x._num_reg_re     ) << endl;
     71      output_stream << " * _context_id     : " << toString(x._context_id     ) << std::endl
     72                    << " * _front_end_id   : " << toString(x._front_end_id   ) << std::endl
     73                    << " * _ooo_engine_id  : " << toString(x._ooo_engine_id  ) << std::endl
     74                    << " * _rob_id         : " << toString(x._rob_id         ) << std::endl
     75                    << " * _operation      : " << toString(x._operation      ) << std::endl
     76                    << " * _type           : " << toString(x._type           ) << std::endl
     77                    << " * _has_immediat   : " << toString(x._has_immediat   ) << std::endl
     78                    << " * _immediat       : " << toString(x._immediat       ) << std::endl
     79//                  << " * _read_ra        : " << toString(x._read_ra        ) << std::endl
     80                    << " * _num_reg_ra     : " << toString(x._num_reg_ra     ) << std::endl
     81                    << " * _data_ra_val    : " << toString(x._data_ra_val    ) << std::endl
     82                    << " * _data_ra        : " << toString(x._data_ra        ) << std::endl
     83//                  << " * _read_rb        : " << toString(x._read_rb        ) << std::endl
     84                    << " * _num_reg_rb     : " << toString(x._num_reg_rb     ) << std::endl
     85                    << " * _data_rb_val    : " << toString(x._data_rb_val    ) << std::endl
     86                    << " * _data_rb        : " << toString(x._data_rb        ) << std::endl
     87//                  << " * _read_rc        : " << toString(x._read_rc        ) << std::endl
     88                    << " * _num_reg_rc     : " << toString(x._num_reg_rc     ) << std::endl
     89                    << " * _data_rc_val    : " << toString(x._data_rc_val    ) << std::endl
     90                    << " * _data_rc        : " << toString(x._data_rc        ) << std::endl
     91                    << " * _write_rd       : " << toString(x._write_rd       ) << std::endl
     92                    << " * _num_reg_rd     : " << toString(x._num_reg_rd     ) << std::endl
     93                    << " * _write_re       : " << toString(x._write_re       ) << std::endl
     94                    << " * _num_reg_re     : " << toString(x._num_reg_re     ) << std::endl;
    9895
    9996      return output_stream;
     
    109106    // -----[ fields ]----------------------------------------------------
    110107    // Parameters
    111   protected : const string       _name;
     108  protected : const std::string       _name;
    112109
    113110  protected : const Parameters * _param;
    114 //#ifdef STATISTICS
    115 //  protected : const morpheo::behavioural::Parameters_Statistics * _param_statistics;
    116 //#endif
    117 
    118 #ifdef STATISTICS
    119   private   : Statistics                     * _stat;
     111
     112#ifdef STATISTICS
     113  public    : Stat                           * _stat;
    120114#endif
    121115
     
    233227  public  :          Reservation_station              (
    234228#ifdef SYSTEMC
    235                                               sc_module_name                                name,
     229                                                       sc_module_name                                name,
    236230#else                                         
    237                                               string                                        name,
     231                                                       string                                        name,
    238232#endif                                         
    239233#ifdef STATISTICS
    240                                               morpheo::behavioural::Parameters_Statistics * param_statistics,
    241 #endif
    242                                               Parameters                                  * param );
     234                                                       morpheo::behavioural::Parameters_Statistics * param_statistics,
     235#endif
     236                                                       Parameters                                  * param );
    243237  public  :          ~Reservation_station             (void);
    244238                                               
     
    250244  public  : void     genMoore                  (void);
    251245#endif                                         
    252 #ifdef STATISTICS
    253   public  : string   statistics                (uint32_t depth);
     246
     247#ifdef STATISTICS
     248  public  : void     statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
    254249#endif
    255250                                               
     
    260255#endif                                         
    261256                                               
     257#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    262258  private : void     end_cycle                 (void);
     259#endif
    263260  };
    264261
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Parameters_msg_error.cpp

    r69 r75  
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Parameters.h"
    99#include <sstream>
    10 using namespace std;
    1110
    1211namespace morpheo                    {
     
    2221#undef  FUNCTION
    2322#define FUNCTION "Reservation_station::msg_error"
    24   string Parameters::msg_error(void)
     23  std::string Parameters::msg_error(void)
    2524  {
    2625    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
    2726
    28     string msg = "";
     27    std::string msg = "";
    2928
    3029//     if (_size_queue < 2)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Parameters_print.cpp

    r69 r75  
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Parameters.h"
    99#include "Behavioural/include/XML.h"
    10 using namespace std;
    1110
    1211namespace morpheo                    {
     
    2221#undef  FUNCTION
    2322#define FUNCTION "Reservation_station::print"
    24   string Parameters::print (uint32_t depth)
     23  std::string Parameters::print (uint32_t depth)
    2524  {
    2625    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
     
    5453#undef  FUNCTION
    5554#define FUNCTION "Reservation_station::operator<<"
    56   ostream& operator<< (ostream& output_stream ,
    57                        morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters & x)
     55  std::ostream& operator<< (std::ostream& output_stream ,
     56                            morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters & x)
    5857  {
    5958    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station.cpp

    r55 r75  
    3131                              _name              (name)
    3232                              ,_param            (param)
    33 // #ifdef STATISTICS
    34 //                            ,_param_statistics (param_statistics)
    35 // #endif
    3633  {
    3734    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
     
    4643    log_printf(INFO,Reservation_station,FUNCTION,"Allocation of statistics");
    4744
    48     // Allocation of statistics
    49     _stat = new Statistics (static_cast<string>(_name),
    50                             param_statistics          ,
    51                             param);
     45    statistics_declaration(param_statistics);
    5246#endif
    5347
     
    9589    log_printf(INFO,Reservation_station,FUNCTION,"Generate Statistics file");
    9690
    97     _stat->generate_file(statistics(0));
    98    
    9991    delete _stat;
    10092#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_allocation.cpp

    r69 r75  
    2424  void Reservation_station::allocation (void)
    2525  {
    26     string rename;
    27 
    2826    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
    2927
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_end_cycle.cpp

    r69 r75  
     1#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    12/*
    23 * $Id$
     
    2526
    2627#ifdef STATISTICS
    27     _stat->add();
     28    _stat->end_cycle();
    2829#endif   
    2930
     
    4546}; // end namespace behavioural
    4647}; // end namespace morpheo             
     48#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_statistics_declaration.cpp

    r59 r75  
    1818namespace reservation_station {
    1919
    20 
    2120#undef  FUNCTION
    22 #define FUNCTION "Reservation_station::statistics"
    23   string Reservation_station::statistics (uint32_t depth)
     21#define FUNCTION "Reservation_station::statistics_declaration"
     22  void Reservation_station::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics)
    2423  {
    2524    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
    2625
    27     string txt = _stat->print(depth);
     26    _stat = new Stat (static_cast<std::string>(_name),
     27                      "Reservation_station",
     28                      param_statistics);
    2829   
    2930    log_printf(FUNC,Reservation_station,FUNCTION,"End");
    30 
    31     return txt;
    3231  };
    3332
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_vhdl_body.cpp

    r70 r75  
    2222  void Reservation_station::vhdl_body (Vhdl * & vhdl)
    2323  {
    24     string range_retire, range_insert;
     24    std::string range_retire, range_insert;
    2525
    2626    if (_param->_size_queue == 1)
Note: See TracChangeset for help on using the changeset viewer.