Ignore:
Timestamp:
May 1, 2008, 6:48:45 PM (16 years ago)
Author:
rosiere
Message:
  • support locale (now must "just" translate)
  • update all component with new test format
  • update all component with usage
  • New component : decod queue and prediction_unit
Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
Files:
40 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp

    r81 r82  
    88
    99#define NB_ITERATION 1024
     10#define CYCLE_MAX    1024*NB_ITERATION
    1011
    1112#include "Behavioural/Generic/Counter/SelfTest/include/test.h"
     
    4041                                    param_stat,
    4142#endif
    42                                     param);
     43                                    param,
     44                                    USE_ALL);
    4345 
    4446#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h

    r81 r82  
    2626#endif
    2727#include "Behavioural/include/Component.h"
     28#include "Behavioural/include/Usage.h"
    2829
    2930namespace morpheo {
     
    3940    // -----[ fields ]----------------------------------------------------
    4041    // Parameters
    41   protected : const std::string     _name;
    42 
    43   protected : const Parameters _param;
     42  protected : const std::string _name;
     43  protected : const Parameters  _param;
     44  private   : const Tusage_t    _usage;
    4445
    4546#ifdef STATISTICS
     
    7879                                           morpheo::behavioural::Parameters_Statistics * param_statistics,
    7980#endif
    80                                            Parameters                                  param );
     81                                           Parameters param,
     82                                           Tusage_t   usage);
    8183                                               
    8284  public  :          Counter              (Parameters param );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter.cpp

    r81 r82  
    1414
    1515
     16  Counter::Counter
     17  (
    1618#ifdef SYSTEMC
    17   Counter::Counter (sc_module_name name,
     19  sc_module_name name,
    1820#else
    19   Counter::Counter (string name,
     21  std::string name,
    2022#endif
    2123#ifdef STATISTICS
    22                               morpheo::behavioural::Parameters_Statistics * param_statistics,
     24  morpheo::behavioural::Parameters_Statistics * param_statistics,
    2325#endif
    24                               morpheo::behavioural::generic::counter::Parameters param ):
    25                               _name              (name)
    26                               ,_param            (param)
     26  morpheo::behavioural::generic::counter::Parameters param,
     27   Tusage_t usage):
     28    _name  (name),
     29    _param (param),
     30    _usage (usage)
    2731  {
    2832    log_printf(FUNC,Counter,"Counter","Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp

    r81 r82  
    1414namespace counter {
    1515
    16 
    1716  void Counter::allocation (void)
    1817  {
    1918    log_printf(FUNC,Counter,"allocation","Begin");
    2019
    21     _component   = new Component ();
     20    _component   = new Component (_usage);
    2221
    2322    Entity * entity = _component->set_entity (_name     
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
    9 #include "Behavioural/Generic/Queue/SelfTest/include/test.h"
    10 #include "Common/include/Test.h"
    11 
    129#define NB_ITERATION  1
    1310#define CYCLE_MAX     (2048*NB_ITERATION)
    1411
    15 #define LABEL(str)                                                                       \
    16 {                                                                                        \
    17   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
    18 } while(0)
    19 
    20 static uint32_t cycle = 0;
    21 
    22 #define SC_START(cycle_offset)                                          \
    23 do                                                                      \
    24 {                                                                       \
    25 /*cout << "SC_START (begin)" << endl;*/                                 \
    26                                                                         \
    27   uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
    28   if (cycle_current != cycle)                                           \
    29     {                                                                   \
    30       cycle = cycle_current;                                            \
    31       cout << "##########[ cycle "<< cycle << " ]" << endl;             \
    32     }                                                                   \
    33                                                                         \
    34   if (cycle_current > CYCLE_MAX)                                        \
    35     {                                                                   \
    36       TEST_KO("Maximal cycles Reached");                                \
    37     }                                                                   \
    38   sc_start(cycle_offset);                                               \
    39 /*cout << "SC_START (end  )" << endl;*/                                 \
    40 } while(0)
     12#include "Behavioural/Generic/Queue/SelfTest/include/test.h"
     13#include "Common/include/Test.h"
    4114
    4215void test (string name,
     
    4922#endif
    5023
    51   Queue * _Queue = new Queue (name.c_str(),
     24  Queue * _Queue = new Queue
     25    (name.c_str(),
    5226#ifdef STATISTICS
    53                                              _parameters_statistics,
     27     _parameters_statistics,
    5428#endif
    55                                              _param);
     29     _param,
     30     USE_ALL);
    5631 
    5732#ifdef SYSTEMC
     
    12196  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    12297    {
    123       LABEL("Iteration "+toString(iteration));
     98      LABEL("Iteration %d",iteration);
    12499
    125100      while (data_out <= nb_request)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/include/Queue.h

    r81 r82  
    102102#endif
    103103   Parameters                                  * param,
    104    morpheo::behavioural::Tusage_t                usage=USE_ALL
     104   morpheo::behavioural::Tusage_t                usage
    105105   );
    106106  public  :          ~Queue             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp

    r81 r82  
    88
    99#define NB_ITERATION 16
    10 
     10#define CYCLE_MAX    1024*NB_ITERATION
    1111#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/include/test.h"
    1212#include "Common/include/Test.h"
     
    3636  morpheo::behavioural::Parameters_Statistics * _param_stat = new morpheo::behavioural::Parameters_Statistics (5,100);
    3737#endif
    38   RegisterFile_Monolithic * registerfile = new RegisterFile_Monolithic (name.c_str()
     38  RegisterFile_Monolithic * registerfile = new RegisterFile_Monolithic
     39    (name.c_str()
    3940#ifdef STATISTICS
    40                                                                         ,_param_stat
     41     ,_param_stat
    4142#endif
    42                                                                         ,_param);
     43     ,_param
     44     ,USE_ALL);
    4345 
    4446#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h

    r81 r82  
    105105#endif
    106106   ,Parameters                                  * param
    107    ,morpheo::behavioural::Tusage_t                usage=USE_ALL
     107   ,morpheo::behavioural::Tusage_t                usage
    108108   );
    109109
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h

    r81 r82  
    1717namespace registerfile_monolithic    {
    1818
    19   typedef uint32_t Taddress_t;
     19//   typedef uint32_t Taddress_t;
    2020  typedef uint32_t Tdata_t;
    2121 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/src/test.cpp

    r81 r82  
    1313#include "Common/include/Test.h"
    1414
    15 
    16 #define LABEL(str)                                                                       \
    17 {                                                                                        \
    18   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
    19 } while(0)
    20 
    21 #define SC_START(cycle)                                        \
    22 do                                                             \
    23 {                                                              \
    24   if (static_cast<uint32_t>(sc_simulation_time()) > CYCLE_MAX) \
    25     {                                                          \
    26       TEST_KO("Maximal cycles Reached");                       \
    27     }                                                          \
    28   sc_start(cycle);                                             \
    29 } while(0)
    30 
    3115void test (string name,
    3216           morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * _param)
     
    3923#endif
    4024
    41   RegisterFile_Multi_Banked * _RegisterFile_Multi_Banked = new RegisterFile_Multi_Banked (name.c_str(),
     25  RegisterFile_Multi_Banked * _RegisterFile_Multi_Banked = new RegisterFile_Multi_Banked
     26    (name.c_str(),
    4227#ifdef STATISTICS
    43                                                                                           _param_stat,
     28     _param_stat,
    4429#endif
    45                                                                                           _param);
     30     _param,
     31     USE_ALL);
    4632 
    4733#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h

    r81 r82  
    2626#include "Behavioural/include/Vhdl.h"
    2727#endif
     28#include "Behavioural/include/Usage.h"
    2829
    2930namespace morpheo {
     
    4142    // -----[ fields ]----------------------------------------------------
    4243    // Parameters
    43   protected : const std::string       _name;
    44 
     44  protected : const std::string  _name;
    4545  protected : const Parameters * _param;
    46 
     46  private   : const Tusage_t     _usage;
     47   
    4748#ifdef STATISTICS
    4849  public    : Stat                           * _stat;
     
    100101                                              morpheo::behavioural::Parameters_Statistics * param_statistics,
    101102#endif
    102                                               Parameters                                  * param );
     103                                              Parameters * param,
     104                                              Tusage_t     usage);
    103105                                               
    104106  public  :          ~RegisterFile_Multi_Banked             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h

    r81 r82  
    1818namespace registerfile_multi_banked {
    1919
    20   typedef uint32_t Taddress_t;
     20//typedef uint32_t Taddress_t;
    2121  typedef uint32_t Tdata_t;
    2222
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked.cpp

    r81 r82  
    1414namespace registerfile_multi_banked {
    1515
    16 
     16  RegisterFile_Multi_Banked::RegisterFile_Multi_Banked
     17  (
    1718#ifdef SYSTEMC
    18   RegisterFile_Multi_Banked::RegisterFile_Multi_Banked (sc_module_name name,
     19   sc_module_name name,
    1920#else
    20   RegisterFile_Multi_Banked::RegisterFile_Multi_Banked (string name,
     21   std::string name,
    2122#endif
    2223#ifdef STATISTICS
    23                               morpheo::behavioural::Parameters_Statistics * param_statistics,
     24   morpheo::behavioural::Parameters_Statistics * param_statistics,
    2425#endif
    25                               morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * param ):
    26                               _name              (name)
    27                               ,_param            (param)
     26   morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * param,
     27   Tusage_t usage):
     28    _name              (name)
     29    ,_param            (param)
     30    ,_usage (usage)
    2831  {
    2932    log_printf(FUNC,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_allocation.cpp

    r81 r82  
    2020    log_printf(FUNC,RegisterFile_Multi_Banked,"allocation","Begin");
    2121
    22     _component   = new Component ();
     22    _component   = new Component (_usage);
    2323
    2424    Entity * entity = _component->set_entity (_name       
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (256*NB_ITERATION)
     11
    912#include "Behavioural/Generic/RegisterFile/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    11 
    12 #define NB_ITERATION  1
    13 #define CYCLE_MAX     (256*NB_ITERATION)
    14 
    15 #define LABEL(str)                                                                       \
    16 {                                                                                        \
    17   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
    18 } while(0)
    19 
    20 #define SC_START(cycle)                                        \
    21 do                                                             \
    22 {                                                              \
    23   if (static_cast<uint32_t>(sc_simulation_time()) > CYCLE_MAX) \
    24     {                                                          \
    25       TEST_KO("Maximal cycles Reached");                       \
    26     }                                                          \
    27   sc_start(cycle);                                             \
    28 } while(0)
    2914
    3015void test (string name,
     
    4126                                                   _param_stat,
    4227#endif
    43                                                    _param);
     28                                                   _param,
     29                                                   USE_ALL);
    4430 
    4531#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/RegisterFile.h

    r81 r82  
    2929#include "Behavioural/include/Vhdl.h"
    3030#endif
     31#include "Behavioural/include/Usage.h"
    3132
    3233namespace morpheo {
     
    4344    // -----[ fields ]----------------------------------------------------
    4445    // Parameters
    45   protected : const std::string       _name;
    46 
     46  protected : const std::string  _name;
    4747  protected : const Parameters * _param;
     48  private   : const Tusage_t     _usage;
    4849
    4950#ifdef STATISTICS
     
    9596                                                morpheo::behavioural::Parameters_Statistics * param_statistics,
    9697#endif
    97                                                 Parameters                                  * param );
     98                                                Parameters                                  * param ,
     99                                                Tusage_t usage);
    98100   
    99101  public  :          ~RegisterFile             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile.cpp

    r81 r82  
    1414
    1515
     16  RegisterFile::RegisterFile (
    1617#ifdef SYSTEMC
    17   RegisterFile::RegisterFile (sc_module_name name,
     18                              sc_module_name name,
    1819#else
    19   RegisterFile::RegisterFile (string name,
     20                              std::string name,
    2021#endif
    2122#ifdef STATISTICS
    2223                              morpheo::behavioural::Parameters_Statistics             * param_statistics,
    2324#endif
    24                               morpheo::behavioural::generic::registerfile::Parameters * param ):
    25                               _name              (name)
    26                               ,_param            (param)
     25                              morpheo::behavioural::generic::registerfile::Parameters * param,
     26                              Tusage_t usage):
     27    _name              (name)
     28    ,_param            (param)
     29    ,_usage (usage)
    2730  {
    2831    log_printf(FUNC,RegisterFile,"RegisterFile","Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_allocation.cpp

    r81 r82  
    8787#endif
    8888                                                                                                                                                                               ,_param->_param_registerfile_monolithic
    89                                                                                                                                                                                );
     89                                                                                                                                                                               ,_usage);
    9090       
    9191      }
     
    9898#endif
    9999                                                                                                                                                                                ,_param->_param_registerfile_multi_banked
    100                                                                                                                                                                                 );
     100                                                                                                                                                                                ,_usage);
    101101       
    102102      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp

    r81 r82  
    88
    99#define NB_ITERATION 512
     10#define CYCLE_MAX    (1024*NB_ITERATION)
    1011
    1112#include "Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/include/test.h"
     
    2122  morpheo::behavioural::Parameters_Statistics * _param_stat = new morpheo::behavioural::Parameters_Statistics (5,50);
    2223#endif
    23   Select_Priority_Fixed * _Select_Priority_Fixed = new Select_Priority_Fixed (name.c_str(),
     24  Select_Priority_Fixed * _Select_Priority_Fixed = new Select_Priority_Fixed
     25    (name.c_str(),
    2426#ifdef STATISTICS
    25                                                                               _param_stat,
     27     _param_stat,
    2628#endif
    27                                                                               _param);
     29     _param,
     30     USE_ALL);
    2831 
    2932#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h

    r81 r82  
    9191#endif
    9292   Parameters                                  * param ,
    93    morpheo::behavioural::Tusage_t                usage=USE_ALL);
     93   morpheo::behavioural::Tusage_t                usage);
    9494   
    9595  public  :          ~Select_Priority_Fixed             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION 64
     10#define CYCLE_MAX    (1024*NB_ITERATION)
     11
    912#include "Behavioural/Generic/Shifter/SelfTest/include/test.h"
    1013#include "Common/include/BitManipulation.h"
    1114#include "Common/include/Test.h"
    12 
    13 #define NB_ITERATION 64
    1415
    1516void test (string name,
     
    4142                                    param_stat,
    4243#endif
    43                                     param);
     44                                    &param,
     45                                    USE_ALL);
    4446 
    4547#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Parameters.h

    r81 r82  
    5959  public : ~Parameters () ;
    6060
    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);
     61  public :        Parameters_test 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);
    6565  };
    6666
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Shifter.h

    r81 r82  
    2525#endif
    2626#include "Behavioural/include/Component.h"
     27#include "Behavioural/include/Usage.h"
    2728
    2829namespace morpheo                    {
     
    3940    // -----[ fields ]----------------------------------------------------
    4041    // Parameters
    41   protected : const std::string     _name;
     42  protected : const std::string  _name;
     43  protected : const Parameters * _param;
     44  private   : const Tusage_t     _usage;
    4245
    43   protected : const Parameters _param;
    4446#ifdef STATISTICS
    4547  public    : Stat                           * _stat;
     
    8486                                           morpheo::behavioural::Parameters_Statistics * param_statistics,
    8587#endif
    86                                            Parameters                                    param );
     88                                           Parameters                                  * param,
     89                                           morpheo::behavioural::Tusage_t                usage
     90                                           );
    8791   
    8892  public  :          Shifter              (Parameters param );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters_msg_error.cpp

    r81 r82  
    1515namespace shifter {
    1616
    17   std::string Parameters::msg_error(void)
     17  Parameters_test Parameters::msg_error(void)
    1818  {
    19     std::string msg = "";
     19    Parameters_test test ("Shifter");
    2020
    2121    if (_size_data < 2)
    22       {
    23         msg += "  - size_data must be > 1\n";
    24         msg += "    * size_data                       : " + toString(_size_data) + "\n";
    25       }
    26 
     22      test.error("size_data must be > 1\n");
     23   
    2724    if (is_positive(_nb_port) == false)
    28       {
    29         msg += "  - nb_port must be > 0\n";
    30         msg += "    * nb_port                         : " + toString(_nb_port) + "\n";
    31       }
    32 
     25      test.error("nb_port must be > 0\n");
     26   
    3327    if (_shift_value > _size_data)
    34       {
    35         msg += "  - shift_value must be < size_data\n";
    36         msg += "    * shift_value                     : " + toString(_shift_value) + "\n";
    37         msg += "    * size_data                       : " + toString(_size_data)   + "\n";
    38       }   
    39 
     28      test.error("shift_value must be < size_data\n"); 
     29   
    4030    if ( (_rotate == internal_rotate) && (_carry != internal_logic))
    41       {
    42         msg += "  - Incompatible parameters : internal_rotate have never carry (must be set at \"internal_logic\"\n";
    43         msg += "    * rotate                          : " + toString(_rotate) + "\n";
    44         msg += "    * carry                           : " + toString(_carry ) + "\n";
    45       }   
    46 
     31      test.error("Incompatible parameters : internal_rotate have never carry (must be set at \"internal_logic\"\n");
     32   
    4733    if (_type_completion_bool && (_size_data_completion != 1))
    48       {
    49         msg += "  - Incompatible parameters : you can't have the type of port in_SHIFTER_COMPLETION at bool. Because, This port must be more bits\n";
    50         msg += "    * size_data_completion            : " + toString (_size_data_completion) + "\n";
    51       }
     34      test.error("Incompatible parameters : you can't have the type of port in_SHIFTER_COMPLETION at bool. Because, This port must be more bits\n");
    5235     
    53     return msg;
     36    return test;
    5437  };
    5538
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter.cpp

    r81 r82  
    1414
    1515
     16  Shifter::Shifter (
    1617#ifdef SYSTEMC
    17   Shifter::Shifter (sc_module_name name
     18                    sc_module_name name
    1819#else
    19   Shifter::Shifter (string name
     20                    std::string name
    2021#endif
    2122#ifdef STATISTICS
    2223                    ,morpheo::behavioural::Parameters_Statistics * param_statistics
    2324#endif
    24                     ,morpheo::behavioural::generic::shifter::Parameters param ):
    25                     _name   (name)
    26                     ,_param (param)
     25                    ,morpheo::behavioural::generic::shifter::Parameters *param
     26                    ,morpheo::behavioural::Tusage_t                usage ):
     27    _name   (name)
     28    ,_param (param)
     29    ,_usage (usage)
    2730  {
    2831#ifdef SYSTEMC
     
    5053    dont_initialize ();
    5154    sensitive << (*(in_CLOCK)).neg();
    52     for (uint32_t i=0; i<param._nb_port; i++)
     55    for (uint32_t i=0; i<param->_nb_port; i++)
    5356      {
    5457        sensitive << (*(in_SHIFTER_DATA      [i]));
    55         if (param._shift_value == 0)
     58        if (param->_shift_value == 0)
    5659        sensitive << (*(in_SHIFTER_SHIFT     [i]));
    57         if (param._direction   == external_direction)
     60        if (param->_direction   == external_direction)
    5861        sensitive << (*(in_SHIFTER_DIRECTION [i]));
    59         if (_param._rotate     == external_rotate)
     62        if (_param->_rotate     == external_rotate)
    6063        sensitive << (*(in_SHIFTER_TYPE      [i]));
    61         if (param._carry       == external_carry)
     64        if (param->_carry       == external_carry)
    6265        sensitive << (*(in_SHIFTER_CARRY     [i]));
    63         if (param._carry       == external_completion)
    64           if (_param._type_completion_bool == true)
     66        if (param->_carry       == external_completion)
     67          if (_param->_type_completion_bool == true)
    6568            sensitive << (*(in_SHIFTER_CARRY_IN  [i]));
    6669          else
     
    7073#ifdef SYSTEMCASS_SPECIFIC
    7174    // List dependency information
    72     for (uint32_t i=0; i<param._nb_port; i++)
     75    for (uint32_t i=0; i<param->_nb_port; i++)
    7376      {
    7477        (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_DATA      [i]));
    75         if (param._shift_value == 0)
     78        if (param->_shift_value == 0)
    7679        (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_SHIFT     [i]));
    77         if (param._direction   == external_direction)
     80        if (param->_direction   == external_direction)
    7881        (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_DIRECTION [i]));
    79         if (_param._rotate     == external_rotate)
     82        if (_param->_rotate     == external_rotate)
    8083        (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_TYPE      [i]));
    81         if (param._carry       == external_carry)
     84        if (param->_carry       == external_carry)
    8285        (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_CARRY     [i]));
    83         if (param._carry       == external_completion)
    84         if (_param._type_completion_bool == true)
     86        if (param->_carry       == external_completion)
     87        if (_param->_type_completion_bool == true)
    8588        (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_CARRY_IN  [i]));
    8689        else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_allocation.cpp

    r81 r82  
    1717  void Shifter::allocation (void)
    1818  {
    19     _component   = new Component ();
     19    _component   = new Component (_usage);
    2020
    2121    Entity * entity = _component->set_entity (_name       
     
    4545    {
    4646      // Interface "shifter"
    47        in_SHIFTER_DATA      = new SC_IN (Tdata_t)      * [_param._nb_port];
    48       if (_param._shift_value == 0)
    49        in_SHIFTER_SHIFT     = new SC_IN (Tshift_t)     * [_param._nb_port];
    50       if (_param._direction   == external_direction)
    51        in_SHIFTER_DIRECTION = new SC_IN (Tdirection_t) * [_param._nb_port];
    52       if (_param._rotate      == external_rotate)
    53        in_SHIFTER_TYPE      = new SC_IN (Ttype_t)      * [_param._nb_port];
    54       if (_param._carry       == external_carry)
    55        in_SHIFTER_CARRY     = new SC_IN (Tcarry_t)     * [_param._nb_port];
    56       if (_param._carry       == external_completion)
    57       if (_param._type_completion_bool == true)
    58        in_SHIFTER_CARRY_IN  = new SC_IN (Tcontrol_t)   * [_param._nb_port];
     47       in_SHIFTER_DATA      = new SC_IN (Tdata_t)      * [_param->_nb_port];
     48      if (_param->_shift_value == 0)
     49       in_SHIFTER_SHIFT     = new SC_IN (Tshift_t)     * [_param->_nb_port];
     50      if (_param->_direction   == external_direction)
     51       in_SHIFTER_DIRECTION = new SC_IN (Tdirection_t) * [_param->_nb_port];
     52      if (_param->_rotate      == external_rotate)
     53       in_SHIFTER_TYPE      = new SC_IN (Ttype_t)      * [_param->_nb_port];
     54      if (_param->_carry       == external_carry)
     55       in_SHIFTER_CARRY     = new SC_IN (Tcarry_t)     * [_param->_nb_port];
     56      if (_param->_carry       == external_completion)
     57      if (_param->_type_completion_bool == true)
     58       in_SHIFTER_CARRY_IN  = new SC_IN (Tcontrol_t)   * [_param->_nb_port];
    5959      else
    60        in_SHIFTER_COMPLETION= new SC_IN (Tdata_t)      * [_param._nb_port];
    61       out_SHIFTER_DATA      = new SC_OUT(Tdata_t)      * [_param._nb_port];
     60       in_SHIFTER_COMPLETION= new SC_IN (Tdata_t)      * [_param->_nb_port];
     61      out_SHIFTER_DATA      = new SC_OUT(Tdata_t)      * [_param->_nb_port];
    6262     
    63       for (uint32_t i=0; i<_param._nb_port; i++)
     63      for (uint32_t i=0; i<_param->_nb_port; i++)
    6464        {
    6565          Interface_fifo * interface = _interfaces->set_interface("shifter_"+toString(i)
     
    7171                                                                  );
    7272         
    73            in_SHIFTER_DATA       [i] = interface->set_signal_in  <Tdata_t     > ("data"      ,_param._size_data);
    74           if (_param._shift_value == 0)
    75            in_SHIFTER_SHIFT      [i] = interface->set_signal_in  <Tshift_t    > ("shift"     ,static_cast<uint32_t>(ceil(log2(_param._size_data))));
    76           if (_param._direction == external_direction)
     73           in_SHIFTER_DATA       [i] = interface->set_signal_in  <Tdata_t     > ("data"      ,_param->_size_data);
     74          if (_param->_shift_value == 0)
     75           in_SHIFTER_SHIFT      [i] = interface->set_signal_in  <Tshift_t    > ("shift"     ,static_cast<uint32_t>(ceil(log2(_param->_size_data))));
     76          if (_param->_direction == external_direction)
    7777           in_SHIFTER_DIRECTION  [i] = interface->set_signal_in  <Tdirection_t> ("direction" ,1);
    78           if (_param._rotate  == external_rotate)
     78          if (_param->_rotate  == external_rotate)
    7979           in_SHIFTER_TYPE       [i] = interface->set_signal_in  <Ttype_t     > ("type"      ,1);
    80           if (_param._carry == external_carry)
     80          if (_param->_carry == external_carry)
    8181           in_SHIFTER_CARRY      [i] = interface->set_signal_in  <Tcarry_t    > ("carry"     ,1);
    82           if (_param._carry       == external_completion)
    83           if (_param._type_completion_bool == true)
     82          if (_param->_carry       == external_completion)
     83          if (_param->_type_completion_bool == true)
    8484           in_SHIFTER_CARRY_IN   [i] = interface->set_signal_in  <Tcontrol_t  > ("carry_in"  ,1);
    8585          else
    86            in_SHIFTER_COMPLETION [i] = interface->set_signal_in  <Tdata_t     > ("completion",_param._size_data_completion);
    87           out_SHIFTER_DATA       [i] = interface->set_signal_out <Tdata_t     > ("data"      ,_param._size_data);
     86           in_SHIFTER_COMPLETION [i] = interface->set_signal_in  <Tdata_t     > ("completion",_param->_size_data_completion);
     87          out_SHIFTER_DATA       [i] = interface->set_signal_out <Tdata_t     > ("data"      ,_param->_size_data);
    8888        }                                                                                                                       
    8989    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_deallocation.cpp

    r81 r82  
    2222
    2323    delete []  in_SHIFTER_DATA      ;
    24     if (_param._shift_value == 0)
     24    if (_param->_shift_value == 0)
    2525    delete []  in_SHIFTER_SHIFT     ;
    26     if (_param._direction   == external_direction )
     26    if (_param->_direction   == external_direction )
    2727    delete []  in_SHIFTER_DIRECTION ;
    28     if (_param._rotate      == external_rotate    )
     28    if (_param->_rotate      == external_rotate    )
    2929    delete []  in_SHIFTER_TYPE      ;
    30     if (_param._carry       == external_carry     )
     30    if (_param->_carry       == external_carry     )
    3131    delete []  in_SHIFTER_CARRY     ;
    32     if (_param._carry       == external_completion)
    33     if (_param._type_completion_bool == true)
     32    if (_param->_carry       == external_completion)
     33    if (_param->_type_completion_bool == true)
    3434    delete []  in_SHIFTER_CARRY_IN  ;
    3535    else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_genMealy_shift.cpp

    r81 r82  
    1818  void Shifter::genMealy_shift (void)
    1919  {
    20     for (uint32_t i=0; i<_param._nb_port; i++)
     20    for (uint32_t i=0; i<_param->_nb_port; i++)
    2121      {
    2222        // Read
    2323        Tdata_t      data_in     = PORT_READ(in_SHIFTER_DATA [i]);
    2424        Tdata_t      data_out    = data_in;
    25         Tshift_t     shift_value = _param._shift_value;
     25        Tshift_t     shift_value = _param->_shift_value;
    2626        if (shift_value == 0)
    2727          shift_value = PORT_READ(in_SHIFTER_SHIFT [i]);
    2828
    2929        Tdirection_t direction;
    30         if (_param._direction == external_direction)
     30        if (_param->_direction == external_direction)
    3131          direction = PORT_READ(in_SHIFTER_DIRECTION [i]);
    3232        else
    33           direction = _param._internal_direction;
     33          direction = _param->_internal_direction;
    3434
    3535        Ttype_t      type;
    36         if (_param._rotate    == external_rotate)
     36        if (_param->_rotate    == external_rotate)
    3737          type      = PORT_READ(in_SHIFTER_TYPE      [i]);
    3838        else
    39           type      = _param._internal_type;
     39          type      = _param->_internal_type;
    4040
    4141        Tcarry_t     carry;     
    42         if (_param._carry     == external_carry)
     42        if (_param->_carry     == external_carry)
    4343          carry     = PORT_READ(in_SHIFTER_CARRY     [i]);
    4444        else
    45           carry     = _param._internal_carry;
     45          carry     = _param->_internal_carry;
    4646       
    4747        if (type == _shift)
    4848          {
    49             data_out = shift  <Tdata_t> (_param._size_data, data_in, shift_value, direction == _left, carry == _arithmetic);
     49            data_out = shift  <Tdata_t> (_param->_size_data, data_in, shift_value, direction == _left, carry == _arithmetic);
    5050
    51             if (_param._size_data_completion > 0)
     51            if (_param->_size_data_completion > 0)
    5252              {
    5353                Tdata_t completion;
    5454
    55                 if (_param._type_completion_bool == true)
     55                if (_param->_type_completion_bool == true)
    5656                  completion = (PORT_READ(in_SHIFTER_CARRY_IN   [i])==true)?1:0;
    5757                else
     
    6666                else
    6767                  {
    68                     mask       = gen_mask<Tdata_t> (shift_value)      << (_param._size_data-shift_value);
     68                    mask       = gen_mask<Tdata_t> (shift_value)      << (_param->_size_data-shift_value);
    6969                  }
    7070                 
     
    7373          }
    7474        else
    75           data_out = rotate <Tdata_t> (_param._size_data, data_in, shift_value, direction == _left);
     75          data_out = rotate <Tdata_t> (_param->_size_data, data_in, shift_value, direction == _left);
    7676
    7777        // Write
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_body.cpp

    r81 r82  
    1717  void Shifter::vhdl_body (Vhdl * & vhdl)
    1818  {
    19     //uint32_t log2_size_data = static_cast<uint32_t>(ceil(log2(_param._size_data)));
     19    //uint32_t log2_size_data = static_cast<uint32_t>(ceil(log2(_param->_size_data)));
    2020
    2121    vhdl->set_body ("-- Compute all case of shift");
    2222
    23     for (uint32_t i=0; i<_param._nb_port; i++)
     23    for (uint32_t i=0; i<_param->_nb_port; i++)
    2424      {
    2525        //-----[ Shift logic Left ]--------------------------------------------
    26         if (_param._have_shift_logic_left)
     26        if (_param->_have_shift_logic_left)
    2727          vhdl->set_body ("shift_logic_left_"+toString(i)+"        <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) sll CONV_INTEGER(shift_"+toString(i)+"));");
    2828        //-----[ Shift logic Right ]-------------------------------------------
    29         if (_param._have_shift_logic_right)
     29        if (_param->_have_shift_logic_right)
    3030          vhdl->set_body ("shift_logic_right_"+toString(i)+"       <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) srl CONV_INTEGER(shift_"+toString(i)+"));");
    3131        //-----[ Shift arithmetic Left ]---------------------------------------
    32         if (_param._have_shift_arithmetic_left)
     32        if (_param->_have_shift_arithmetic_left)
    3333          vhdl->set_body ("shift_arithmetic_left_"+toString(i)+"   <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) sla CONV_INTEGER(shift_"+toString(i)+"));");
    3434        //-----[ Shift arithmetic Right ]--------------------------------------
    35         if (_param._have_shift_arithmetic_right)
     35        if (_param->_have_shift_arithmetic_right)
    3636          vhdl->set_body ("shift_arithmetic_right_"+toString(i)+"  <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) sra CONV_INTEGER(shift_"+toString(i)+"));");
    3737        //-----[ Rotate Left ]-------------------------------------------------
    38         if (_param._have_rotate_left)
     38        if (_param->_have_rotate_left)
    3939          vhdl->set_body ("rotate_left_"+toString(i)+"             <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) rol CONV_INTEGER(shift_"+toString(i)+"));");
    4040        //-----[ Rotate Right ]------------------------------------------------
    41         if (_param._have_rotate_right)
     41        if (_param->_have_rotate_right)
    4242          vhdl->set_body ("rotate_right_"+toString(i)+"            <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) ror CONV_INTEGER(shift_"+toString(i)+"));");
    4343      }
    4444
    45     if (_param._size_data_completion > 0)
     45    if (_param->_size_data_completion > 0)
    4646      {
    4747        vhdl->set_body ("");
    4848        vhdl->set_body ("-- Mask");
    4949
    50         for (uint32_t i=0; i<_param._nb_port; i++)
     50        for (uint32_t i=0; i<_param->_nb_port; i++)
    5151          {
    5252            std::string print_shifter_completion;
    5353           
    54             if (_param._type_completion_bool == true)
     54            if (_param->_type_completion_bool == true)
    5555              print_shifter_completion = "in_SHIFTER_"+toString(i)+"_CARRY_IN";
    5656            else
    5757              print_shifter_completion = "in_SHIFTER_"+toString(i)+"_COMPLETION";
    5858
    59             if (_param._size_data == _param._size_data_completion)
     59            if (_param->_size_data == _param->_size_data_completion)
    6060              {
    6161                vhdl->set_body ("shifter_completion_left_"+toString(i)+"  <= "+print_shifter_completion+";");
     
    6464            else
    6565              {
    66                 vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param._size_data-1,_param._size_data_completion)+"  <= "+std_logic_others(_param._size_data-_param._size_data_completion,0)+";");
    67                 vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param._size_data_completion                    )+"  <= "+print_shifter_completion+";");
    68 
    69                 vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param._size_data-1,_param._size_data-_param._size_data_completion)+" <= "+print_shifter_completion+";");
    70                 vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param._size_data-_param._size_data_completion                    )+" <= "+std_logic_others(_param._size_data-_param._size_data_completion,0)+";");
     66                vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param->_size_data-1,_param->_size_data_completion)+"  <= "+std_logic_others(_param->_size_data-_param->_size_data_completion,0)+";");
     67                vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param->_size_data_completion                    )+"  <= "+print_shifter_completion+";");
     68
     69                vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param->_size_data-1,_param->_size_data-_param->_size_data_completion)+" <= "+print_shifter_completion+";");
     70                vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param->_size_data-_param->_size_data_completion                    )+" <= "+std_logic_others(_param->_size_data-_param->_size_data_completion,0)+";");
    7171              }
    7272           
     
    8080    vhdl->set_body ("-- Multiplexor");
    8181
    82     for (uint32_t i=0; i<_param._nb_port; i++)
     82    for (uint32_t i=0; i<_param->_nb_port; i++)
    8383      {
    8484        vhdl->set_body ("out_SHIFTER_"+toString(i)+"_DATA       <=");
     
    8686
    8787        //-----[ Shift arithmetic Left ]---------------------------------------
    88         if (_param._have_shift_arithmetic_left)
    89           {
    90             bool   have_when  = false;
    91             std::string print_when = "";
    92             std::string print_and  = "";
    93            
    94             if (_param._direction   == external_direction)
     88        if (_param->_have_shift_arithmetic_left)
     89          {
     90            bool   have_when  = false;
     91            std::string print_when = "";
     92            std::string print_and  = "";
     93           
     94            if (_param->_direction   == external_direction)
    9595              {
    9696                have_when = true;
     
    9898                print_and = " and ";
    9999              }
    100             if (_param._rotate      == external_rotate)
     100            if (_param->_rotate      == external_rotate)
    101101              {
    102102                have_when = true;
     
    104104                print_and = " and ";
    105105              }
    106             if (_param._carry       == external_carry)
     106            if (_param->_carry       == external_carry)
    107107              {
    108108                have_when = true;
     
    117117          }
    118118        //-----[ Shift arithmetic Right ]--------------------------------------
    119         if (_param._have_shift_arithmetic_right)
    120           {
    121             bool   have_when  = false;
    122             std::string print_when = "";
    123             std::string print_and  = "";
    124            
    125             if (_param._direction   == external_direction)
     119        if (_param->_have_shift_arithmetic_right)
     120          {
     121            bool   have_when  = false;
     122            std::string print_when = "";
     123            std::string print_and  = "";
     124           
     125            if (_param->_direction   == external_direction)
    126126              {
    127127                have_when = true;
     
    129129                print_and = " and ";
    130130              }
    131             if (_param._rotate      == external_rotate)
     131            if (_param->_rotate      == external_rotate)
    132132              {
    133133                have_when = true;
     
    135135                print_and = " and ";
    136136              }
    137             if (_param._carry       == external_carry)
     137            if (_param->_carry       == external_carry)
    138138              {
    139139                have_when = true;
     
    148148          }
    149149        //-----[ Shift logic Left ]--------------------------------------------
    150         if (_param._have_shift_logic_left)
    151           {
    152             bool   have_when  = false;
    153             std::string print_when = "";
    154             std::string print_and  = "";
    155            
    156             if (_param._direction   == external_direction)
     150        if (_param->_have_shift_logic_left)
     151          {
     152            bool   have_when  = false;
     153            std::string print_when = "";
     154            std::string print_and  = "";
     155           
     156            if (_param->_direction   == external_direction)
    157157              {
    158158                have_when = true;
     
    160160                print_and = " and ";
    161161              }
    162             if (_param._rotate      == external_rotate)
     162            if (_param->_rotate      == external_rotate)
    163163              {
    164164                have_when = true;
     
    166166                print_and = " and ";
    167167              }
    168             if (_param._carry       == external_carry)
     168            if (_param->_carry       == external_carry)
    169169              {
    170170                have_when = true;
     
    177177            std::string print_expr_completion;
    178178
    179             if (_param._size_data_completion == 0)
     179            if (_param->_size_data_completion == 0)
    180180              print_expr_completion = "shift_logic_left_"+toString(i)+" ";
    181181            else
     
    186186          }
    187187        //-----[ Shift logic Right ]-------------------------------------------
    188         if (_param._have_shift_logic_right)
    189           {
    190             bool   have_when  = false;
    191             std::string print_when = "";
    192             std::string print_and  = "";
    193            
    194             if (_param._direction   == external_direction)
     188        if (_param->_have_shift_logic_right)
     189          {
     190            bool   have_when  = false;
     191            std::string print_when = "";
     192            std::string print_and  = "";
     193           
     194            if (_param->_direction   == external_direction)
    195195              {
    196196                have_when = true;
     
    198198                print_and = " and ";
    199199              }
    200             if (_param._rotate      == external_rotate)
     200            if (_param->_rotate      == external_rotate)
    201201              {
    202202                have_when = true;
     
    204204                print_and = " and ";
    205205              }
    206             if (_param._carry       == external_carry)
     206            if (_param->_carry       == external_carry)
    207207              {
    208208                have_when = true;
     
    215215            std::string print_expr_completion;
    216216
    217             if (_param._size_data_completion == 0)
     217            if (_param->_size_data_completion == 0)
    218218              print_expr_completion = "shift_logic_right_"+toString(i);
    219219            else
     
    224224          }
    225225        //-----[ Rotate Left ]-------------------------------------------------
    226         if (_param._have_rotate_left)
    227           {
    228             bool   have_when  = false;
    229             std::string print_when = "";
    230             std::string print_and  = "";
    231            
    232             if (_param._direction   == external_direction)
     226        if (_param->_have_rotate_left)
     227          {
     228            bool   have_when  = false;
     229            std::string print_when = "";
     230            std::string print_and  = "";
     231           
     232            if (_param->_direction   == external_direction)
    233233              {
    234234                have_when = true;
     
    236236                print_and = " and ";
    237237              }
    238             if (_param._rotate      == external_rotate)
     238            if (_param->_rotate      == external_rotate)
    239239              {
    240240                have_when = true;
     
    250250          }
    251251        //-----[ Rotate Right ]------------------------------------------------
    252         if (_param._have_rotate_right)
    253           {
    254             bool   have_when  = false;
    255             std::string print_when = "";
    256             std::string print_and  = "";
    257            
    258             if (_param._direction   == external_direction)
     252        if (_param->_have_rotate_right)
     253          {
     254            bool   have_when  = false;
     255            std::string print_when = "";
     256            std::string print_and  = "";
     257           
     258            if (_param->_direction   == external_direction)
    259259              {
    260260                have_when = true;
     
    262262                print_and = " and ";
    263263              }
    264             if (_param._rotate      == external_rotate)
     264            if (_param->_rotate      == external_rotate)
    265265              {
    266266                have_when = true;
     
    281281  /*
    282282  //-----[ Shift logic Left ]--------------------------------------------
    283   if (_param._have_shift_logic_left)
     283  if (_param->_have_shift_logic_left)
    284284    {
    285285
     
    287287
    288288  //-----[ Shift logic Right ]-------------------------------------------
    289   if (_param._have_shift_logic_right)
     289  if (_param->_have_shift_logic_right)
    290290    {
    291291     
     
    293293
    294294  //-----[ Shift arithmetic Left ]---------------------------------------
    295   if (_param._have_shift_arithmetic_left)
     295  if (_param->_have_shift_arithmetic_left)
    296296    {
    297297
     
    299299
    300300  //-----[ Shift arithmetic Right ]--------------------------------------
    301   if (_param._have_shift_arithmetic_right)
     301  if (_param->_have_shift_arithmetic_right)
    302302    {
    303303     
     
    305305 
    306306  //-----[ Rotate Left ]-------------------------------------------------
    307   if (_param._have_rotate_left)
     307  if (_param->_have_rotate_left)
    308308    {
    309309     
     
    311311 
    312312  //-----[ Rotate Right ]------------------------------------------------
    313   if (_param._have_rotate_right)
     313  if (_param->_have_rotate_right)
    314314    {
    315315     
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1024
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Generic/Sort/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Common/include/BitManipulation.h"
    1215#include "Behavioural/include/Allocation.h"
    13 
    14 #define NB_ITERATION  1024
    15 #define CYCLE_MAX     (128*NB_ITERATION)
    16 
    17 #define LABEL(str...)                                                   \
    18   {                                                                     \
    19     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    20     msg (str);                                                          \
    21     msg (_("\n"));                                                      \
    22   } while(0)
    23 
    24 #define SC_START(cycle_offset)                                                       \
    25   do                                                                                 \
    26     {                                                                                \
    27       /*cout << "SC_START (begin)" << endl;*/                                        \
    28                                                                                      \
    29       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    30       if (cycle_offset != 0)                                                         \
    31         {                                                                            \
    32           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    33         }                                                                            \
    34                                                                                      \
    35       if (cycle_current > CYCLE_MAX)                                                 \
    36         {                                                                            \
    37           TEST_KO("Maximal cycles Reached");                                         \
    38         }                                                                            \
    39                                                                                      \
    40       sc_start(cycle_offset);                                                        \
    41                                                                                      \
    42       /*cout << "SC_START (end  )" << endl;*/                                        \
    43     } while(0)
    44 
    4516
    4617class entry_t
     
    6233  Sort * _Sort = new Sort (name.c_str(),
    6334#ifdef STATISTICS
    64                                              _parameters_statistics,
     35                           _parameters_statistics,
    6536#endif
    66                                              _param);
     37                           _param,
     38                           USE_ALL);
    6739 
    6840#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/include/Sort.h

    r81 r82  
    9191#endif
    9292   Parameters                                  * param,
    93    morpheo::behavioural::Tusage_t                usage=USE_ALL
     93   morpheo::behavioural::Tusage_t                usage
    9494   );
    9595  public  :          ~Sort             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/include/Types.h

    r81 r82  
    1616namespace sort {
    1717
    18   typedef uint32_t Taddress_t;
     18//   typedef uint32_t Taddress_t;
    1919  typedef uint32_t Tdata_t;
    2020
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  10
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Generic/Victim/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Behavioural/include/Allocation.h"
    12 
    13 #define NB_ITERATION  10
    14 #define CYCLE_MAX     (128*NB_ITERATION)
    15 
    16 #define LABEL(str...)                                                   \
    17   {                                                                     \
    18     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    19     msg (str);                                                          \
    20     msg (_("\n"));                                                      \
    21   } while(0)
    22 
    23 #define SC_START(cycle_offset)                                                       \
    24   do                                                                                 \
    25     {                                                                                \
    26       /*cout << "SC_START (begin)" << endl;*/                                        \
    27                                                                                      \
    28       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    29       if (cycle_offset != 0)                                                         \
    30         {                                                                            \
    31           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    32         }                                                                            \
    33                                                                                      \
    34       if (cycle_current > CYCLE_MAX)                                                 \
    35         {                                                                            \
    36           TEST_KO("Maximal cycles Reached");                                         \
    37         }                                                                            \
    38                                                                                      \
    39       sc_start(cycle_offset);                                                        \
    40                                                                                      \
    41       /*cout << "SC_START (end  )" << endl;*/                                        \
    42     } while(0)
    4315
    4416void test (string name,
     
    5325  Victim * _Victim = new Victim (name.c_str(),
    5426#ifdef STATISTICS
    55                                             _parameters_statistics,
     27                                _parameters_statistics,
    5628#endif
    57                                              _param);
     29                                 _param,
     30                                 USE_ALL);
    5831 
    5932#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
     
    3942                                                                  param_stat,
    4043#endif
    41                                                                   &param);
     44                                                                  &param,
     45                                                                  USE_ALL);
    4246 
    4347#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h

    r81 r82  
    4141#endif
    4242#include "Behavioural/include/Component.h"
     43#include "Behavioural/include/Usage.h"
    4344
    4445namespace morpheo {
     
    5556    // -----[ fields ]----------------------------------------------------
    5657    // Parameters
    57   protected : const std::string   _name;
     58  protected : const std::string  _name;
     59  protected : const Parameters * _param;
     60  private   : const Tusage_t     _usage;
    5861
    59   protected : const Parameters  * _param;
    6062#ifdef STATISTICS
    6163  public    : Stat                           * _stat;
     
    104106   morpheo::behavioural::Parameters_Statistics * param_statistics,
    105107#endif
    106    Parameters                                  * param );
     108   Parameters                                  * param ,
     109   morpheo::behavioural::Tusage_t                usage);
    107110                                               
    108111  public  :          Victim_Pseudo_LRU              (Parameters param );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU.cpp

    r81 r82  
    1414namespace victim_pseudo_lru {
    1515
     16  Victim_Pseudo_LRU::Victim_Pseudo_LRU
     17  (
    1618#ifdef SYSTEMC
    17   Victim_Pseudo_LRU::Victim_Pseudo_LRU (sc_module_name name,
     19   sc_module_name name,
    1820#else
    19   Victim_Pseudo_LRU::Victim_Pseudo_LRU (std::string name,
     21   std::string name,
    2022#endif
    2123#ifdef STATISTICS
    22                           morpheo::behavioural::Parameters_Statistics * param_statistics,
     24   morpheo::behavioural::Parameters_Statistics * param_statistics,
    2325#endif
    24                           morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters * param ):
    25                           _name   (name)
    26                           ,_param (param)
     26   morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters * param ,
     27   morpheo::behavioural::Tusage_t usage):
     28    _name   (name)
     29    ,_param (param)
     30    ,_usage (usage)
    2731  {
    2832    log_printf(FUNC,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_allocation.cpp

    r81 r82  
    1818  void Victim_Pseudo_LRU::allocation (void)
    1919  {
    20     _component   = new Component ();
     20    _component   = new Component (_usage);
    2121
    2222    Entity * entity = _component->set_entity (_name                 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/include/Types.h

    r81 r82  
    1616namespace victim {
    1717
    18   typedef uint32_t Taddress_t;
     18//   typedef uint32_t Taddress_t;
    1919  typedef uint32_t Tentity_t;
    2020
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/include/Victim.h

    r81 r82  
    102102#endif
    103103   Parameters                                  * param,
    104    morpheo::behavioural::Tusage_t                usage=USE_ALL
     104   morpheo::behavioural::Tusage_t                usage
    105105   );
    106106  public  :          ~Victim             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_allocation.cpp

    r81 r82  
    6565             ,param_statistics
    6666#endif
    67              ,_param->_param_victim_pseudo_lru);
     67             ,_param->_param_victim_pseudo_lru
     68             ,_usage);
    6869          break;
    6970        }
Note: See TracChangeset for help on using the changeset viewer.