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/Core/Multi_Front_end/Front_end/Decod_unit/Decod
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (2048*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/include/test.h"
    1013#include <list>
    1114#include "Common/include/Test.h"
    1215#include "Behavioural/include/Allocation.h"
    13 
    14 #define NB_ITERATION  1
    15 #define CYCLE_MAX     (2048*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)
    4416
    4517  class entry_t
     
    151123#endif
    152124
    153   Decod * _Decod = new Decod (name.c_str(),
     125  Decod * _Decod = new Decod
     126    (name.c_str(),
    154127#ifdef STATISTICS
    155                               _parameters_statistics,
     128     _parameters_statistics,
    156129#endif
    157                               _param);
     130     _param,
     131     USE_ALL);
    158132 
    159133#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h

    r81 r82  
    159159#endif
    160160   Parameters                                  * param,
    161    morpheo::behavioural::Tusage_t                usage=USE_ALL
     161   morpheo::behavioural::Tusage_t                usage
    162162   );
    163163  public  :          ~Decod             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Parameters.h

    r81 r82  
    6666  public : ~Parameters () ;
    6767
    68   public :        std::string  msg_error  (void);
     68  public :        Parameters_test msg_error  (void);
    6969
    70   public :        std::string   print      (uint32_t depth);
    71   public : friend std::ostream& operator<< (std::ostream& output_stream,
    72                                             morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::Parameters & x);
     70  public :        std::string     print      (uint32_t depth);
     71  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     72                                              morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::Parameters & x);
    7373  };
    7474
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Parameters_msg_error.cpp

    r81 r82  
    2121#undef  FUNCTION
    2222#define FUNCTION "Decod::msg_error"
    23   std::string Parameters::msg_error(void)
     23  Parameters_test Parameters::msg_error(void)
    2424  {
    2525    log_printf(FUNC,Decod,FUNCTION,"Begin");
    26 
    27     std::string msg = "";
     26   
     27    Parameters_test test("Decod");
    2828
    2929    if (_nb_inst_decod == 0)
    30       msg += "  - nb_inst_decod must be > 0.\n";
     30      test.error(_("nb_inst_decod must be > 0.\n"));
    3131
    3232    if ((_size_general_data != 32) and
    3333        (_size_general_data != 64))
    34       msg += "  - size_general_data must be equal at 32 or 64 bits.\n";
     34      test.error(_("size_general_data must be equal at 32 or 64 bits.\n"));
    3535
    3636    if ((_nb_branch_speculated == 0) or
    3737        (_nb_branch_speculated > _nb_context))
    38       msg += "  - nb_branch_speculated must be in [1:nb_context].\n";
     38      test.error(_("nb_branch_speculated must be in [1:nb_context].\n"));
    3939
    4040    if ((_nb_context_select == 0) or
    4141        (_nb_context_select > _nb_context))
    42       msg += "  - nb_context_select must be in [1:nb_context].\n";
     42      test.error(_("nb_context_select must be in [1:nb_context].\n"));
    4343
    4444    if ((_priority != PRIORITY_ROUND_ROBIN))
    45       msg += "  - Unsupported priority scheme. Supported scheme are : "+toString(PRIORITY_ROUND_ROBIN)+".\n";
     45      test.error(toString(_("Unsupported priority scheme. Supported scheme are : %s.\n"),toString(PRIORITY_ROUND_ROBIN).c_str()));
    4646   
    4747    if ((_load_balancing != LOAD_BALANCING_MAXIMUM_FOR_PRIORITY))
    48       msg += "  - Unsupported load_balancing scheme. Supported scheme are : "+toString(LOAD_BALANCING_MAXIMUM_FOR_PRIORITY)+".\n";
     48      test.error(toString(_("Unsupported load_balancing scheme. Supported scheme are : %s.\n"),toString(LOAD_BALANCING_MAXIMUM_FOR_PRIORITY).c_str()));
    4949
    50     return msg;
     50    return test;
    5151
    5252    log_printf(FUNC,Decod,FUNCTION,"End");
Note: See TracChangeset for help on using the changeset viewer.