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/include
Files:
1 deleted
3 edited

Legend:

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

    r2 r75  
    4848  public : const bool        _have_direction_right         ;
    4949
    50     string toString_rotate    (rotate_t x)
    51     {
    52       switch (x)
    53         {
    54         case without_rotate            : return "without_rotate" ;
    55         case internal_rotate           : return "internal_rotate";
    56         case external_rotate           : return "external_rotate";     
    57         default                        : return "";
    58         }
    59     };
    60    
    61     string toString_direction (direction_t x)
    62     {
    63       switch (x)
    64         {
    65         case internal_right_shift      : return "internal_right_shift";
    66         case internal_left_shift       : return "internal_left_shift" ;
    67         case external_direction        : return "external_direction"  ;
    68         default                        : return "";
    69         }
    70     };
    71    
    72     string toString_carry (carry_t x)
    73     {
    74       switch (x)
    75         {
    76         case internal_logic            : return "internal_logic"       ;
    77         case internal_arithmetic       : return "internal_arithmetic"  ;
    78         case external_carry            : return "external_carry"       ;
    79         case external_completion       : return "external_completion"  ;
    80         default                        : return "";
    81         }
    82     };
    83    
    8450    //-----[ methods ]-----------------------------------------------------------
    8551  public : Parameters  (uint32_t    size_data           ,
     
    9359  public : ~Parameters () ;
    9460
    95   public : string msg_error (void);
    96 
    97   public :        string   print      (uint32_t depth);
    98   public : friend ostream& operator<< (ostream& output_stream,
    99                                        morpheo::behavioural::generic::shifter::Parameters & x);
     61  public :        std::string   msg_error  (void);
     62  public :        std::string   print      (uint32_t depth);
     63  public : friend std::ostream& operator<< (std::ostream& output_stream,
     64                                            morpheo::behavioural::generic::shifter::Parameters & x);
    10065  };
    10166
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Shifter.h

    r44 r75  
    1919#include "Behavioural/Generic/Shifter/include/Types.h"
    2020#ifdef STATISTICS
    21 #include "Behavioural/Generic/Shifter/include/Statistics.h"
     21#include "Behavioural/include/Stat.h"
    2222#endif
    2323#ifdef VHDL
     
    2525#endif
    2626#include "Behavioural/include/Component.h"
    27 
    28 using namespace std;
    2927
    3028namespace morpheo                    {
     
    4139    // -----[ fields ]----------------------------------------------------
    4240    // Parameters
    43   protected : const string     _name;
     41  protected : const std::string     _name;
    4442
    4543  protected : const Parameters _param;
    4644#ifdef STATISTICS
    47   private   : Statistics                     * _stat;
     45  public    : Stat                           * _stat;
    4846#endif
    4947
     
    7977  public  :          Shifter              (
    8078#ifdef SYSTEMC
    81                                            sc_module_name                              name,
     79                                           sc_module_name                                name,
    8280#else                                         
    83                                            string                                      name,
     81                                           std::string                                   name,
    8482#endif                                         
    8583#ifdef STATISTICS
    86                                            morpheo::behavioural::Parameters_Statistics param_statistics,
     84                                           morpheo::behavioural::Parameters_Statistics * param_statistics,
    8785#endif
    88                                            Parameters                                  param );
     86                                           Parameters                                    param );
    8987   
    9088  public  :          Shifter              (Parameters param );
     
    106104  private : void     vhdl_body                 (Vhdl * & vhdl);
    107105#endif                                         
     106
    108107#ifdef STATISTICS
    109   public  : string   statistics                (uint32_t depth);
     108  public  : void        statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
    110109#endif
    111                                                
    112 #ifdef VHDL_TESTBENCH                         
    113   private : void     vhdl_testbench_transition (void);
     110#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     111  private : void        end_cycle                 (void);
    114112#endif
    115 
    116113  };
    117114
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Types.h

    r44 r75  
    1 #ifdef SYSTEMC
    21#ifndef morpheo_behavioural_generic_shifter_Type_h
    32#define morpheo_behavioural_generic_shifter_Type_h
     
    109 */
    1110
    12 #include "Common/include/Types.h"
     11#include "Behavioural/include/Types.h"
     12#include "Common/include/ToString.h"
    1313
    1414namespace morpheo {
     
    4949}; // end namespace generic
    5050}; // end namespace behavioural
     51
     52  template<> inline std::string toString<morpheo::behavioural::generic::shifter::rotate_t>(const morpheo::behavioural::generic::shifter::rotate_t& x)
     53    {
     54      switch (x)
     55        {
     56        case morpheo::behavioural::generic::shifter::without_rotate            : return "without_rotate" ;
     57        case morpheo::behavioural::generic::shifter::internal_rotate           : return "internal_rotate";
     58        case morpheo::behavioural::generic::shifter::external_rotate           : return "external_rotate";     
     59        default                        : return "";
     60        }
     61    };
     62 
     63  template<> inline std::string toString<morpheo::behavioural::generic::shifter::direction_t>(const morpheo::behavioural::generic::shifter::direction_t& x)
     64  {
     65    switch (x)
     66      {
     67      case morpheo::behavioural::generic::shifter::internal_right_shift      : return "internal_right_shift";
     68      case morpheo::behavioural::generic::shifter::internal_left_shift       : return "internal_left_shift" ;
     69      case morpheo::behavioural::generic::shifter::external_direction        : return "external_direction"  ;
     70      default                        : return "";
     71      }
     72  };
     73 
     74  template<> inline std::string toString<morpheo::behavioural::generic::shifter::carry_t>(const morpheo::behavioural::generic::shifter::carry_t& x)
     75  {
     76    switch (x)
     77      {
     78      case morpheo::behavioural::generic::shifter::internal_logic            : return "internal_logic"       ;
     79      case morpheo::behavioural::generic::shifter::internal_arithmetic       : return "internal_arithmetic"  ;
     80      case morpheo::behavioural::generic::shifter::external_carry            : return "external_carry"       ;
     81      case morpheo::behavioural::generic::shifter::external_completion       : return "external_completion"  ;
     82      default                        : return "";
     83      }
     84  };
     85   
     86
    5187}; // end namespace morpheo             
    5288
    5389#endif
    54 #endif
Note: See TracChangeset for help on using the changeset viewer.