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/Generic/RegisterFile
Files:
10 deleted
26 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h

    r62 r75  
    3737  public : ~Parameters () ;
    3838
    39   public : string msg_error (void);
    40 
    41   public :        string   print      (uint32_t depth);
    42   public : friend ostream& operator<< (ostream& output_stream,
    43                                        morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters & x);
     39  public :        std::string   msg_error  (void);
     40  public :        std::string   print      (uint32_t depth);
     41  public : friend std::ostream& operator<< (std::ostream& output_stream,
     42                                            morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters & x);
    4443  };
    4544
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h

    r71 r75  
    1616#include "Common/include/ToString.h"
    1717#include <iostream>
    18 using namespace std;
    1918
    2019#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h"
     
    2827#endif
    2928#include "Behavioural/include/Usage.h"
    30 
    31 using namespace std;
    3229
    3330namespace morpheo                    {
     
    4643    // -----[ fields ]----------------------------------------------------
    4744    // Parameters
    48   protected : const string       _name;
     45  protected : const std::string       _name;
    4946  protected : const Parameters * _param;
    5047  private   : const Tusage_t     _usage;
    5148
    5249#ifdef STATISTICS
    53   private   : Stat                           * _stat;
     50  public    : Stat                           * _stat;
    5451   
    5552  private   : counter_t                      * _stat_nb_read;
     
    106103   sc_module_name                              name
    107104#else                                         
    108    string                                      name
     105   std::string                                      name
    109106#endif                                         
    110107#ifdef STATISTICS
     
    128125#ifdef STATISTICS
    129126  public  : void     statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
    130   public  : string   statistics_print          (uint32_t depth);
    131127#endif                                         
    132128
     
    137133#endif                                         
    138134                                               
     135#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    139136  private : void     end_cycle                 (void);
    140 
     137#endif
    141138  };
    142139
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/Parameters_msg_error.cpp

    r62 r75  
    1010#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h"
    1111#include <sstream>
    12 using namespace std;
    1312
    1413namespace morpheo                    {
     
    1817namespace registerfile_monolithic    {
    1918
    20   string Parameters::msg_error(void)
     19  std::string Parameters::msg_error(void)
    2120  {
    22     string msg = "";
     21    std::string msg = "";
    2322
    2423    if ((8*sizeof(Tdata_t)) < _size_word)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/Parameters_print.cpp

    r55 r75  
    88#include <stdint.h>
    99#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h"
    10 #include <sstream>
    11 using namespace std;
     10#include "Behavioural/include/XML.h"
    1211
    1312namespace morpheo                    {
     
    1716namespace registerfile_monolithic    {
    1817
    19   string Parameters::print (uint32_t depth)
     18  std::string Parameters::print (uint32_t depth)
    2019  {
    21     string tab = string(depth,'\t');
    22     ostringstream msg;
    23     msg << tab << "<registerfile_monolithic>" << endl
    24         << tab << "\t<nb_port_read       value=\"" << _nb_port_read       << "\" />" << endl
    25         << tab << "\t<nb_port_write      value=\"" << _nb_port_write      << "\" />" << endl
    26         << tab << "\t<nb_port_read_write value=\"" << _nb_port_read_write << "\" />" << endl
    27         << tab << "\t<nb_word            value=\"" << _nb_word            << "\" />" << endl
    28         << tab << "\t<size_word          value=\"" << _size_word          << "\" />" << endl
    29         << tab << "</registerfile_monolithic>" << endl;
    30    
    31     return msg.str();
     20    XML xml ("registerfile_monolithic");
     21
     22    xml.balise_open("registerfile_monolithic");
     23    xml.singleton_begin("nb_port_read      "); xml.attribut("value",toString(_nb_port_read      )); xml.singleton_end();
     24    xml.singleton_begin("nb_port_write     "); xml.attribut("value",toString(_nb_port_write     )); xml.singleton_end();
     25    xml.singleton_begin("nb_port_read_write"); xml.attribut("value",toString(_nb_port_read_write)); xml.singleton_end();
     26    xml.singleton_begin("nb_word           "); xml.attribut("value",toString(_nb_word           )); xml.singleton_end();
     27    xml.singleton_begin("size_word         "); xml.attribut("value",toString(_size_word         )); xml.singleton_end();
     28    xml.balise_close();
     29
     30    return xml.get_body(depth);
    3231  };
    3332
    34   ostream& operator<< (ostream& output_stream ,
    35                        morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters & x)
     33  std::ostream& operator<< (std::ostream& output_stream ,
     34                            morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters & x)
    3635  {
    3736    output_stream << x.print(0);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic.cpp

    r71 r75  
    1919   sc_module_name name,
    2020#else
    21    string name        ,
     21   std::string name        ,
    2222#endif
    2323#ifdef STATISTICS
     
    3737
    3838#ifdef STATISTICS
    39     statistics_declaration(param_statistics);
     39    if (_usage & USE_STATISTICS)
     40      statistics_declaration(param_statistics);
    4041#endif
    4142
     
    102103#ifdef STATISTICS
    103104    if (_usage & USE_STATISTICS)
    104       {
    105         delete _stat;
    106       }
     105      delete _stat;
    107106#endif
    108107
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_allocation.cpp

    r62 r75  
    124124    for (uint32_t i=0; i<_param->_nb_word; i++)
    125125      {
    126         string rename = "reg_DATA["  + toString(i) + "]";
     126        std::string rename = "reg_DATA["  + toString(i) + "]";
    127127        reg_DATA [i]  = new SC_REGISTER (Tdata_t) (rename.c_str());
    128128      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_end_cycle.cpp

    r71 r75  
     1#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    12/*
    23 * $Id$
     
    3738}; // end namespace behavioural         
    3839}; // end namespace morpheo             
     40#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_statistics_declaration.cpp

    r71 r75  
    1717  void RegisterFile_Monolithic::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics)
    1818  {
    19     _stat = new Stat (static_cast<string>(_name),
     19    _stat = new Stat (static_cast<std::string>(_name),
    2020                      "RegisterFile_Monolithic",
    2121                      param_statistics);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp

    r71 r75  
    7979#endif   
    8080
     81#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    8182    end_cycle();
    82 
     83#endif
    8384    log_printf(FUNC,RegisterFile,"transition","End");
    8485  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_body.cpp

    r62 r75  
    3838    for (uint32_t i = 0; i < _param->_nb_port_read; i++)
    3939      {
    40         string str_address;
     40        std::string str_address;
    4141        if (_param->_have_port_address)
    4242          str_address = "conv_integer(in_READ_"+toString(i)+"_ADDRESS)";
     
    4848    for (uint32_t i = 0; i < _param->_nb_port_read_write; i++)
    4949      {
    50         string str_address;
     50        std::string str_address;
    5151        if (_param->_have_port_address)
    5252          str_address = "conv_integer(in_READ_WRITE_"+toString(i)+"_ADDRESS)";
     
    6868    for (uint32_t i = 0; i < _param->_nb_port_write; i++)
    6969      {
    70         string str_address;
     70        std::string str_address;
    7171        if (_param->_have_port_address)
    7272          str_address = "conv_integer(in_WRITE_"+toString(i)+"_ADDRESS)";
     
    8080    for (uint32_t i = 0; i < _param->_nb_port_read_write; i++)
    8181      {
    82         string str_address;
     82        std::string str_address;
    8383        if (_param->_have_port_address)
    8484          str_address = "conv_integer(in_READ_WRITE_"+toString(i)+"_ADDRESS)";
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h

    r62 r75  
    1010
    1111#include "Common/include/Debug.h"
    12 #include "Common/include/FromString.h"
    1312#include "Behavioural/include/Parameters.h"
    1413#include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h"
     
    1615
    1716namespace morpheo {
    18   typedef enum {PARTIAL_CROSSBAR,
    19                 FULL_CROSSBAR   } Tcrossbar_t;
    20 
    21   template<> inline Tcrossbar_t fromString<Tcrossbar_t> (const std::string& x)
    22   {
    23     if ( (x.compare("0")                == 0) or
    24          (x.compare("PARTIAL_CROSSBAR") == 0))
    25       return PARTIAL_CROSSBAR;
    26     if ( (x.compare("1")                == 0) or
    27          (x.compare("FULL_CROSSBAR"   ) == 0))
    28       return FULL_CROSSBAR;
    29 
    30     throw (ErrorMorpheo ("<fromString> : Unknow string : \""+x+"\""));
    31   };
    32  
    33   template<> inline std::string toString<Tcrossbar_t>   (const Tcrossbar_t& x)
    34   {
    35     ostringstream out;
    36 
    37     if (x == PARTIAL_CROSSBAR)
    38       out << "PARTIAL_CROSSBAR";
    39     if (x == FULL_CROSSBAR)
    40       out << "FULL_CROSSBAR";
    41 
    42     return out.str();
    43   };
    44 
    4517namespace behavioural {
    4618namespace generic {
     
    9264  public : ~Parameters () ;
    9365
    94   public : string msg_error (void);
    95 
    96   public :        string   print      (uint32_t depth);
    97   public : friend ostream& operator<< (ostream& output_stream,
    98                                        morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters & x);
     66  public :        std::string   msg_error  (void);
     67  public :        std::string   print      (uint32_t depth);
     68  public : friend std::ostream& operator<< (std::ostream& output_stream,
     69                                            morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters & x);
    9970  };
    10071
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h

    r57 r75  
    2020#include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h"
    2121#ifdef STATISTICS
    22 #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Statistics.h"
     22#include "Behavioural/include/Stat.h"
    2323#endif
    2424#include "Behavioural/include/Component.h"
     
    2626#include "Behavioural/include/Vhdl.h"
    2727#endif
    28 
    29 using namespace std;
    3028
    3129namespace morpheo {
     
    4341    // -----[ fields ]----------------------------------------------------
    4442    // Parameters
    45   protected : const string       _name;
     43  protected : const std::string       _name;
    4644
    4745  protected : const Parameters * _param;
    48 //#ifdef STATISTICS
    49 //  protected : const morpheo::behavioural::Parameters_Statistics _param_statistics;
    50 //#endif
    5146
    5247#ifdef STATISTICS
    53   private   : Statistics                     * _stat;
     48  public    : Stat                           * _stat;
    5449#endif
    5550
     
    10095                                              sc_module_name                                name,
    10196#else                                         
    102                                               string                                        name,
     97                                              std::string                                   name,
    10398#endif                                         
    10499#ifdef STATISTICS
     
    113108  private : void     deallocation              (void);
    114109                                               
    115 //#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    116 
    117110  private : Taddress_t address_bank                 (Taddress_t address);
    118111  private : Taddress_t address_num_reg              (Taddress_t address);
     
    129122  public  : void     partial_crossbar_genMealy_read (void);
    130123  public  : void     partial_crossbar_genMealy_write(void);
    131 
    132 //#endif
    133124#endif                                         
    134 #ifdef STATISTICS
    135   public  : string   statistics                (uint32_t depth);
    136 #endif
    137125                                               
    138126#if VHDL                                       
     
    142130#endif                                         
    143131                                               
    144 #ifdef VHDL_TESTBENCH                         
    145   private : void     vhdl_testbench_transition (void);
     132#ifdef STATISTICS
     133  public  : void     statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
     134#endif
     135#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     136  private : void     end_cycle                 (void);
    146137#endif
    147138  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h

    r57 r75  
    1010
    1111#include "Behavioural/include/Types.h"
    12 
     12#include "Common/include/ToString.h"
     13#include "Common/include/FromString.h"
    1314namespace morpheo                    {
    1415namespace behavioural {
     
    2324}; // end namespace registerfile
    2425}; // end namespace generic
     26}; // end namespace behavioural
    2527
    26 }; // end namespace behavioural
     28  typedef enum {PARTIAL_CROSSBAR,
     29                FULL_CROSSBAR   } Tcrossbar_t;
     30
     31  template<> inline Tcrossbar_t fromString<Tcrossbar_t> (const std::string& x)
     32  {
     33    if ( (x.compare("0")                == 0) or
     34         (x.compare("PARTIAL_CROSSBAR") == 0))
     35      return PARTIAL_CROSSBAR;
     36    if ( (x.compare("1")                == 0) or
     37         (x.compare("FULL_CROSSBAR"   ) == 0))
     38      return FULL_CROSSBAR;
     39
     40    throw (ErrorMorpheo ("<fromString> : Unknow string : \""+x+"\""));
     41  };
     42 
     43  template<> inline std::string toString<Tcrossbar_t>   (const Tcrossbar_t& x)
     44  {
     45    std::ostringstream out;
     46
     47    if (x == PARTIAL_CROSSBAR)
     48      out << "PARTIAL_CROSSBAR";
     49    if (x == FULL_CROSSBAR)
     50      out << "FULL_CROSSBAR";
     51
     52    return out.str();
     53  };
     54
     55
    2756}; // end namespace morpheo             
    2857
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/Parameters_msg_error.cpp

    r53 r75  
    77
    88#include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h"
    9 #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h"
    10 #include <sstream>
    11 using namespace std;
    129
    1310namespace morpheo                    {
     
    1815
    1916
    20   string Parameters::msg_error(void)
     17  std::string Parameters::msg_error(void)
    2118  {
    2219    log_printf(FUNC,RegisterFile_Multi_Banked,"msg_error","Begin");
    2320
    24     string msg = "";
     21    std::string msg = "";
    2522
    2623    if (_nb_port_read < _nb_port_read_by_bank)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/Parameters_print.cpp

    r53 r75  
    88#include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h"
    99#include "Behavioural/include/XML.h"
    10 using namespace std;
    1110
    1211namespace morpheo                    {
     
    1716
    1817
    19   string Parameters::print (uint32_t depth)
     18  std::string Parameters::print (uint32_t depth)
    2019  {
    2120    log_printf(FUNC,RegisterFile_Multi_Banked,"print","Begin");
     
    4645  };
    4746
    48   ostream& operator<< (ostream& output_stream ,
    49                        morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters & x)
     47  std::ostream& operator<< (std::ostream& output_stream ,
     48                            morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters & x)
    5049  {
    5150    output_stream << x.print(0);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked.cpp

    r67 r75  
    2626                              _name              (name)
    2727                              ,_param            (param)
    28 // #ifdef STATISTICS
    29 //                            ,_param_statistics (param_statistics)
    30 // #endif
    3128  {
    3229    log_printf(FUNC,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Begin");
     
    4239
    4340    // Allocation of statistics
    44     _stat = new Statistics (static_cast<string>(_name),
    45                             param_statistics          ,
    46                             param);
     41    statistics_declaration(param_statistics);
    4742#endif
    4843
     
    142137#ifdef STATISTICS
    143138    log_printf(INFO,RegisterFile_Multi_Banked,"~RegisterFile_Multi_Banked","Generate Statistics file");
    144 
    145     _stat->generate_file(statistics(0));
    146139   
    147140    delete _stat;
     
    160153}; // end namespace registerfile
    161154}; // end namespace generic
    162 
    163155}; // end namespace behavioural
    164156}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_allocation.cpp

    r62 r75  
    1818  void RegisterFile_Multi_Banked::allocation (void)
    1919  {
    20     string rename;
    21 
    2220    log_printf(FUNC,RegisterFile_Multi_Banked,"allocation","Begin");
    2321
     
    2725                                              ,"RegisterFile_Multi_Banked"
    2826#ifdef POSITION
    29                                               ,Register
     27                                              ,REGISTER
    3028#endif
    3129                                              );
     
    106104        for (uint32_t j=0; j<_param->_nb_word; j++)
    107105          {
    108             string rename = "reg_DATA_"  + toString(i) + "_"  + toString(j);
     106            std::string rename = "reg_DATA_"  + toString(i) + "_"  + toString(j);
    109107            reg_DATA [i][j]  = new SC_REGISTER (Tdata_t) (rename.c_str());
    110108          }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_end_cycle.cpp

    r59 r75  
    1 #ifdef VHDL_TESTBENCH
     1#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     2
    23/*
    34 * $Id$
     
    1516namespace registerfile_multi_banked {
    1617
     18#undef  FUNCTION
     19#define FUNCTION "RegisterFile_Multi_Banked::end_cycle"
     20void RegisterFile_Multi_Banked::end_cycle ()
     21  {
     22    log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"Begin");
    1723
    18   void RegisterFile_Multi_Banked::vhdl_testbench_transition ()
    19   {
    20     log_printf(FUNC,RegisterFile_Multi_Banked,"vhdl_testbench_transition","Begin");
     24#ifdef STATISTICS
     25    _stat->end_cycle();
     26#endif   
    2127
     28#ifdef VHDL_TESTBENCH
    2229    // Evaluation before read the ouput signal
    23 //     sc_start(0);
     30//  sc_start(0);
     31    _interfaces->testbench();
     32#endif
    2433
    25     _interfaces->testbench();
    26 
    27     log_printf(FUNC,RegisterFile_Multi_Banked,"vhdl_testbench_transition","End");
     34    log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"End");
    2835  };
    2936
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_statistics_declaration.cpp

    r59 r75  
    1515namespace registerfile_multi_banked {
    1616
     17#undef  FUNCTION
     18#define FUNCTION "RegisterFile_Multi_Banked::statistics_declaration"
     19  void RegisterFile_Multi_Banked::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics)
     20  {
     21    log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"Begin");
    1722
    18   string RegisterFile_Multi_Banked::statistics (uint32_t depth)
    19   {
    20     log_printf(FUNC,RegisterFile_Multi_Banked,"statistics","Begin");
    21 
    22     string txt = _stat->print(depth);
     23    _stat = new Stat (static_cast<std::string>(_name),
     24                      "RegisterFile_Multi_Banked",
     25                      param_statistics);
    2326   
    24     log_printf(FUNC,RegisterFile_Multi_Banked,"statistics","End");
    25 
    26     return txt;
     27    log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"End");
    2728  };
    2829
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_transition.cpp

    r57 r75  
    3535      }
    3636
    37 #ifdef STATISTICS
    38     _stat->add();
    39 #endif   
    40 
    41 #ifdef VHDL_TESTBENCH
    42     vhdl_testbench_transition ();
     37#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     38    end_cycle();
    4339#endif
    4440
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_vhdl.cpp

    r57 r75  
    3939       ,_param->_size_word);
    4040   
    41     string bank_name = _name + "_bank";
     41    std::string bank_name = _name + "_bank";
    4242    bank = new morpheo::behavioural::generic::registerfile::registerfile_monolithic::RegisterFile_Monolithic
    4343      (bank_name.c_str()
     
    106106                         (nb_select_port_4 != nb_select_port_1) );
    107107
    108     string select_name1;
    109     string select_name2;
    110     string select_name3;
    111     string select_name4;
     108    std::string select_name1;
     109    std::string select_name2;
     110    std::string select_name3;
     111    std::string select_name4;
    112112   
    113113    if (have_select1)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_vhdl_body.cpp

    r62 r75  
    8585              {
    8686                uint32_t num_port  = (_param->_crossbar == FULL_CROSSBAR)?k:(_param->_nb_port_read_by_bank*k+j);
    87                 string   separator = ((k==0)?" ":",");
    88                 string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
     87                std::string   separator = ((k==0)?" ":",");
     88                std::string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
    8989
    9090                vhdl->set_body("\t"+separator+" in_VAL_"+toString(k)+"     \t=>\tinternal_READ_"+toString(i)+"_"+toString(num_port)+index+"_VAL");
     
    104104              {
    105105                uint32_t num_port  = (_param->_crossbar == FULL_CROSSBAR)?k:(_param->_nb_port_write_by_bank*k+j);
    106                 string   separator = ((k==0)?" ":",");
    107                 string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
     106                std::string   separator = ((k==0)?" ":",");
     107                std::string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
    108108               
    109109                vhdl->set_body("\t"+separator+" in_VAL_"+toString(k)+"     \t=>\tinternal_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL");
     
    130130              {
    131131                uint32_t num_port  = (_param->_crossbar == FULL_CROSSBAR)?k:(_param->_nb_port_read_by_bank*k+j);
    132                 string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
     132                std::string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
    133133                vhdl->set_body("\tor internal_SELECT_READ_"+toString(i)+"_"+toString(num_port)+index+"_VAL");
    134134              }
     
    143143              {
    144144                uint32_t num_port  = (_param->_crossbar == FULL_CROSSBAR)?k:(_param->_nb_port_write_by_bank*k+j);
    145                 string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
     145                std::string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
    146146
    147147                vhdl->set_body("\tor internal_SELECT_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL");
     
    168168              {
    169169                uint32_t num_port  = (_param->_crossbar == FULL_CROSSBAR)?k:(_param->_nb_port_read_by_bank*k+j);
    170                 string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
     170                std::string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
    171171                               
    172172                vhdl->set_body("\tin_READ_"+toString(num_port)+"_ADDRESS"+std_logic_range(_param->_size_address_by_bank)+"  when internal_SELECT_READ_"+toString(i)+"_"+toString(num_port)+index+"_VAL ='1' else");
     
    183183              {
    184184                uint32_t num_port  = (_param->_crossbar == FULL_CROSSBAR)?k:(_param->_nb_port_write_by_bank*k+j);
    185                 string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
     185                std::string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
    186186
    187187                vhdl->set_body("\tin_WRITE_"+toString(num_port)+"_ADDRESS"+std_logic_range(_param->_size_address_by_bank)+" when internal_SELECT_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL='1' else");
     
    207207              {
    208208                uint32_t num_port  = (_param->_crossbar == FULL_CROSSBAR)?k:(_param->_nb_port_write_by_bank*k+j);
    209                 string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
     209                std::string   index     = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";
    210210                vhdl->set_body("\tin_WRITE_"+toString(num_port)+"_DATA when internal_SELECT_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL='1' else");
    211211              }
     
    225225        for (uint32_t j=0; j<_param->_nb_port_read; j ++)
    226226          {
    227             string str_address;
     227            std::string str_address;
    228228
    229229            if (_param->_have_bank_port_address == true)
     
    236236        for (uint32_t j=0; j<_param->_nb_port_write; j ++)
    237237          {
    238             string str_address;
     238            std::string str_address;
    239239
    240240            if (_param->_have_port_address == true)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/Parameters.h

    r62 r75  
    4343  public : ~Parameters () ;
    4444
    45   public : string msg_error (void);
    46 
    47   public :        string   print      (uint32_t depth);
    48   public : friend ostream& operator<< (ostream& output_stream,
     45  public :        std::string   msg_error  (void);
     46  public :        std::string   print      (uint32_t depth);
     47  public : friend std::ostream& operator<< (std::ostream& output_stream,
    4948                                       morpheo::behavioural::generic::registerfile::Parameters & x);
    5049  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/RegisterFile.h

    r62 r75  
    2323#include "Behavioural/Generic/RegisterFile/include/Types.h"
    2424#ifdef STATISTICS
    25 #include "Behavioural/Generic/RegisterFile/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;
    3331
    3432namespace morpheo {
     
    4543    // -----[ fields ]----------------------------------------------------
    4644    // Parameters
    47   protected : const string       _name;
     45  protected : const std::string       _name;
    4846
    4947  protected : const Parameters * _param;
     48
    5049#ifdef STATISTICS
    51   protected : morpheo::behavioural::Parameters_Statistics * _param_statistics;
     50  public    : Stat                           * _stat;
    5251#endif
    5352
     
    8988  public  :          RegisterFile              (
    9089#ifdef SYSTEMC
    91                                               sc_module_name                              name,
     90                                                sc_module_name                              name,
    9291#else                                         
    93                                               string                                      name,
     92                                                std::string                                      name,
    9493#endif                                         
    9594#ifdef STATISTICS
    96                                               morpheo::behavioural::Parameters_Statistics * param_statistics,
     95                                                morpheo::behavioural::Parameters_Statistics * param_statistics,
    9796#endif
    98                                               Parameters                                  * param );
    99                                               
     97                                                Parameters                                  * param );
     98   
    10099  public  :          ~RegisterFile             (void);
    101100                                               
    102101#ifdef SYSTEMC                                 
    103   private : void     allocation                (void);
     102  private : void     allocation                (
     103#ifdef STATISTICS
     104                                                morpheo::behavioural::Parameters_Statistics * param_statistics
     105#else
     106                                                void
     107#endif
     108                                                );
    104109  private : void     deallocation              (void);
    105110#endif                                         
    106 
    107 #ifdef STATISTICS
    108   public  : string   statistics                (uint32_t depth);
    109 #endif
    110111  };
    111112
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/Parameters_msg_error.cpp

    r53 r75  
    99#include "Behavioural/Generic/RegisterFile/include/Types.h"
    1010#include <sstream>
    11 using namespace std;
    1211
    1312namespace morpheo                    {
     
    1716
    1817
    19   string Parameters::msg_error(void)
     18  std::string Parameters::msg_error(void)
    2019  {
    2120    log_printf(FUNC,RegisterFile,"msg_error","Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/Parameters_print.cpp

    r53 r75  
    88#include "Behavioural/Generic/RegisterFile/include/Parameters.h"
    99#include "Behavioural/include/XML.h"
    10 using namespace std;
    1110
    1211namespace morpheo                    {
     
    1615
    1716
    18   string Parameters::print (uint32_t depth)
     17  std::string Parameters::print (uint32_t depth)
    1918  {
    2019    log_printf(FUNC,RegisterFile,"print","Begin");
    2120
    22     string _return;
     21    std::string _return;
    2322
    2423    if (_instance == instance_RegisterFile_Monolithic)
     
    3231  };
    3332
    34   ostream& operator<< (ostream& output_stream ,
    35                        morpheo::behavioural::generic::registerfile::Parameters & x)
     33  std::ostream& operator<< (std::ostream& output_stream ,
     34                            morpheo::behavioural::generic::registerfile::Parameters & x)
    3635  {
    37     if (x._instance == instance_RegisterFile_Monolithic)
    38       output_stream << x._param_registerfile_monolithic  ->print(0);
    39     else
    40       output_stream << x._param_registerfile_multi_banked->print(0);
     36    output_stream << x.print(0);
    4137   
    4238    return output_stream;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile.cpp

    r62 r75  
    2525                              _name              (name)
    2626                              ,_param            (param)
    27 #ifdef STATISTICS
    28                               ,_param_statistics (param_statistics)
    29 #endif
    3027  {
    3128    log_printf(FUNC,RegisterFile,"RegisterFile","Begin");
     
    3431    log_printf(INFO,RegisterFile,"RegisterFile","Allocation");
    3532
    36     allocation ();
     33    allocation (
     34# ifdef STATISTICS
     35                param_statistics
     36# endif
     37                );
     38#endif
     39
     40#ifdef STATISTICS
     41    if (_param->_instance == instance_RegisterFile_Monolithic)
     42      _stat = component_RegisterFile_Monolithic  ->_stat;
     43    else
     44      _stat = component_RegisterFile_Multi_Banked->_stat;
    3745#endif
    3846
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_allocation.cpp

    r62 r75  
    1515
    1616
    17   void RegisterFile::allocation (void)
     17  void RegisterFile::allocation (
     18#ifdef STATISTICS
     19                                 morpheo::behavioural::Parameters_Statistics * param_statistics
     20#else
     21                                 void
     22#endif
     23                                 )
    1824  {
    19     string rename;
     25    std::string rename;
    2026
    2127    log_printf(FUNC,RegisterFile,"allocation","Begin");
     
    7884        component_RegisterFile_Monolithic  = new morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::RegisterFile_Monolithic  ::RegisterFile_Monolithic   (_name.c_str()
    7985#ifdef STATISTICS
    80                                                                                                                                                                                ,_param_statistics
     86                                                                                                                                                                               ,param_statistics
    8187#endif
    8288                                                                                                                                                                               ,_param->_param_registerfile_monolithic
     
    8995        component_RegisterFile_Multi_Banked = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::RegisterFile_Multi_Banked::RegisterFile_Multi_Banked (_name.c_str()
    9096#ifdef STATISTICS
    91                                                                                                                                                                                 ,_param_statistics
     97                                                                                                                                                                                ,param_statistics
    9298#endif
    9399                                                                                                                                                                                ,_param->_param_registerfile_multi_banked
Note: See TracChangeset for help on using the changeset viewer.