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/Shifter/src
Files:
4 deleted
6 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters_msg_error.cpp

    r2 r75  
    99#include "Behavioural/Generic/Shifter/include/Types.h"
    1010#include <sstream>
    11 using namespace std;
    1211
    1312namespace morpheo {
     
    1615namespace shifter {
    1716
    18   string Parameters::msg_error(void)
     17  std::string Parameters::msg_error(void)
    1918  {
    20     string msg = "";
     19    std::string msg = "";
    2120
    2221    if (_size_data < 2)
     
    4241      {
    4342        msg += "  - Incompatible parameters : internal_rotate have never carry (must be set at \"internal_logic\"\n";
    44         msg += "    * rotate                          : " + toString_rotate(_rotate) + "\n";
    45         msg += "    * carry                           : " + toString_carry (_carry ) + "\n";
     43        msg += "    * rotate                          : " + toString(_rotate) + "\n";
     44        msg += "    * carry                           : " + toString(_carry ) + "\n";
    4645      }   
    4746
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters_print.cpp

    r2 r75  
    77
    88#include "Behavioural/Generic/Shifter/include/Parameters.h"
    9 #include <sstream>
    10 using namespace std;
     9#include "Behavioural/include/XML.h"
    1110
    1211namespace morpheo                    {
     
    1615
    1716
    18   string Parameters::print (uint32_t depth)
     17  std::string Parameters::print (uint32_t depth)
    1918  {
    20     string tab = string(depth,'\t');
    21     ostringstream msg;
    22     msg << tab << "<shifter>" << endl
    23         << tab << "\t<size_data   value=\"" << _size_data   << "\" />" << endl
    24         << tab << "\t<nb_port     value=\"" << _nb_port     << "\" />" << endl
    25         << tab << "\t<shift_value value=\"" << _shift_value << "\" />" << endl
    26         << tab << "\t<rotate      value=\"" << toString_rotate    (_rotate   ) << "\" />" << endl
    27         << tab << "\t<direction   value=\"" << toString_direction (_direction) << "\" />" << endl
    28         << tab << "\t<carry       value=\"" << toString_carry     (_carry    ) << "\" />" << endl
    29         << tab << "\t<!-- port_completion is type bool : " << toString(_type_completion_bool) << " -->" << endl
    30         << tab << "</shifter>" << endl;
     19    XML xml ("shifter");
     20
     21    xml.balise_open("shifter");
     22    xml.singleton_begin("size_data  "); xml.attribut("value",toString(_size_data  )); xml.singleton_end();
     23    xml.singleton_begin("nb_port    "); xml.attribut("value",toString(_nb_port    )); xml.singleton_end();
     24    xml.singleton_begin("shift_value"); xml.attribut("value",toString(_shift_value)); xml.singleton_end();
     25    xml.singleton_begin("rotate     "); xml.attribut("value",toString(_rotate     )); xml.singleton_end();
     26    xml.singleton_begin("direction  "); xml.attribut("value",toString(_direction  )); xml.singleton_end();
     27    xml.singleton_begin("carry      "); xml.attribut("value",toString(_carry      )); xml.singleton_end();
    3128   
    32     return msg.str();
     29    return xml.get_body(depth);
    3330  };
    3431
    35   ostream& operator<< (ostream& output_stream ,
    36                        morpheo::behavioural::generic::shifter::Parameters & x)
     32  std::ostream& operator<< (std::ostream& output_stream ,
     33                            morpheo::behavioural::generic::shifter::Parameters & x)
    3734  {
    3835    output_stream << x.print(0);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter.cpp

    r66 r75  
    2020#endif
    2121#ifdef STATISTICS
    22                     ,morpheo::behavioural::Parameters_Statistics             param_statistics
     22                    ,morpheo::behavioural::Parameters_Statistics * param_statistics
    2323#endif
    2424                    ,morpheo::behavioural::generic::shifter::Parameters param ):
     
    3232#ifdef STATISTICS
    3333    // Allocation of statistics
    34     _stat = new Statistics (static_cast<string>(_name),
    35                             param_statistics          ,
    36                             param);
     34    statistics_declaration(param_statistics);
    3735#endif
    3836
     
    10199
    102100#ifdef STATISTICS
    103     _stat->generate_file(statistics(0));
    104    
    105101    delete _stat;
    106102#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_end_cycle.cpp

    r59 r75  
    1 #ifdef VHDL_TESTBENCH
     1#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    22/*
    33 * $Id$
     
    1414namespace shifter {
    1515
     16#undef  FUNCTION
     17#define FUNCTION "Shifter::end_cycle"
     18void Shifter::end_cycle ()
     19  {
     20    log_printf(FUNC,Shifter,FUNCTION,"Begin");
    1621
    17   void Shifter::vhdl_testbench_transition (void)
    18   {
    19 //     sc_start(0);
     22#ifdef STATISTICS
     23    _stat->end_cycle();
     24#endif   
    2025
     26#ifdef VHDL_TESTBENCH
     27    // Evaluation before read the ouput signal
     28//  sc_start(0);
    2129    _interfaces->testbench();
     30#endif
     31
     32    log_printf(FUNC,Shifter,FUNCTION,"End");
    2233  };
     34
    2335
    2436}; // end namespace shifter
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_genMealy_shift.cpp

    r44 r75  
    1111#include <bitset>
    1212
    13 using namespace std;
    1413namespace morpheo {
    1514namespace behavioural {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_statistics_declaration.cpp

    r59 r75  
    1414namespace shifter {
    1515
     16#undef  FUNCTION
     17#define FUNCTION "Shifter::statistics_declaration"
     18  void Shifter::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics)
     19  {
     20    log_printf(FUNC,Shifter,FUNCTION,"Begin");
    1621
    17   string Shifter::statistics (uint32_t depth)
    18   {
    19     return _stat->print(depth);
     22    _stat = new Stat (static_cast<std::string>(_name),
     23                      "Shifter",
     24                      param_statistics);
     25   
     26    log_printf(FUNC,Shifter,FUNCTION,"End");
    2027  };
    2128
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_transition.cpp

    r42 r75  
    1818  void Shifter::transition (void)
    1919  {
    20 #ifdef STATISTICS
    21     _stat->add();
    22 #endif   
    23 
    24 #ifdef VHDL_TESTBENCH
    25     vhdl_testbench_transition ();
     20#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     21    end_cycle ();
    2622#endif
    2723  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_body.cpp

    r42 r75  
    5050        for (uint32_t i=0; i<_param._nb_port; i++)
    5151          {
    52             string print_shifter_completion;
     52            std::string print_shifter_completion;
    5353           
    5454            if (_param._type_completion_bool == true)
     
    8383      {
    8484        vhdl->set_body ("out_SHIFTER_"+toString(i)+"_DATA       <=");
    85         string print_else = "    ";
     85        std::string print_else = "    ";
    8686
    8787        //-----[ Shift arithmetic Left ]---------------------------------------
     
    8989          {
    9090            bool   have_when  = false;
    91             string print_when = "";
    92             string print_and  = "";
     91            std::string print_when = "";
     92            std::string print_and  = "";
    9393           
    9494            if (_param._direction   == external_direction)
     
    120120          {
    121121            bool   have_when  = false;
    122             string print_when = "";
    123             string print_and  = "";
     122            std::string print_when = "";
     123            std::string print_and  = "";
    124124           
    125125            if (_param._direction   == external_direction)
     
    151151          {
    152152            bool   have_when  = false;
    153             string print_when = "";
    154             string print_and  = "";
     153            std::string print_when = "";
     154            std::string print_and  = "";
    155155           
    156156            if (_param._direction   == external_direction)
     
    175175              print_when = "when " + print_when;
    176176
    177             string print_expr_completion;
     177            std::string print_expr_completion;
    178178
    179179            if (_param._size_data_completion == 0)
     
    189189          {
    190190            bool   have_when  = false;
    191             string print_when = "";
    192             string print_and  = "";
     191            std::string print_when = "";
     192            std::string print_and  = "";
    193193           
    194194            if (_param._direction   == external_direction)
     
    213213              print_when = "when " + print_when;
    214214
    215             string print_expr_completion;
     215            std::string print_expr_completion;
    216216
    217217            if (_param._size_data_completion == 0)
     
    227227          {
    228228            bool   have_when  = false;
    229             string print_when = "";
    230             string print_and  = "";
     229            std::string print_when = "";
     230            std::string print_and  = "";
    231231           
    232232            if (_param._direction   == external_direction)
     
    253253          {
    254254            bool   have_when  = false;
    255             string print_when = "";
    256             string print_and  = "";
     255            std::string print_when = "";
     256            std::string print_and  = "";
    257257           
    258258            if (_param._direction   == external_direction)
Note: See TracChangeset for help on using the changeset viewer.