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_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
    9 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/include/test.h"
    10 #include "Common/include/Test.h"
    11 
    129#define NB_ITERATION  1
    1310//64
    1411#define CYCLE_MAX     (1024*NB_ITERATION)
    1512
    16 #define LABEL(str)                                                                       \
    17 {                                                                                        \
    18   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
    19 } while(0)
    20 
    21 static uint32_t cycle = 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_current != cycle)                                           \
    30     {                                                                   \
    31       cycle = cycle_current;                                            \
    32       cout << "##########[ cycle "<< cycle << " ]" << endl;             \
    33     }                                                                   \
    34                                                                         \
    35   if (cycle_current > CYCLE_MAX)                                        \
    36     {                                                                   \
    37       TEST_KO("Maximal cycles Reached");                                \
    38     }                                                                   \
    39   sc_start(cycle_offset);                                               \
    40 /*cout << "SC_START (end  )" << endl;*/                                 \
    41 } while(0)
     13#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/include/test.h"
     14#include "Common/include/Test.h"
    4215
    4316void test (string name,
     
    5427                                             _parameters_statistics,
    5528#endif
    56                                              _param);
     29                                             _param,
     30                                             USE_ALL);
    5731 
    5832#ifdef SYSTEMC
     
    362336  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    363337    {
    364       LABEL("Iteration "+toString(iteration));
     338      LABEL("Iteration %d",iteration);
    365339      int32_t percent_transaction_queue_in     = (rand()%45)+30;
    366340      int32_t percent_transaction_queue_out    = (rand()%45)+30;
     
    518492          SC_START(0);
    519493         
    520           LABEL("Test     READ_QUEUE_IN  : "+toString(READ_QUEUE_IN_VAL->read())+","+toString(READ_QUEUE_IN_ACK->read()));
     494          LABEL("Test     READ_QUEUE_IN  : %d,%d",READ_QUEUE_IN_VAL->read(),READ_QUEUE_IN_ACK->read());
    521495          if ((READ_QUEUE_IN_VAL->read() == 1) and
    522496              (READ_QUEUE_IN_ACK->read() == 1))
    523497            {
    524               LABEL("Accepted READ_QUEUE_IN  ["+toString(request_in)+"]");
     498              LABEL("Accepted READ_QUEUE_IN  [%d]",request_in);
    525499              request_in  ++;
    526500            }
    527           LABEL("Test     READ_QUEUE_OUT : "+toString(READ_QUEUE_OUT_VAL->read())+","+toString(READ_QUEUE_OUT_ACK->read()));
     501          LABEL("Test     READ_QUEUE_OUT : %d,%d",READ_QUEUE_OUT_VAL->read(),READ_QUEUE_OUT_ACK->read());
    528502          if ((READ_QUEUE_OUT_VAL->read() == 1) and
    529503              (READ_QUEUE_OUT_ACK->read() == 1))
     
    535509                rob_id = 0;
    536510              Tcontext_t ctxt   = _ooo_engine_id [rob_id];
    537               LABEL("Accepted READ_QUEUE_OUT ["+toString(rob_id)+"]");
     511              LABEL("Accepted READ_QUEUE_OUT [%d]",rob_id);
    538512             
    539513              TEST(uint32_t          , rob_id ,request_out);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Read_queue.h

    r81 r82  
    1717#include "Common/include/ToString.h"
    1818#include "Common/include/Debug.h"
    19 #include "Behavioural/include/Types.h"
    2019
    2120#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Parameters.h"
     21#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Types.h"
    2222#ifdef STATISTICS
    2323#include "Behavioural/include/Stat.h"
     
    2727#include "Behavioural/include/Vhdl.h"
    2828#endif
     29#include "Behavioural/include/Usage.h"
    2930
    3031namespace morpheo {
     
    3637namespace read_unit {
    3738namespace read_queue {
    38  
    39   class Tread_queue_entry_t
    40   {
    41   public    : Tcontext_t         _context_id   ;
    42   public    : Tcontext_t         _front_end_id ;
    43   public    : Tcontext_t         _ooo_engine_id;
    44   public    : Tpacket_t          _rob_id       ;
    45   public    : Toperation_t       _operation    ;
    46   public    : Ttype_t            _type         ;
    47   public    : Tlsq_ptr_t         _store_queue_ptr_write;
    48   public    : Tlsq_ptr_t         _load_queue_ptr_write;
    49   public    : Tcontrol_t         _has_immediat ;
    50   public    : Tgeneral_data_t    _immediat     ;
    51   public    : Tcontrol_t         _read_ra      ;
    52   public    : Tgeneral_address_t _num_reg_ra   ;
    53   public    : Tcontrol_t         _read_rb      ;
    54   public    : Tgeneral_address_t _num_reg_rb   ;
    55   public    : Tcontrol_t         _read_rc      ;
    56   public    : Tspecial_address_t _num_reg_rc   ;
    57   public    : Tcontrol_t         _write_rd     ;
    58   public    : Tgeneral_address_t _num_reg_rd   ;
    59   public    : Tcontrol_t         _write_re     ;
    60   public    : Tspecial_address_t _num_reg_re   ;
    61 
    62     friend std::ostream& operator<< (std::ostream& output_stream,
    63                                 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Tread_queue_entry_t & x)
    64     {
    65       output_stream << " * _context_id            : " << toString(x._context_id   ) << std::endl
    66                     << " * _front_end_id          : " << toString(x._front_end_id ) << std::endl
    67                     << " * _ooo_engine_id         : " << toString(x._ooo_engine_id) << std::endl
    68                     << " * _rob_id                : " << toString(x._rob_id       ) << std::endl
    69                     << " * _operation             : " << toString(x._operation    ) << std::endl
    70                     << " * _type                  : " << toString(x._type         ) << std::endl
    71                     << " * _store_queue_ptr_write : " << toString(x._store_queue_ptr_write) << std::endl
    72                     << " * _load_queue_ptr_write  : " << toString(x._load_queue_ptr_write ) << std::endl
    73                     << " * _has_immediat          : " << toString(x._has_immediat ) << std::endl
    74                     << " * _immediat              : " << toString(x._immediat     ) << std::endl
    75                     << " * _read_ra               : " << toString(x._read_ra      ) << std::endl
    76                     << " * _num_reg_ra            : " << toString(x._num_reg_ra   ) << std::endl
    77                     << " * _read_rb               : " << toString(x._read_rb      ) << std::endl
    78                     << " * _num_reg_rb            : " << toString(x._num_reg_rb   ) << std::endl
    79                     << " * _read_rc               : " << toString(x._read_rc      ) << std::endl
    80                     << " * _num_reg_rc            : " << toString(x._num_reg_rc   ) << std::endl
    81                     << " * _write_rd              : " << toString(x._write_rd     ) << std::endl
    82                     << " * _num_reg_rd            : " << toString(x._num_reg_rd   ) << std::endl
    83                     << " * _write_re              : " << toString(x._write_re     ) << std::endl
    84                     << " * _num_reg_re            : " << toString(x._num_reg_re   ) << std::endl;
    85 
    86       return output_stream;
    87     }
    88 
    89   };
    90 
    91   class Tread_queue_head_entry_t
    92   {
    93   public    : Tcontext_t         _context_id   ;
    94   public    : Tcontext_t         _front_end_id ;
    95   public    : Tcontext_t         _ooo_engine_id;
    96   public    : Tpacket_t          _rob_id       ;
    97   public    : Toperation_t       _operation    ;
    98   public    : Ttype_t            _type         ;
    99   public    : Tlsq_ptr_t         _store_queue_ptr_write;
    100   public    : Tlsq_ptr_t         _load_queue_ptr_write;
    101   public    : Tcontrol_t         _has_immediat ;
    102   public    : Tgeneral_data_t    _immediat     ;
    103   public    : Tcontrol_t         _read_ra      ;
    104   public    : Tcontrol_t         _read_ra_val  ; // 1 : must access at the registerFile (after access, is set at 0)
    105   public    : Tgeneral_address_t _num_reg_ra   ;
    106   public    : Tcontrol_t         _data_ra_val  ; // 1 : the read of registerFile is valid
    107   public    : Tgeneral_data_t    _data_ra      ;
    108   public    : Tcontrol_t         _read_rb      ;
    109   public    : Tcontrol_t         _read_rb_val  ;
    110   public    : Tgeneral_address_t _num_reg_rb   ;
    111   public    : Tcontrol_t         _data_rb_val  ;
    112   public    : Tgeneral_data_t    _data_rb      ;
    113   public    : Tcontrol_t         _read_rc      ;
    114   public    : Tcontrol_t         _read_rc_val  ;
    115   public    : Tspecial_address_t _num_reg_rc   ;
    116   public    : Tcontrol_t         _data_rc_val  ;
    117   public    : Tspecial_data_t    _data_rc      ;
    118   public    : Tcontrol_t         _write_rd     ;
    119   public    : Tgeneral_address_t _num_reg_rd   ;
    120   public    : Tcontrol_t         _write_re     ;
    121   public    : Tspecial_address_t _num_reg_re   ;
    122 
    123 #undef  FUNCTION
    124 #define FUNCTION "Tread_queue_head_entry_t::operator="
    125   public    : Tread_queue_head_entry_t& operator=(Tread_queue_entry_t x)
    126     {
    127       log_printf(FUNC,Read_queue,FUNCTION,"Begin");
    128          
    129       _context_id   = x._context_id   ;
    130       _front_end_id = x._front_end_id ;
    131       _ooo_engine_id= x._ooo_engine_id;
    132       _rob_id       = x._rob_id       ;
    133       _operation    = x._operation    ;
    134       _type         = x._type         ;
    135       _store_queue_ptr_write = x._store_queue_ptr_write;
    136       _load_queue_ptr_write  = x._load_queue_ptr_write ;
    137       _has_immediat = x._has_immediat ;
    138       _immediat     = x._immediat     ;
    139       _read_ra      = x._read_ra      ;
    140       _read_ra_val  = x._read_ra == 1 ; //if not must read, the registerFile is already access
    141       _num_reg_ra   = x._num_reg_ra   ;
    142       _data_ra_val  = x._read_ra == 0 ; //if not must read, the data is already valid
    143       _data_ra      = 0               ;
    144       _read_rb      = x._read_rb      ;
    145       _read_rb_val  = x._read_rb == 1 ;
    146       _num_reg_rb   = x._num_reg_rb   ;
    147       _data_rb_val  = x._read_rb == 0 ;
    148       _data_rb      = 0               ;
    149       _read_rc      = x._read_rc      ;
    150       _read_rc_val  = x._read_rc == 1 ;
    151       _num_reg_rc   = x._num_reg_rc   ;
    152       _data_rc_val  = x._read_rc == 0 ;
    153       _data_rc      = 0               ;
    154       _write_rd     = x._write_rd     ;
    155       _num_reg_rd   = x._num_reg_rd   ;
    156       _write_re     = x._write_re     ;
    157       _num_reg_re   = x._num_reg_re   ;
    158 
    159       log_printf(FUNC,Read_queue,FUNCTION,"End");
    160 
    161       return *this;
    162     }
    163 
    164     friend std::ostream& operator<< (std::ostream& output_stream,
    165                                 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Tread_queue_head_entry_t & x)
    166     {
    167       output_stream << " * _context_id            : " << x._context_id   << std::endl
    168                     << " * _front_end_id          : " << x._front_end_id << std::endl
    169                     << " * _ooo_engine_id         : " << x._ooo_engine_id<< std::endl
    170                     << " * _rob_id                : " << x._rob_id       << std::endl
    171                     << " * _operation             : " << x._operation    << std::endl
    172                     << " * _type                  : " << x._type         << std::endl
    173                     << " * _store_queue_ptr_write : " << toString(x._store_queue_ptr_write) << std::endl
    174                     << " * _load_queue_ptr_write  : " << toString(x._load_queue_ptr_write ) << std::endl
    175                     << " * _has_immediat          : " << x._has_immediat << std::endl
    176                     << " * _immediat              : " << x._immediat     << std::endl
    177                     << " * _read_ra               : " << x._read_ra      << std::endl
    178                     << " * _read_ra_val           : " << x._read_ra_val  << std::endl
    179                     << " * _num_reg_ra            : " << x._num_reg_ra   << std::endl
    180                     << " * _data_ra_val           : " << x._data_ra_val  << std::endl
    181                     << " * _data_ra               : " << x._data_ra      << std::endl
    182                     << " * _read_rb               : " << x._read_rb      << std::endl
    183                     << " * _read_rb_val           : " << x._read_rb_val  << std::endl
    184                     << " * _num_reg_rb            : " << x._num_reg_rb   << std::endl
    185                     << " * _data_rb_val           : " << x._data_rb_val  << std::endl
    186                     << " * _data_rb               : " << x._data_rb      << std::endl
    187                     << " * _read_rc               : " << x._read_rc      << std::endl
    188                     << " * _read_rc_val           : " << x._read_rc_val  << std::endl
    189                     << " * _num_reg_rc            : " << x._num_reg_rc   << std::endl
    190                     << " * _data_rc_val           : " << x._data_rc_val  << std::endl
    191                     << " * _data_rc               : " << x._data_rc      << std::endl
    192                     << " * _write_rd              : " << x._write_rd     << std::endl
    193                     << " * _num_reg_rd            : " << x._num_reg_rd   << std::endl
    194                     << " * _write_re              : " << x._write_re     << std::endl
    195                     << " * _num_reg_re            : " << x._num_reg_re   << std::endl;
    196 
    197       return output_stream;
    198     }
    199   };
    20039
    20140  class Read_queue
     
    20645    // -----[ fields ]----------------------------------------------------
    20746    // Parameters
    208   protected : const std::string                _name;
    209   protected : const Parameters               * _param;
     47  protected : const std::string  _name;
     48  protected : const Parameters * _param;
     49  private   : const Tusage_t     _usage;
    21050
    21151#ifdef STATISTICS
     
    345185                                              morpheo::behavioural::Parameters_Statistics * param_statistics,
    346186#endif
    347                                               Parameters                                  * param );
     187                                              Parameters                                  * param,
     188                                              morpheo::behavioural::Tusage_t                usage);
    348189                                               
    349190  public  :          Read_queue              (Parameters * param );
     
    381222}; // end namespace multi_execute_loop
    382223}; // end namespace core
    383 
    384224}; // end namespace behavioural
    385225}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue.cpp

    r81 r82  
    1818
    1919
    20 #ifdef SYSTEMC
    21   Read_queue::Read_queue (sc_module_name name,
     20  Read_queue::Read_queue
     21  (
     22#ifdef SYSTEMC
     23   sc_module_name name,
    2224#else
    23   Read_queue::Read_queue (string name,
     25   std::string name,
    2426#endif
    2527#ifdef STATISTICS
    26                               morpheo::behavioural::Parameters_Statistics            * param_statistics,
    27 #endif
    28                               morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters * param ):
    29                               _name              (name)
    30                               ,_param            (param)
     28   morpheo::behavioural::Parameters_Statistics            * param_statistics,
     29#endif
     30   morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters * param,
     31   morpheo::behavioural::Tusage_t usage ):
     32    _name              (name)
     33    ,_param            (param)
     34    ,_usage (usage)
    3135  {
    3236    log_printf(FUNC,Read_queue,"Read_queue","Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_allocation.cpp

    r81 r82  
    2323    log_printf(FUNC,Read_queue,"allocation","Begin");
    2424
    25     _component   = new Component ();
     25    _component   = new Component (_usage);
    2626
    2727    Entity * entity = _component->set_entity (_name       
Note: See TracChangeset for help on using the changeset viewer.