Changeset 78 for trunk/IPs


Ignore:
Timestamp:
Mar 27, 2008, 11:04:49 AM (16 years ago)
Author:
rosiere
Message:

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
Location:
trunk/IPs/systemC
Files:
1248 added
2 deleted
192 edited
7 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/hierarchy_memory/cache/cache_onelevel.h

    r2 r78  
    1212#include "access_port.h"
    1313#include "write_buffer.h"
    14 
    15 using namespace std;
    16 using namespace hierarchy_memory::sort_file;
    17 using namespace hierarchy_memory::cache::cache_multilevel;
    1814
    1915namespace hierarchy_memory          {
     
    518514      }
    519515
    520     };
     516  };
    521517};};};};
    522518#endif //!CACHE_ONELEVEL_H
  • trunk/IPs/systemC/hierarchy_memory/file/main.cpp

    r2 r78  
    179179    if (my_Sort_File_Dynamic.pop().data !=  1 )              test_ko ( 2); cout << my_Sort_File_Dynamic << endl;
    180180    if (my_Sort_File_Dynamic.pop().data !=  2 )              test_ko ( 3); cout << my_Sort_File_Dynamic << endl;
    181    
    182 
    183181  }
    184182
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Makefile.deps

    r72 r78  
    2020Functionnal_unit_LIBRARY        =       -lFunctionnal_unit      \
    2121                                        $(Custom_LIBRARY)       \
     22                                        -lFunctionnal_unit      \
    2223                                        $(Behavioural_LIBRARY) 
    2324
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Operation.h

    r72 r78  
    1313#include "Common/include/ErrorMorpheo.h"
    1414#include "Behavioural/include/Types.h"
    15 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Types.h"
     15#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Types.h"
    1616
    1717namespace morpheo {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Types.h

    r76 r78  
    148148  };
    149149 
    150   typedef void function_execute_t (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_operation_t *,
    151                                    morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t  *,
    152                                    morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t     *);
    153 
    154   typedef void function_execute_end_cycle_t (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t  *,
    155                                              morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t     *);
     150  typedef void function_execute_t
     151  (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_operation_t *,
     152   morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t  *,
     153   morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t     *);
     154 
     155  typedef void function_execute_end_cycle_t
     156  (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t  *,
     157   morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t     *);
    156158
    157159 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/src/Operation.cpp

    r76 r78  
    77 */
    88
    9 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Operation.h"
     9#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Operation.h"
    1010
    1111#define neg(data)                  (~(data)+1)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/configuration.cfg

    r77 r78  
    882       2       +1      # size_special_data 
    9916      16      +1      # nb_special_register
     104       4       *2      # size_store_queue
     111       4       *4      # size_load_queue
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/main.cpp

    r77 r78  
    99#include "Behavioural/Custom/include/Custom_example.h"
    1010
    11 #define NB_PARAMS 8
     11#define NB_PARAMS 10
    1212
    1313void usage (int argc, char * argv[])
     
    2323  err (_("  * size_special_data   (uint32_t)\n"));
    2424  err (_("  * nb_special_register (uint32_t)\n"));
     25  err (_("  * size_store_queue    (uint32_t)\n"));
     26  err (_("  * size_load_queue     (uint32_t)\n"));
    2527  exit (1);
    2628}
     
    4648  const uint32_t size_special_data   = atoi(argv[x++]);
    4749  const uint32_t nb_special_register = atoi(argv[x++]);
     50  const uint32_t size_store_queue    = atoi(argv[x++]);
     51  const uint32_t size_load_queue     = atoi(argv[x++]);
    4852
    4953  execute_timing_t ** timing = new execute_timing_t * [MAX_TYPE];
     
    6872         size_special_data   ,
    6973         nb_special_register ,
     74         size_store_queue    ,
     75         size_load_queue     ,
    7076         timing              ,
    7177         &(morpheo::behavioural::custom::example_get_custom_information)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/test.cpp

    r76 r78  
    142142  sc_signal<Toperation_t      >  in_EXECUTE_IN_OPERATION      (rename.c_str());
    143143  sc_signal<Ttype_t           >  in_EXECUTE_IN_TYPE           (rename.c_str());
     144  sc_signal<Tlsq_ptr_t        >  in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE (rename.c_str());
     145  sc_signal<Tlsq_ptr_t        >  in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE  (rename.c_str());
    144146  sc_signal<Tcontrol_t        >  in_EXECUTE_IN_HAS_IMMEDIAT   (rename.c_str());
    145147  sc_signal<Tgeneral_data_t   >  in_EXECUTE_IN_IMMEDIAT       (rename.c_str());
     
    160162  sc_signal<Tpacket_t         > out_EXECUTE_OUT_PACKET_ID      (rename.c_str());
    161163//sc_signal<Toperation_t      > out_EXECUTE_OUT_OPERATION      (rename.c_str());
    162 //sc_signal<Ttype_t           > out_EXECUTE_OUT_TYPE           (rename.c_str());
     164  sc_signal<Ttype_t           > out_EXECUTE_OUT_TYPE           (rename.c_str());
    163165  sc_signal<Tcontrol_t        > out_EXECUTE_OUT_WRITE_RD       (rename.c_str());
    164166  sc_signal<Tgeneral_address_t> out_EXECUTE_OUT_NUM_REG_RD     (rename.c_str());
     
    191193  (*(_Functionnal_unit-> in_EXECUTE_IN_OPERATION     )) ( in_EXECUTE_IN_OPERATION     );
    192194  (*(_Functionnal_unit-> in_EXECUTE_IN_TYPE          )) ( in_EXECUTE_IN_TYPE          );
     195  (*(_Functionnal_unit-> in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE)) ( in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE);
     196  if (_param->_have_port_load_queue_ptr)
     197  (*(_Functionnal_unit-> in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE )) ( in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE );
    193198  (*(_Functionnal_unit-> in_EXECUTE_IN_HAS_IMMEDIAT  )) ( in_EXECUTE_IN_HAS_IMMEDIAT  );
    194199  (*(_Functionnal_unit-> in_EXECUTE_IN_IMMEDIAT      )) ( in_EXECUTE_IN_IMMEDIAT      );
     
    212217  (*(_Functionnal_unit->out_EXECUTE_OUT_PACKET_ID    )) (out_EXECUTE_OUT_PACKET_ID    );
    213218//(*(_Functionnal_unit->out_EXECUTE_OUT_OPERATION    )) (out_EXECUTE_OUT_OPERATION    );
    214 //(*(_Functionnal_unit->out_EXECUTE_OUT_TYPE         )) (out_EXECUTE_OUT_TYPE         );
     219  (*(_Functionnal_unit->out_EXECUTE_OUT_TYPE         )) (out_EXECUTE_OUT_TYPE         );
    215220  (*(_Functionnal_unit->out_EXECUTE_OUT_WRITE_RD     )) (out_EXECUTE_OUT_WRITE_RD     );
    216221  (*(_Functionnal_unit->out_EXECUTE_OUT_NUM_REG_RD   )) (out_EXECUTE_OUT_NUM_REG_RD   );
     
    616621              in_EXECUTE_IN_OPERATION     .write(transaction_in.front()._operation    );
    617622              in_EXECUTE_IN_TYPE          .write(transaction_in.front()._type         );
     623              in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE.write(0);
     624              if (_param->_have_port_load_queue_ptr)
     625              in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE .write(0);
    618626              in_EXECUTE_IN_HAS_IMMEDIAT  .write(transaction_in.front()._has_immediat );
    619627              in_EXECUTE_IN_IMMEDIAT      .write(transaction_in.front()._immediat     );
     
    641649              TEST(Tcontext_t        , out_EXECUTE_OUT_OOO_ENGINE_ID.read(), transaction_out.front()._ooo_engine_id);
    642650            //TEST(Toperation_t      , out_EXECUTE_OUT_OPERATION    .read(), transaction_out.front()._operation    );
    643             //TEST(Ttype_t           , out_EXECUTE_OUT_TYPE         .read(), transaction_out.front()._type         );
     651              TEST(Ttype_t           , out_EXECUTE_OUT_TYPE         .read(), transaction_out.front()._type         );
    644652              TEST(Tcontrol_t        , out_EXECUTE_OUT_WRITE_RE     .read(), transaction_out.front()._write_re     );
    645653              TEST(Tgeneral_address_t, out_EXECUTE_OUT_NUM_REG_RD   .read(), transaction_out.front()._num_reg_rd   );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Functionnal_unit.h

    r76 r78  
    1010 */
    1111
    12 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Operation.h"
    13 
    1412#ifdef SYSTEMC
    1513#include "systemc.h"
     
    2018#include "Common/include/Debug.h"
    2119#include "Behavioural/include/Types.h"
     20#include "Behavioural/include/Identification.h"
    2221
     22#include "Behavioural/include/Types.h"
    2323#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Parameters.h"
    24 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Types.h"
     24#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Operation.h"
    2525#ifdef STATISTICS
    2626#include "Behavioural/include/Stat.h"
     
    8686  public    : SC_IN (Toperation_t      )    *  in_EXECUTE_IN_OPERATION      ;
    8787  public    : SC_IN (Ttype_t           )    *  in_EXECUTE_IN_TYPE           ;
     88  public    : SC_IN (Tlsq_ptr_t        )    *  in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE;
     89  public    : SC_IN (Tlsq_ptr_t        )    *  in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE;
    8890  public    : SC_IN (Tcontrol_t        )    *  in_EXECUTE_IN_HAS_IMMEDIAT   ;
    8991  public    : SC_IN (Tgeneral_data_t   )    *  in_EXECUTE_IN_IMMEDIAT       ;
     
    104106  public    : SC_OUT(Tpacket_t         )    * out_EXECUTE_OUT_PACKET_ID      ;
    105107//public    : SC_OUT(Toperation_t      )    * out_EXECUTE_OUT_OPERATION      ;
    106 //public    : SC_OUT(Ttype_t           )    * out_EXECUTE_OUT_TYPE           ;
     108  public    : SC_OUT(Ttype_t           )    * out_EXECUTE_OUT_TYPE           ;
    107109  public    : SC_OUT(Tcontrol_t        )    * out_EXECUTE_OUT_WRITE_RD       ;
    108110  public    : SC_OUT(Tgeneral_address_t)    * out_EXECUTE_OUT_NUM_REG_RD     ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Parameters.h

    r77 r78  
    1111#include "Common/include/Debug.h"
    1212#include "Behavioural/include/Parameters.h"
    13 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Types.h"
     13#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Types.h"
    1414#include "Behavioural/Custom/include/Custom.h"
     15#include "Behavioural/Custom/include/Custom_default.h"
    1516#include <math.h>
    1617
     
    3637  public : const uint32_t            _size_special_data            ;
    3738  public : const uint32_t            _nb_special_register          ;
     39  public : const uint32_t            _size_store_queue             ;
     40  public : const uint32_t            _size_load_queue              ;
     41
    3842  public :       execute_timing_t ** _timing                       ;
    3943  public : morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (uint32_t);
     
    5054  public : const bool                _have_port_ooo_engine_id      ;
    5155  public : const bool                _have_port_packet_id          ;
     56  public : const bool                _have_port_load_queue_ptr     ;
    5257
    5358  public : const bool                _have_groupe_MAC              ;
     
    6267                        uint32_t           size_special_data  ,
    6368                        uint32_t           nb_special_register,
     69                        uint32_t           size_store_queue   ,
     70                        uint32_t           size_load_queue    ,
    6471                        execute_timing_t** timing             ,
    6572                        morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t));
     
    6774  public : ~Parameters () ;
    6875
    69   public :        std::string  msg_error  (void);
     76  public :        Parameters_test msg_error  (void);
    7077
    7178  public :        std::string   print      (uint32_t depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_allocation.cpp

    r77 r78  
    7171       in_EXECUTE_IN_OPERATION     = interface->set_signal_in <Toperation_t      > ("operation"    , _param->_size_operation    );
    7272       in_EXECUTE_IN_TYPE          = interface->set_signal_in <Ttype_t           > ("type"         , _param->_size_type         );
     73       in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("store_queue_ptr_write",log2(_param->_size_store_queue));
     74       if (_param->_have_port_load_queue_ptr)
     75       in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_in <Tlsq_ptr_t> ("load_queue_ptr_write" ,log2(_param->_size_load_queue));
    7376       in_EXECUTE_IN_HAS_IMMEDIAT  = interface->set_signal_in <Tcontrol_t        > ("has_immediat" , 1);
    7477       in_EXECUTE_IN_IMMEDIAT      = interface->set_signal_in <Tgeneral_data_t   > ("immediat"     , _param->_size_general_data);
     
    102105       out_EXECUTE_OUT_PACKET_ID      = interface->set_signal_out<Tpacket_t         > ("packet_id"    ,_param->_size_packet_id    );
    103106     //out_EXECUTE_OUT_OPERATION      = interface->set_signal_out<Toperation_t      > ("operation"    ,_param->_size_operation    );
    104      //out_EXECUTE_OUT_TYPE           = interface->set_signal_out<Ttype_t           > ("type"         ,_param->_size_type         );
     107       out_EXECUTE_OUT_TYPE           = interface->set_signal_out<Ttype_t           > ("type"         ,_param->_size_type         );
    105108       out_EXECUTE_OUT_WRITE_RD       = interface->set_signal_out<Tcontrol_t        > ("write_rd"     ,1);
    106109       out_EXECUTE_OUT_NUM_REG_RD     = interface->set_signal_out<Tgeneral_address_t> ("num_reg_rd"   ,_param->_size_general_register);
     
    111114       out_EXECUTE_OUT_EXCEPTION      = interface->set_signal_out<Texception_t      > ("exception"    ,_param->_size_exception);
    112115       out_EXECUTE_OUT_NO_SEQUENCE    = interface->set_signal_out<Tcontrol_t        > ("no_sequence"  ,1);
    113        out_EXECUTE_OUT_ADDRESS        = interface->set_signal_out<Tgeneral_data_t   > ("address     " ,_param->_size_general_data);
     116       out_EXECUTE_OUT_ADDRESS        = interface->set_signal_out<Tgeneral_data_t   > ("address"      ,_param->_size_general_data);
    114117     }
    115118
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_deallocation.cpp

    r76 r78  
    4141        delete  in_EXECUTE_IN_OPERATION     ;
    4242        delete  in_EXECUTE_IN_TYPE          ;
     43        delete  in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE;
     44        if (_param->_have_port_load_queue_ptr)
     45        delete  in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE ;
    4346        delete  in_EXECUTE_IN_HAS_IMMEDIAT  ;
    4447        delete  in_EXECUTE_IN_IMMEDIAT      ;
     
    6265        delete out_EXECUTE_OUT_PACKET_ID      ;
    6366      //delete out_EXECUTE_OUT_OPERATION      ;
    64       //delete out_EXECUTE_OUT_TYPE           ;
     67        delete out_EXECUTE_OUT_TYPE           ;
    6568        delete out_EXECUTE_OUT_WRITE_RD       ;
    6669        delete out_EXECUTE_OUT_NUM_REG_RD     ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_genMoore.cpp

    r72 r78  
    3737    PORT_WRITE(out_EXECUTE_OUT_PACKET_ID    ,_execute_operation->_packet_id    );
    3838  //PORT_WRITE(out_EXECUTE_OUT_OPERATION    ,_execute_operation->_operation    );
    39   //PORT_WRITE(out_EXECUTE_OUT_TYPE         ,_execute_operation->_type         );
     39    PORT_WRITE(out_EXECUTE_OUT_TYPE         ,_execute_operation->_type         );
    4040    PORT_WRITE(out_EXECUTE_OUT_WRITE_RD     ,_execute_operation->_write_rd     );
    4141    PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RD   ,_execute_operation->_num_reg_rd   );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters.cpp

    r77 r78  
    2828                          uint32_t           size_special_data  ,
    2929                          uint32_t           nb_special_register,
     30                          uint32_t           size_store_queue   ,
     31                          uint32_t           size_load_queue    ,
    3032                          execute_timing_t** timing             ,
    3133                          morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t)) :
     
    3840    _size_special_data       (size_special_data     ),
    3941    _nb_special_register     (nb_special_register   ),
    40    
     42    _size_store_queue        (size_store_queue      ),
     43    _size_load_queue         (size_load_queue       ),
     44
    4145    _size_context_id         (log2(nb_context      )),
    4246    _size_front_end_id       (log2(nb_front_end    )),
    4347    _size_ooo_engine_id      (log2(nb_ooo_engine   )),
    4448    _size_packet_id          (log2(nb_packet       )),
    45     _size_general_register   (log2(_size_general_register)),
    46     _size_special_register   (log2(_size_special_register)),
     49    _size_general_register   (log2(nb_general_register)),
     50    _size_special_register   (log2(nb_special_register)),
    4751
    4852    _have_port_context_id    (_size_context_id    > 0),
     
    5054    _have_port_ooo_engine_id (_size_ooo_engine_id > 0),
    5155    _have_port_packet_id     (_size_packet_id     > 0),
     56    _have_port_load_queue_ptr(_size_load_queue    > 1),
    5257
    5358    _have_groupe_MAC         ( (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC  ]._latence > 0) or
     
    5863
    5964    _timing                 = timing;
    60     _get_custom_information = get_custom_information;
     65
     66    if (get_custom_information == NULL)
     67      _get_custom_information = &(morpheo::behavioural::custom::default_get_custom_information);
     68    else
     69      _get_custom_information = get_custom_information;
    6170
    6271    test();
     
    7685    _size_special_data       (param._size_special_data      ),
    7786    _nb_special_register     (param._nb_special_register    ),
     87    _size_store_queue        (param._size_store_queue       ),
     88    _size_load_queue         (param._size_load_queue        ),
    7889
    7990    _size_context_id         (param._size_context_id        ),
     
    8899    _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
    89100    _have_port_packet_id     (param._have_port_packet_id    ),
     101    _have_port_load_queue_ptr(param._have_port_load_queue_ptr),
    90102
    91103    _have_groupe_MAC         (param._have_groupe_MAC        )
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters_msg_error.cpp

    r77 r78  
    2222#undef  FUNCTION
    2323#define FUNCTION "Functionnal_unit::msg_error"
    24   std::string Parameters::msg_error(void)
     24  Parameters_test Parameters::msg_error(void)
    2525  {
    2626    log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
    2727
    28     std::string msg = "";
     28    Parameters_test test("Functionnal_unit");
    2929
    3030    for (uint32_t i=0; i<_nb_type; i++)
    3131      for (uint32_t j=0; j<_nb_operation; j++)
    3232        if (_timing[i][j]._delay != _timing[i][j]._latence)
    33           msg = "  - For the type '"+toString(i)+"', and the operation '"+toString(j)+"', the delay and the latence must be equal.";
     33          test.error("For the type '"+toString(i)+"', and the operation '"+toString(j)+"', the delay and the latence must be equal.");
    3434
    3535    if (_have_groupe_MAC and ((_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC  ]._latence == 0) or
    3636                              (_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC]._latence == 0) or
    3737                              (_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB  ]._latence == 0)))
    38       msg = "  - The functionnal unit implement a MAC unit, the latence to operation OPERATION_ALU_L_MAC, OPERATION_ALU_L_MACRC and OPERATION_ALU_L_MSB must be higher than 0.";
    39 
    40     return msg;
     38      test.error("The functionnal unit implement a MAC unit, the latence to operation OPERATION_ALU_L_MAC, OPERATION_ALU_L_MACRC and OPERATION_ALU_L_MSB must be higher than 0.");
    4139
    4240    log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
     41
     42    return test;
    4343  };
    4444
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/configuration.cfg

    r77 r78  
    552       2       +1      # nb_port_check
    662       2       +1      # speculative_load       {none,access,commit,bypass}
     70       0       +1      # bypass_memory
    782       2       *2      # nb_context             1      1       *2     
    892       2       *2      # nb_front_end           1      1       *2     
     
    101164      64      *2      # nb_packet             
    111232      32      *2      # size_general_data     
     132       2       *2      # size_special_data     
    121432      32      *2      # nb_general_register   
     1516      16      *2      # nb_special_register   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/main.cpp

    r77 r78  
    1010#define number_of_test 2
    1111
    12 #define NB_PARAMS 11
     12#define NB_PARAMS 14
    1313
    1414void usage (int argc, char * argv[])
     
    2121       << " - nb_port_check           (uint32_t)" << endl
    2222       << " - speculative_load        (uint32_t)" << endl
     23       << " - nb_bypass_memory        (uint32_t)" << endl
    2324       << " - nb_context              (uint32_t)" << endl
    2425       << " - nb_front_end            (uint32_t)" << endl
     
    2627       << " - nb_packet               (uint32_t)" << endl
    2728       << " - size_general_data       (uint32_t)" << endl
     29       << " - size_special_data       (uint32_t)" << endl
    2830       << " - nb_general_register     (uint32_t)" << endl
     31       << " - nb_special_register     (uint32_t)" << endl
    2932       << "" << endl;
    3033
     
    5861        const uint32_t            _nb_port_check           = atoi(argv[x++]);
    5962        const Tspeculative_load_t _speculative_load        = fromString<Tspeculative_load_t>(argv[x++]);
     63        const uint32_t            _nb_bypass_memory        = atoi(argv[x++]);
    6064        const uint32_t            _nb_context              = atoi(argv[x++]);
    6165        const uint32_t            _nb_front_end            = atoi(argv[x++]);
     
    6367        const uint32_t            _nb_packet               = atoi(argv[x++]);
    6468        const uint32_t            _size_general_data       = atoi(argv[x++]);
     69        const uint32_t            _size_special_data       = atoi(argv[x++]);
    6570        const uint32_t            _nb_general_register     = atoi(argv[x++]);
     71        const uint32_t            _nb_special_register     = atoi(argv[x++]);
    6672       
    6773        try
     
    7480               _nb_port_check          ,
    7581               _speculative_load       ,
     82               _nb_bypass_memory       ,
    7683               _nb_context             ,
    7784               _nb_front_end           ,
     
    7986               _nb_packet              ,
    8087               _size_general_data      ,
    81                _nb_general_register    );
     88               _size_special_data      ,
     89               _nb_general_register    ,
     90               _nb_special_register    );
    8291           
    8392            cout << param->print(1);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test1.cpp

    r72 r78  
    7373  sc_signal<Tlsq_ptr_t        > *   in_MEMORY_IN_STORE_QUEUE_PTR_WRITE = new sc_signal<Tlsq_ptr_t        > (rename.c_str());
    7474  sc_signal<Tlsq_ptr_t        > *   in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE  = new sc_signal<Tlsq_ptr_t        > (rename.c_str());
    75   //sc_signal<Tcontrol_t        > *   in_MEMORY_IN_HAS_IMMEDIAT          = new sc_signal<Tcontrol_t        > (rename.c_str());
     75  sc_signal<Tcontrol_t        > *   in_MEMORY_IN_HAS_IMMEDIAT          = new sc_signal<Tcontrol_t        > (rename.c_str());
    7676  sc_signal<Tgeneral_data_t   > *   in_MEMORY_IN_IMMEDIAT              = new sc_signal<Tgeneral_data_t   > (rename.c_str());
    7777  sc_signal<Tgeneral_data_t   > *   in_MEMORY_IN_DATA_RA               = new sc_signal<Tgeneral_data_t   > (rename.c_str());
    7878  sc_signal<Tgeneral_data_t   > *   in_MEMORY_IN_DATA_RB               = new sc_signal<Tgeneral_data_t   > (rename.c_str());
    79   //sc_signal<Tspecial_data_t   > *   in_MEMORY_IN_DATA_RC               = new sc_signal<Tspecial_data_t   > (rename.c_str());
    80 //   sc_signal<Tcontrol_t        > *   in_MEMORY_IN_WRITE_RD              = new sc_signal<Tcontrol_t        > (rename.c_str());
     79  sc_signal<Tspecial_data_t   > *   in_MEMORY_IN_DATA_RC               = new sc_signal<Tspecial_data_t   > (rename.c_str());
     80  sc_signal<Tcontrol_t        > *   in_MEMORY_IN_WRITE_RD              = new sc_signal<Tcontrol_t        > (rename.c_str());
    8181  sc_signal<Tgeneral_address_t> *   in_MEMORY_IN_NUM_REG_RD            = new sc_signal<Tgeneral_address_t> (rename.c_str());
    82   //sc_signal<Tcontrol_t        > *   in_MEMORY_IN_WRITE_RE              = new sc_signal<Tcontrol_t        > (rename.c_str());
    83   //sc_signal<Tspecial_address_t> *   in_MEMORY_IN_NUM_REG_RE            = new sc_signal<Tspecial_address_t> (rename.c_str());
     82  sc_signal<Tcontrol_t        > *   in_MEMORY_IN_WRITE_RE              = new sc_signal<Tcontrol_t        > (rename.c_str());
     83  sc_signal<Tspecial_address_t> *   in_MEMORY_IN_NUM_REG_RE            = new sc_signal<Tspecial_address_t> (rename.c_str());
    8484
    8585  sc_signal<Tcontrol_t        > *  out_MEMORY_OUT_VAL           = new sc_signal<Tcontrol_t        >(rename.c_str());
     
    8989  sc_signal<Tcontext_t        > *  out_MEMORY_OUT_OOO_ENGINE_ID = new sc_signal<Tcontext_t        >(rename.c_str());
    9090  sc_signal<Tpacket_t         > *  out_MEMORY_OUT_PACKET_ID     = new sc_signal<Tpacket_t         >(rename.c_str());
     91//   sc_signal<Toperation_t      > *  out_MEMORY_OUT_OPERATION     = new sc_signal<Toperation_t      >(rename.c_str());
     92  sc_signal<Ttype_t           > *  out_MEMORY_OUT_TYPE          = new sc_signal<Ttype_t           >(rename.c_str());
    9193  sc_signal<Tcontrol_t        > *  out_MEMORY_OUT_WRITE_RD      = new sc_signal<Tcontrol_t        >(rename.c_str());
    9294  sc_signal<Tgeneral_address_t> *  out_MEMORY_OUT_NUM_REG_RD    = new sc_signal<Tgeneral_address_t>(rename.c_str());
    9395  sc_signal<Tgeneral_data_t   > *  out_MEMORY_OUT_DATA_RD       = new sc_signal<Tgeneral_data_t   >(rename.c_str());
    94   //sc_signal<Tcontrol_t        > *  out_MEMORY_OUT_WRITE_RE      = new sc_signal<Tcontrol_t        >(rename.c_str());
    95   //sc_signal<Tspecial_address_t> *  out_MEMORY_OUT_NUM_REG_RE    = new sc_signal<Tspecial_address_t>(rename.c_str());
    96   //sc_signal<Tspecial_data_t   > *  out_MEMORY_OUT_DATA_RE       = new sc_signal<Tspecial_data_t   >(rename.c_str());
     96  sc_signal<Tcontrol_t        > *  out_MEMORY_OUT_WRITE_RE      = new sc_signal<Tcontrol_t        >(rename.c_str());
     97  sc_signal<Tspecial_address_t> *  out_MEMORY_OUT_NUM_REG_RE    = new sc_signal<Tspecial_address_t>(rename.c_str());
     98  sc_signal<Tspecial_data_t   > *  out_MEMORY_OUT_DATA_RE       = new sc_signal<Tspecial_data_t   >(rename.c_str());
    9799  sc_signal<Texception_t      > *  out_MEMORY_OUT_EXCEPTION     = new sc_signal<Texception_t      >(rename.c_str());
     100  sc_signal<Tcontrol_t        > *  out_MEMORY_OUT_NO_SEQUENCE   = new sc_signal<Tcontrol_t        >(rename.c_str());
     101  sc_signal<Tgeneral_data_t   > *  out_MEMORY_OUT_ADDRESS       = new sc_signal<Tgeneral_data_t   >(rename.c_str());
    98102
    99103  sc_signal<Tcontrol_t        > * out_DCACHE_REQ_VAL        = new sc_signal<Tcontrol_t        >(rename.c_str());
     
    112116  sc_signal<Tdcache_error_t   > *  in_DCACHE_RSP_ERROR      = new sc_signal<Tdcache_error_t   >(rename.c_str());
    113117 
    114   sc_signal<Tcontrol_t        > ** out_BYPASS_MEMORY_VAL           = new sc_signal<Tcontrol_t        > * [_param->_size_load_queue];
    115   sc_signal<Tcontext_t        > ** out_BYPASS_MEMORY_OOO_ENGINE_ID = new sc_signal<Tcontext_t        > * [_param->_size_load_queue];
    116   sc_signal<Tgeneral_address_t> ** out_BYPASS_MEMORY_NUM_REG       = new sc_signal<Tgeneral_address_t> * [_param->_size_load_queue];
    117   sc_signal<Tgeneral_data_t   > ** out_BYPASS_MEMORY_DATA          = new sc_signal<Tgeneral_data_t   > * [_param->_size_load_queue];
     118  sc_signal<Tcontrol_t        > ** out_BYPASS_MEMORY_VAL           = new sc_signal<Tcontrol_t        > * [_param->_nb_bypass_memory];
     119  sc_signal<Tcontext_t        > ** out_BYPASS_MEMORY_OOO_ENGINE_ID = new sc_signal<Tcontext_t        > * [_param->_nb_bypass_memory];
     120  sc_signal<Tgeneral_address_t> ** out_BYPASS_MEMORY_NUM_REG       = new sc_signal<Tgeneral_address_t> * [_param->_nb_bypass_memory];
     121  sc_signal<Tgeneral_data_t   > ** out_BYPASS_MEMORY_DATA          = new sc_signal<Tgeneral_data_t   > * [_param->_nb_bypass_memory];
    118122   
    119   for (uint32_t i=0; i<_param->_size_load_queue; i++)
     123  for (uint32_t i=0; i<_param->_nb_bypass_memory; i++)
    120124    {
    121125      out_BYPASS_MEMORY_VAL           [i] = new sc_signal<Tcontrol_t        >(rename.c_str());
     
    137141  (*(_Load_store_unit->out_MEMORY_IN_ACK                  ))(*(out_MEMORY_IN_ACK                  ));
    138142  if (_param->_have_port_context_id)
    139     (*(_Load_store_unit-> in_MEMORY_IN_CONTEXT_ID           ))(*( in_MEMORY_IN_CONTEXT_ID           ));
     143  (*(_Load_store_unit-> in_MEMORY_IN_CONTEXT_ID           ))(*( in_MEMORY_IN_CONTEXT_ID           ));
    140144  if (_param->_have_port_front_end_id)
    141     (*(_Load_store_unit-> in_MEMORY_IN_FRONT_END_ID         ))(*( in_MEMORY_IN_FRONT_END_ID         ));
     145  (*(_Load_store_unit-> in_MEMORY_IN_FRONT_END_ID         ))(*( in_MEMORY_IN_FRONT_END_ID         ));
    142146  if (_param->_have_port_ooo_engine_id)
    143     (*(_Load_store_unit-> in_MEMORY_IN_OOO_ENGINE_ID        ))(*( in_MEMORY_IN_OOO_ENGINE_ID        ));
     147  (*(_Load_store_unit-> in_MEMORY_IN_OOO_ENGINE_ID        ))(*( in_MEMORY_IN_OOO_ENGINE_ID        ));
    144148  if (_param->_have_port_packet_id)
    145     (*(_Load_store_unit-> in_MEMORY_IN_PACKET_ID            ))(*( in_MEMORY_IN_PACKET_ID            ));
     149  (*(_Load_store_unit-> in_MEMORY_IN_PACKET_ID            ))(*( in_MEMORY_IN_PACKET_ID            ));
    146150  (*(_Load_store_unit-> in_MEMORY_IN_OPERATION            ))(*( in_MEMORY_IN_OPERATION            ));
     151  (*(_Load_store_unit-> in_MEMORY_IN_TYPE                 ))(*( in_MEMORY_IN_TYPE                 ));
    147152  (*(_Load_store_unit-> in_MEMORY_IN_STORE_QUEUE_PTR_WRITE))(*( in_MEMORY_IN_STORE_QUEUE_PTR_WRITE));
     153  if (_param->_have_port_load_queue_ptr)
    148154  (*(_Load_store_unit-> in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ))(*( in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ));
    149   //(*(_Load_store_unit-> in_MEMORY_IN_HAS_IMMEDIAT         ))(*( in_MEMORY_IN_HAS_IMMEDIAT         ));
     155  (*(_Load_store_unit-> in_MEMORY_IN_HAS_IMMEDIAT         ))(*( in_MEMORY_IN_HAS_IMMEDIAT         ));
    150156  (*(_Load_store_unit-> in_MEMORY_IN_IMMEDIAT             ))(*( in_MEMORY_IN_IMMEDIAT             ));
    151157  (*(_Load_store_unit-> in_MEMORY_IN_DATA_RA              ))(*( in_MEMORY_IN_DATA_RA              ));
    152158  (*(_Load_store_unit-> in_MEMORY_IN_DATA_RB              ))(*( in_MEMORY_IN_DATA_RB              ));
    153   //(*(_Load_store_unit-> in_MEMORY_IN_DATA_RC              ))(*( in_MEMORY_IN_DATA_RC              ));
    154 //   (*(_Load_store_unit-> in_MEMORY_IN_WRITE_RD             ))(*( in_MEMORY_IN_WRITE_RD             ));
     159  (*(_Load_store_unit-> in_MEMORY_IN_DATA_RC              ))(*( in_MEMORY_IN_DATA_RC              ));
     160  (*(_Load_store_unit-> in_MEMORY_IN_WRITE_RD             ))(*( in_MEMORY_IN_WRITE_RD             ));
    155161  (*(_Load_store_unit-> in_MEMORY_IN_NUM_REG_RD           ))(*( in_MEMORY_IN_NUM_REG_RD           ));
    156   //(*(_Load_store_unit-> in_MEMORY_IN_WRITE_RE             ))(*( in_MEMORY_IN_WRITE_RE             ));
    157   //(*(_Load_store_unit-> in_MEMORY_IN_NUM_REG_RE           ))(*( in_MEMORY_IN_NUM_REG_RE           ));
     162  (*(_Load_store_unit-> in_MEMORY_IN_WRITE_RE             ))(*( in_MEMORY_IN_WRITE_RE             ));
     163  (*(_Load_store_unit-> in_MEMORY_IN_NUM_REG_RE           ))(*( in_MEMORY_IN_NUM_REG_RE           ));
    158164 
    159165  (*(_Load_store_unit->out_MEMORY_OUT_VAL           ))(*(out_MEMORY_OUT_VAL           ));
    160166  (*(_Load_store_unit-> in_MEMORY_OUT_ACK           ))(*( in_MEMORY_OUT_ACK           ));
    161167  if (_param->_have_port_context_id)
    162     (*(_Load_store_unit->out_MEMORY_OUT_CONTEXT_ID    ))(*(out_MEMORY_OUT_CONTEXT_ID    ));
     168  (*(_Load_store_unit->out_MEMORY_OUT_CONTEXT_ID    ))(*(out_MEMORY_OUT_CONTEXT_ID    ));
    163169  if (_param->_have_port_front_end_id)
    164     (*(_Load_store_unit->out_MEMORY_OUT_FRONT_END_ID  ))(*(out_MEMORY_OUT_FRONT_END_ID  ));
     170  (*(_Load_store_unit->out_MEMORY_OUT_FRONT_END_ID  ))(*(out_MEMORY_OUT_FRONT_END_ID  ));
    165171  if (_param->_have_port_ooo_engine_id)
    166     (*(_Load_store_unit->out_MEMORY_OUT_OOO_ENGINE_ID ))(*(out_MEMORY_OUT_OOO_ENGINE_ID ));
     172  (*(_Load_store_unit->out_MEMORY_OUT_OOO_ENGINE_ID ))(*(out_MEMORY_OUT_OOO_ENGINE_ID ));
    167173  if (_param->_have_port_packet_id)
    168     (*(_Load_store_unit->out_MEMORY_OUT_PACKET_ID     ))(*(out_MEMORY_OUT_PACKET_ID     ));
     174  (*(_Load_store_unit->out_MEMORY_OUT_PACKET_ID     ))(*(out_MEMORY_OUT_PACKET_ID     ));
     175//   (*(_Load_store_unit->out_MEMORY_OUT_OPERATION     ))(*(out_MEMORY_OUT_OPERATION     ));
     176  (*(_Load_store_unit->out_MEMORY_OUT_TYPE          ))(*(out_MEMORY_OUT_TYPE          ));
    169177  (*(_Load_store_unit->out_MEMORY_OUT_WRITE_RD      ))(*(out_MEMORY_OUT_WRITE_RD      ));
    170178  (*(_Load_store_unit->out_MEMORY_OUT_NUM_REG_RD    ))(*(out_MEMORY_OUT_NUM_REG_RD    ));
    171179  (*(_Load_store_unit->out_MEMORY_OUT_DATA_RD       ))(*(out_MEMORY_OUT_DATA_RD       ));
    172   //(*(_Load_store_unit->out_MEMORY_OUT_WRITE_RE      ))(*(out_MEMORY_OUT_WRITE_RE      ));
    173   //(*(_Load_store_unit->out_MEMORY_OUT_NUM_REG_RE    ))(*(out_MEMORY_OUT_NUM_REG_RE    ));
    174   //(*(_Load_store_unit->out_MEMORY_OUT_DATA_RE       ))(*(out_MEMORY_OUT_DATA_RE       ));
     180  (*(_Load_store_unit->out_MEMORY_OUT_WRITE_RE      ))(*(out_MEMORY_OUT_WRITE_RE      ));
     181  (*(_Load_store_unit->out_MEMORY_OUT_NUM_REG_RE    ))(*(out_MEMORY_OUT_NUM_REG_RE    ));
     182  (*(_Load_store_unit->out_MEMORY_OUT_DATA_RE       ))(*(out_MEMORY_OUT_DATA_RE       ));
    175183  (*(_Load_store_unit->out_MEMORY_OUT_EXCEPTION     ))(*(out_MEMORY_OUT_EXCEPTION     ));
     184  (*(_Load_store_unit->out_MEMORY_OUT_NO_SEQUENCE   ))(*(out_MEMORY_OUT_NO_SEQUENCE   ));
     185  (*(_Load_store_unit->out_MEMORY_OUT_ADDRESS       ))(*(out_MEMORY_OUT_ADDRESS       ));
    176186
    177187  (*(_Load_store_unit->out_DCACHE_REQ_VAL       ))(*(out_DCACHE_REQ_VAL       ));
     
    192202  (*(_Load_store_unit-> in_DCACHE_RSP_ERROR     ))(*( in_DCACHE_RSP_ERROR     ));
    193203
    194   if (_param->_speculative_load == SPECULATIVE_LOAD_BYPASS)
    195204    {
    196       for (uint32_t i=0; i<_param->_size_load_queue; i++)
     205      for (uint32_t i=0; i<_param->_nb_bypass_memory; i++)
    197206        {
    198207          (*(_Load_store_unit->out_BYPASS_MEMORY_VAL           [i]))(*(out_BYPASS_MEMORY_VAL           [i]));
     
    486495              in_MEMORY_IN_TYPE                 ->write (fifo_request.top()._type                 );
    487496              in_MEMORY_IN_STORE_QUEUE_PTR_WRITE->write (fifo_request.top()._store_queue_ptr_write);
     497              if (_param->_have_port_load_queue_ptr)
    488498              in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ->write (fifo_request.top()._load_queue_ptr_write );
    489499              in_MEMORY_IN_IMMEDIAT             ->write (fifo_request.top()._immediat             );
     
    563573                  TEST(Tcontext_t        , out_MEMORY_OUT_OOO_ENGINE_ID->read(), tab_request[packet_id]._ooo_engine_id);
    564574                  TEST(Tpacket_t         , out_MEMORY_OUT_PACKET_ID    ->read(), tab_request[packet_id]._packet_id    );
     575//                TEST(Toperation_t      , out_MEMORY_OUT_OPERATION    ->read(), tab_request[packet_id]._operation    );
     576                  TEST(Ttype_t           , out_MEMORY_OUT_TYPE         ->read(), TYPE_MEMORY                          );
    565577                  TEST(Tcontrol_t        , out_MEMORY_OUT_WRITE_RD     ->read(), tab_request[packet_id]._write_rd     );
    566578                  TEST(Tgeneral_address_t, out_MEMORY_OUT_NUM_REG_RD   ->read(), tab_request[packet_id]._num_reg_rd   );
     
    682694  delete     in_MEMORY_IN_STORE_QUEUE_PTR_WRITE;
    683695  delete     in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ;
    684   //delete     in_MEMORY_IN_HAS_IMMEDIAT;
     696  delete     in_MEMORY_IN_HAS_IMMEDIAT;
    685697  delete     in_MEMORY_IN_IMMEDIAT    ;
    686698  delete     in_MEMORY_IN_DATA_RA     ;
    687699  delete     in_MEMORY_IN_DATA_RB     ;
    688   //delete     in_MEMORY_IN_DATA_RC     ;
    689 //   delete     in_MEMORY_IN_WRITE_RD    ;
     700  delete     in_MEMORY_IN_DATA_RC     ;
     701  delete     in_MEMORY_IN_WRITE_RD    ;
    690702  delete     in_MEMORY_IN_NUM_REG_RD  ;
    691   //delete     in_MEMORY_IN_WRITE_RE    ;
    692   //delete     in_MEMORY_IN_NUM_REG_RE  ;
     703  delete     in_MEMORY_IN_WRITE_RE    ;
     704  delete     in_MEMORY_IN_NUM_REG_RE  ;
    693705   
    694706  delete    out_MEMORY_OUT_VAL       ;
     
    698710  delete    out_MEMORY_OUT_OOO_ENGINE_ID;
    699711  delete    out_MEMORY_OUT_PACKET_ID ;
     712//   delete    out_MEMORY_OUT_OPERATION ;
     713  delete    out_MEMORY_OUT_TYPE      ;
    700714  delete    out_MEMORY_OUT_WRITE_RD  ;
    701715  delete    out_MEMORY_OUT_NUM_REG_RD;
    702716  delete    out_MEMORY_OUT_DATA_RD   ;
    703   //delete    out_MEMORY_OUT_WRITE_RE  ;
    704   //delete    out_MEMORY_OUT_NUM_REG_RE;
    705   //delete    out_MEMORY_OUT_DATA_RE   ;
     717  delete    out_MEMORY_OUT_WRITE_RE  ;
     718  delete    out_MEMORY_OUT_NUM_REG_RE;
     719  delete    out_MEMORY_OUT_DATA_RE   ;
    706720  delete    out_MEMORY_OUT_EXCEPTION ;
     721  delete    out_MEMORY_OUT_NO_SEQUENCE;
     722  delete    out_MEMORY_OUT_ADDRESS   ;
    707723 
    708724  delete    out_DCACHE_REQ_VAL       ;
     
    721737  delete     in_DCACHE_RSP_ERROR     ;
    722738 
    723   if (_param->_speculative_load == SPECULATIVE_LOAD_BYPASS)
    724739    {
    725740      delete [] out_BYPASS_MEMORY_VAL       ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test2.cpp

    r77 r78  
    5252         2,  //_nb_port_check         
    5353         SPECULATIVE_LOAD_COMMIT,  //_speculative_load       
     54         0,  //_nb_bypass_memory
    5455         1,  //_nb_context             
    5556         1,  //_nb_front_end           
     
    5758         128,//_nb_packet             
    5859         32, //_size_general_data     
    59          64  //_nb_general_register   
     60         2 , //_size_special_data     
     61         64, //_nb_general_register   
     62         16  //_nb_special_register   
    6063        );
    6164
     
    8992  sc_signal<Tlsq_ptr_t        > *   in_MEMORY_IN_STORE_QUEUE_PTR_WRITE = new sc_signal<Tlsq_ptr_t        > (rename.c_str());
    9093  sc_signal<Tlsq_ptr_t        > *   in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE  = new sc_signal<Tlsq_ptr_t        > (rename.c_str());
    91   //sc_signal<Tcontrol_t        > *   in_MEMORY_IN_HAS_IMMEDIAT          = new sc_signal<Tcontrol_t        > (rename.c_str());
     94  sc_signal<Tcontrol_t        > *   in_MEMORY_IN_HAS_IMMEDIAT          = new sc_signal<Tcontrol_t        > (rename.c_str());
    9295  sc_signal<Tgeneral_data_t   > *   in_MEMORY_IN_IMMEDIAT              = new sc_signal<Tgeneral_data_t   > (rename.c_str());
    9396  sc_signal<Tgeneral_data_t   > *   in_MEMORY_IN_DATA_RA               = new sc_signal<Tgeneral_data_t   > (rename.c_str());
    9497  sc_signal<Tgeneral_data_t   > *   in_MEMORY_IN_DATA_RB               = new sc_signal<Tgeneral_data_t   > (rename.c_str());
    95   //sc_signal<Tspecial_data_t   > *   in_MEMORY_IN_DATA_RC               = new sc_signal<Tspecial_data_t   > (rename.c_str());
    96 //   sc_signal<Tcontrol_t        > *   in_MEMORY_IN_WRITE_RD              = new sc_signal<Tcontrol_t        > (rename.c_str());
     98  sc_signal<Tspecial_data_t   > *   in_MEMORY_IN_DATA_RC               = new sc_signal<Tspecial_data_t   > (rename.c_str());
     99  sc_signal<Tcontrol_t        > *   in_MEMORY_IN_WRITE_RD              = new sc_signal<Tcontrol_t        > (rename.c_str());
    97100  sc_signal<Tgeneral_address_t> *   in_MEMORY_IN_NUM_REG_RD            = new sc_signal<Tgeneral_address_t> (rename.c_str());
    98   //sc_signal<Tcontrol_t        > *   in_MEMORY_IN_WRITE_RE              = new sc_signal<Tcontrol_t        > (rename.c_str());
    99   //sc_signal<Tspecial_address_t> *   in_MEMORY_IN_NUM_REG_RE            = new sc_signal<Tspecial_address_t> (rename.c_str());
     101  sc_signal<Tcontrol_t        > *   in_MEMORY_IN_WRITE_RE              = new sc_signal<Tcontrol_t        > (rename.c_str());
     102  sc_signal<Tspecial_address_t> *   in_MEMORY_IN_NUM_REG_RE            = new sc_signal<Tspecial_address_t> (rename.c_str());
    100103
    101104  sc_signal<Tcontrol_t        > *  out_MEMORY_OUT_VAL           = new sc_signal<Tcontrol_t        >(rename.c_str());
     
    105108  sc_signal<Tcontext_t        > *  out_MEMORY_OUT_OOO_ENGINE_ID = new sc_signal<Tcontext_t        >(rename.c_str());
    106109  sc_signal<Tpacket_t         > *  out_MEMORY_OUT_PACKET_ID     = new sc_signal<Tpacket_t         >(rename.c_str());
     110//   sc_signal<Toperation_t      > *  out_MEMORY_OUT_OPERATION     = new sc_signal<Toperation_t      >(rename.c_str());
     111  sc_signal<Ttype_t           > *  out_MEMORY_OUT_TYPE          = new sc_signal<Ttype_t           >(rename.c_str());
    107112  sc_signal<Tcontrol_t        > *  out_MEMORY_OUT_WRITE_RD      = new sc_signal<Tcontrol_t        >(rename.c_str());
    108113  sc_signal<Tgeneral_address_t> *  out_MEMORY_OUT_NUM_REG_RD    = new sc_signal<Tgeneral_address_t>(rename.c_str());
    109114  sc_signal<Tgeneral_data_t   > *  out_MEMORY_OUT_DATA_RD       = new sc_signal<Tgeneral_data_t   >(rename.c_str());
    110   //sc_signal<Tcontrol_t        > *  out_MEMORY_OUT_WRITE_RE      = new sc_signal<Tcontrol_t        >(rename.c_str());
    111   //sc_signal<Tspecial_address_t> *  out_MEMORY_OUT_NUM_REG_RE    = new sc_signal<Tspecial_address_t>(rename.c_str());
    112   //sc_signal<Tspecial_data_t   > *  out_MEMORY_OUT_DATA_RE       = new sc_signal<Tspecial_data_t   >(rename.c_str());
     115  sc_signal<Tcontrol_t        > *  out_MEMORY_OUT_WRITE_RE      = new sc_signal<Tcontrol_t        >(rename.c_str());
     116  sc_signal<Tspecial_address_t> *  out_MEMORY_OUT_NUM_REG_RE    = new sc_signal<Tspecial_address_t>(rename.c_str());
     117  sc_signal<Tspecial_data_t   > *  out_MEMORY_OUT_DATA_RE       = new sc_signal<Tspecial_data_t   >(rename.c_str());
    113118  sc_signal<Texception_t      > *  out_MEMORY_OUT_EXCEPTION     = new sc_signal<Texception_t      >(rename.c_str());
     119  sc_signal<Tcontrol_t        > *  out_MEMORY_OUT_NO_SEQUENCE   = new sc_signal<Tcontrol_t        >(rename.c_str());
     120  sc_signal<Tgeneral_data_t   > *  out_MEMORY_OUT_ADDRESS       = new sc_signal<Tgeneral_data_t   >(rename.c_str());
    114121
    115122  sc_signal<Tcontrol_t        > * out_DCACHE_REQ_VAL        = new sc_signal<Tcontrol_t        >(rename.c_str());
     
    128135  sc_signal<Tdcache_error_t   > *  in_DCACHE_RSP_ERROR      = new sc_signal<Tdcache_error_t   >(rename.c_str());
    129136 
    130   sc_signal<Tcontrol_t        > ** out_BYPASS_MEMORY_VAL           = new sc_signal<Tcontrol_t        > * [_param->_size_load_queue];
    131   sc_signal<Tcontext_t        > ** out_BYPASS_MEMORY_OOO_ENGINE_ID = new sc_signal<Tcontext_t        > * [_param->_size_load_queue];
    132   sc_signal<Tgeneral_address_t> ** out_BYPASS_MEMORY_NUM_REG       = new sc_signal<Tgeneral_address_t> * [_param->_size_load_queue];
    133   sc_signal<Tgeneral_data_t   > ** out_BYPASS_MEMORY_DATA          = new sc_signal<Tgeneral_data_t   > * [_param->_size_load_queue];
     137  sc_signal<Tcontrol_t        > ** out_BYPASS_MEMORY_VAL           = new sc_signal<Tcontrol_t        > * [_param->_nb_bypass_memory];
     138  sc_signal<Tcontext_t        > ** out_BYPASS_MEMORY_OOO_ENGINE_ID = new sc_signal<Tcontext_t        > * [_param->_nb_bypass_memory];
     139  sc_signal<Tgeneral_address_t> ** out_BYPASS_MEMORY_NUM_REG       = new sc_signal<Tgeneral_address_t> * [_param->_nb_bypass_memory];
     140  sc_signal<Tgeneral_data_t   > ** out_BYPASS_MEMORY_DATA          = new sc_signal<Tgeneral_data_t   > * [_param->_nb_bypass_memory];
    134141   
    135   for (uint32_t i=0; i<_param->_size_load_queue; i++)
     142  for (uint32_t i=0; i<_param->_nb_bypass_memory; i++)
    136143    {
    137144      out_BYPASS_MEMORY_VAL           [i] = new sc_signal<Tcontrol_t        >(rename.c_str());
     
    161168    (*(_Load_store_unit-> in_MEMORY_IN_PACKET_ID            ))(*( in_MEMORY_IN_PACKET_ID            ));
    162169  (*(_Load_store_unit-> in_MEMORY_IN_OPERATION            ))(*( in_MEMORY_IN_OPERATION            ));
     170  (*(_Load_store_unit-> in_MEMORY_IN_TYPE                 ))(*( in_MEMORY_IN_TYPE                 ));
    163171  (*(_Load_store_unit-> in_MEMORY_IN_STORE_QUEUE_PTR_WRITE))(*( in_MEMORY_IN_STORE_QUEUE_PTR_WRITE));
     172  if (_param->_have_port_load_queue_ptr)
    164173  (*(_Load_store_unit-> in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ))(*( in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ));
    165   //(*(_Load_store_unit-> in_MEMORY_IN_HAS_IMMEDIAT         ))(*( in_MEMORY_IN_HAS_IMMEDIAT         ));
     174  (*(_Load_store_unit-> in_MEMORY_IN_HAS_IMMEDIAT         ))(*( in_MEMORY_IN_HAS_IMMEDIAT         ));
    166175  (*(_Load_store_unit-> in_MEMORY_IN_IMMEDIAT             ))(*( in_MEMORY_IN_IMMEDIAT             ));
    167176  (*(_Load_store_unit-> in_MEMORY_IN_DATA_RA              ))(*( in_MEMORY_IN_DATA_RA              ));
    168177  (*(_Load_store_unit-> in_MEMORY_IN_DATA_RB              ))(*( in_MEMORY_IN_DATA_RB              ));
    169   //(*(_Load_store_unit-> in_MEMORY_IN_DATA_RC              ))(*( in_MEMORY_IN_DATA_RC              ));
    170 //   (*(_Load_store_unit-> in_MEMORY_IN_WRITE_RD             ))(*( in_MEMORY_IN_WRITE_RD             ));
     178  (*(_Load_store_unit-> in_MEMORY_IN_DATA_RC              ))(*( in_MEMORY_IN_DATA_RC              ));
     179  (*(_Load_store_unit-> in_MEMORY_IN_WRITE_RD             ))(*( in_MEMORY_IN_WRITE_RD             ));
    171180  (*(_Load_store_unit-> in_MEMORY_IN_NUM_REG_RD           ))(*( in_MEMORY_IN_NUM_REG_RD           ));
    172   //(*(_Load_store_unit-> in_MEMORY_IN_WRITE_RE             ))(*( in_MEMORY_IN_WRITE_RE             ));
    173   //(*(_Load_store_unit-> in_MEMORY_IN_NUM_REG_RE           ))(*( in_MEMORY_IN_NUM_REG_RE           ));
     181  (*(_Load_store_unit-> in_MEMORY_IN_WRITE_RE             ))(*( in_MEMORY_IN_WRITE_RE             ));
     182  (*(_Load_store_unit-> in_MEMORY_IN_NUM_REG_RE           ))(*( in_MEMORY_IN_NUM_REG_RE           ));
    174183 
    175184  (*(_Load_store_unit->out_MEMORY_OUT_VAL           ))(*(out_MEMORY_OUT_VAL           ));
     
    183192  if (_param->_have_port_packet_id)
    184193    (*(_Load_store_unit->out_MEMORY_OUT_PACKET_ID     ))(*(out_MEMORY_OUT_PACKET_ID     ));
     194//   (*(_Load_store_unit->out_MEMORY_OUT_OPERATION     ))(*(out_MEMORY_OUT_OPERATION     ));
     195  (*(_Load_store_unit->out_MEMORY_OUT_TYPE          ))(*(out_MEMORY_OUT_TYPE          ));
    185196  (*(_Load_store_unit->out_MEMORY_OUT_WRITE_RD      ))(*(out_MEMORY_OUT_WRITE_RD      ));
    186197  (*(_Load_store_unit->out_MEMORY_OUT_NUM_REG_RD    ))(*(out_MEMORY_OUT_NUM_REG_RD    ));
    187198  (*(_Load_store_unit->out_MEMORY_OUT_DATA_RD       ))(*(out_MEMORY_OUT_DATA_RD       ));
    188   //(*(_Load_store_unit->out_MEMORY_OUT_WRITE_RE      ))(*(out_MEMORY_OUT_WRITE_RE      ));
    189   //(*(_Load_store_unit->out_MEMORY_OUT_NUM_REG_RE    ))(*(out_MEMORY_OUT_NUM_REG_RE    ));
    190   //(*(_Load_store_unit->out_MEMORY_OUT_DATA_RE       ))(*(out_MEMORY_OUT_DATA_RE       ));
     199  (*(_Load_store_unit->out_MEMORY_OUT_WRITE_RE      ))(*(out_MEMORY_OUT_WRITE_RE      ));
     200  (*(_Load_store_unit->out_MEMORY_OUT_NUM_REG_RE    ))(*(out_MEMORY_OUT_NUM_REG_RE    ));
     201  (*(_Load_store_unit->out_MEMORY_OUT_DATA_RE       ))(*(out_MEMORY_OUT_DATA_RE       ));
    191202  (*(_Load_store_unit->out_MEMORY_OUT_EXCEPTION     ))(*(out_MEMORY_OUT_EXCEPTION     ));
     203  (*(_Load_store_unit->out_MEMORY_OUT_NO_SEQUENCE   ))(*(out_MEMORY_OUT_NO_SEQUENCE   ));
     204  (*(_Load_store_unit->out_MEMORY_OUT_ADDRESS       ))(*(out_MEMORY_OUT_ADDRESS       ));
    192205
    193206  (*(_Load_store_unit->out_DCACHE_REQ_VAL       ))(*(out_DCACHE_REQ_VAL       ));
     
    208221  (*(_Load_store_unit-> in_DCACHE_RSP_ERROR     ))(*( in_DCACHE_RSP_ERROR     ));
    209222
    210   if (_param->_speculative_load == SPECULATIVE_LOAD_BYPASS)
    211223    {
    212       for (uint32_t i=0; i<_param->_size_load_queue; i++)
     224      for (uint32_t i=0; i<_param->_nb_bypass_memory; i++)
    213225        {
    214226          (*(_Load_store_unit->out_BYPASS_MEMORY_VAL           [i]))(*(out_BYPASS_MEMORY_VAL           [i]));
     
    448460                  in_MEMORY_IN_TYPE                 ->write (fifo_request.top()._type                 );
    449461                  in_MEMORY_IN_STORE_QUEUE_PTR_WRITE->write (fifo_request.top()._store_queue_ptr_write);
     462                  if (_param->_have_port_load_queue_ptr)
    450463                  in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ->write (fifo_request.top()._load_queue_ptr_write );
    451464                  in_MEMORY_IN_IMMEDIAT             ->write (fifo_request.top()._immediat             );
     
    533546                  TEST(Tcontext_t        , out_MEMORY_OUT_FRONT_END_ID ->read(), tab_request[packet_id]._front_end_id );
    534547                  TEST(Tcontext_t        , out_MEMORY_OUT_OOO_ENGINE_ID->read(), tab_request[packet_id]._ooo_engine_id);
     548//                TEST(Toperation_t      , out_MEMORY_OUT_OPERATION    ->read(), tab_request[packet_id]._operation    );
     549                  TEST(Ttype_t           , out_MEMORY_OUT_TYPE         ->read(), TYPE_MEMORY                          );
    535550
    536551                  if (is_operation_memory_load (tab_request[packet_id]._operation))
     
    721736  delete     in_MEMORY_IN_STORE_QUEUE_PTR_WRITE;
    722737  delete     in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ;
    723   //delete     in_MEMORY_IN_HAS_IMMEDIAT;
     738  delete     in_MEMORY_IN_HAS_IMMEDIAT;
    724739  delete     in_MEMORY_IN_IMMEDIAT    ;
    725740  delete     in_MEMORY_IN_DATA_RA     ;
    726741  delete     in_MEMORY_IN_DATA_RB     ;
    727   //delete     in_MEMORY_IN_DATA_RC     ;
    728 //   delete     in_MEMORY_IN_WRITE_RD    ;
     742  delete     in_MEMORY_IN_DATA_RC     ;
     743  delete     in_MEMORY_IN_WRITE_RD    ;
    729744  delete     in_MEMORY_IN_NUM_REG_RD  ;
    730   //delete     in_MEMORY_IN_WRITE_RE    ;
    731   //delete     in_MEMORY_IN_NUM_REG_RE  ;
     745  delete     in_MEMORY_IN_WRITE_RE    ;
     746  delete     in_MEMORY_IN_NUM_REG_RE  ;
    732747   
    733748  delete    out_MEMORY_OUT_VAL       ;
     
    737752  delete    out_MEMORY_OUT_OOO_ENGINE_ID;
    738753  delete    out_MEMORY_OUT_PACKET_ID ;
     754//   delete    out_MEMORY_OUT_OPERATION ;
     755  delete    out_MEMORY_OUT_TYPE      ;
    739756  delete    out_MEMORY_OUT_WRITE_RD  ;
    740757  delete    out_MEMORY_OUT_NUM_REG_RD;
    741758  delete    out_MEMORY_OUT_DATA_RD   ;
    742   //delete    out_MEMORY_OUT_WRITE_RE  ;
    743   //delete    out_MEMORY_OUT_NUM_REG_RE;
    744   //delete    out_MEMORY_OUT_DATA_RE   ;
     759  delete    out_MEMORY_OUT_WRITE_RE  ;
     760  delete    out_MEMORY_OUT_NUM_REG_RE;
     761  delete    out_MEMORY_OUT_DATA_RE   ;
    745762  delete    out_MEMORY_OUT_EXCEPTION ;
     763  delete    out_MEMORY_OUT_NO_SEQUENCE;
     764  delete    out_MEMORY_OUT_ADDRESS   ;
    746765 
    747766  delete    out_DCACHE_REQ_VAL       ;
     
    760779  delete     in_DCACHE_RSP_ERROR     ;
    761780 
    762   if (_param->_speculative_load == SPECULATIVE_LOAD_BYPASS)
    763781    {
    764782      delete [] out_BYPASS_MEMORY_VAL       ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h

    r76 r78  
    55 * $Id$
    66 *
    7  * [ Description ]
     7 * [ Description ]
    88 *
    99 * Ce composant peut être amélioré en placant deux ptr de lecture au lieu d'un : un pour l'accès au cache et un pour le commit
     
    4646#endif
    4747  {
    48     // -----[ fields ]----------------------------------------------------
     48    // -----[ fields ]----------------------------------------------------
    4949    // Parameters
    5050  protected : const std::string       _name;
     
    5353
    5454#ifdef STATISTICS
    55   private   : Stat                           * _stat;
     55  public    : Stat                           * _stat;
    5656
    5757  private   : counter_t                      * _stat_use_store_queue;
     
    8383
    8484#ifdef SYSTEMC
    85     // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     85    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8686    // Interface
    8787  public    : SC_CLOCK                      *  in_CLOCK        ;
    8888  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
    8989
    90     // ~~~~~[ Interface "memory_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     90    // ~~~~~[ Interface "memory_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    9191  public    : SC_IN (Tcontrol_t        )    *  in_MEMORY_IN_VAL         ;
    9292  public    : SC_OUT(Tcontrol_t        )    * out_MEMORY_IN_ACK         ;
     
    9696  public    : SC_IN (Tpacket_t         )    *  in_MEMORY_IN_PACKET_ID   ;
    9797  public    : SC_IN (Toperation_t      )    *  in_MEMORY_IN_OPERATION   ;
    98 //public    : SC_IN (Ttype_t           )    *  in_MEMORY_IN_TYPE        ;
     98  public    : SC_IN (Ttype_t           )    *  in_MEMORY_IN_TYPE        ;
    9999  public    : SC_IN (Tlsq_ptr_t        )    *  in_MEMORY_IN_STORE_QUEUE_PTR_WRITE;
    100100  public    : SC_IN (Tlsq_ptr_t        )    *  in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ;
    101 //public    : SC_IN (Tcontrol_t        )    *  in_MEMORY_IN_HAS_IMMEDIAT;
     101  public    : SC_IN (Tcontrol_t        )    *  in_MEMORY_IN_HAS_IMMEDIAT;
    102102  public    : SC_IN (Tgeneral_data_t   )    *  in_MEMORY_IN_IMMEDIAT    ; // memory address
    103103  public    : SC_IN (Tgeneral_data_t   )    *  in_MEMORY_IN_DATA_RA     ; // memory address
    104104  public    : SC_IN (Tgeneral_data_t   )    *  in_MEMORY_IN_DATA_RB     ; // data        (store)
    105 //public    : SC_IN (Tspecial_data_t   )    *  in_MEMORY_IN_DATA_RC     ;
    106 //public    : SC_IN (Tcontrol_t        )    *  in_MEMORY_IN_WRITE_RD    ; // = (operation==load)
     105  public    : SC_IN (Tspecial_data_t   )    *  in_MEMORY_IN_DATA_RC     ;
     106  public    : SC_IN (Tcontrol_t        )    *  in_MEMORY_IN_WRITE_RD    ; // = (operation==load)
    107107  public    : SC_IN (Tgeneral_address_t)    *  in_MEMORY_IN_NUM_REG_RD  ; // destination (load)
    108 //public    : SC_IN (Tcontrol_t        )    *  in_MEMORY_IN_WRITE_RE    ;
    109 //public    : SC_IN (Tspecial_address_t)    *  in_MEMORY_IN_NUM_REG_RE  ;
    110 
    111     // ~~~~~[ Interface "memory_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     108  public    : SC_IN (Tcontrol_t        )    *  in_MEMORY_IN_WRITE_RE    ;
     109  public    : SC_IN (Tspecial_address_t)    *  in_MEMORY_IN_NUM_REG_RE  ;
     110
     111    // ~~~~~[ Interface "memory_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    112112  public    : SC_OUT(Tcontrol_t        )    * out_MEMORY_OUT_VAL       ;
    113113  public    : SC_IN (Tcontrol_t        )    *  in_MEMORY_OUT_ACK       ;
     
    116116  public    : SC_OUT(Tcontext_t        )    * out_MEMORY_OUT_OOO_ENGINE_ID;
    117117  public    : SC_OUT(Tpacket_t         )    * out_MEMORY_OUT_PACKET_ID ;
     118//public    : SC_OUT(Toperation_t      )    * out_MEMORY_OUT_OPERATION ;
     119  public    : SC_OUT(Ttype_t           )    * out_MEMORY_OUT_TYPE      ;
    118120  public    : SC_OUT(Tcontrol_t        )    * out_MEMORY_OUT_WRITE_RD  ; // = (operation==load)
    119121  public    : SC_OUT(Tgeneral_address_t)    * out_MEMORY_OUT_NUM_REG_RD; // destination (load)
    120122  public    : SC_OUT(Tgeneral_data_t   )    * out_MEMORY_OUT_DATA_RD   ; // data        (load)
    121 //public    : SC_OUT(Tcontrol_t        )    * out_MEMORY_OUT_WRITE_RE  ;
    122 //public    : SC_OUT(Tspecial_address_t)    * out_MEMORY_OUT_NUM_REG_RE;
    123 //public    : SC_OUT(Tspecial_data_t   )    * out_MEMORY_OUT_DATA_RE   ;
     123  public    : SC_OUT(Tcontrol_t        )    * out_MEMORY_OUT_WRITE_RE  ;
     124  public    : SC_OUT(Tspecial_address_t)    * out_MEMORY_OUT_NUM_REG_RE;
     125  public    : SC_OUT(Tspecial_data_t   )    * out_MEMORY_OUT_DATA_RE   ;
    124126  public    : SC_OUT(Texception_t      )    * out_MEMORY_OUT_EXCEPTION ;
    125 
    126     // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     127  public    : SC_OUT(Tcontrol_t        )    * out_MEMORY_OUT_NO_SEQUENCE;
     128  public    : SC_OUT(Tgeneral_data_t   )    * out_MEMORY_OUT_ADDRESS   ;
     129   
     130
     131    // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    127132  public    : SC_OUT(Tcontrol_t        )    * out_DCACHE_REQ_VAL       ;
    128133  public    : SC_IN (Tcontrol_t        )    *  in_DCACHE_REQ_ACK       ;
     
    133138  public    : SC_OUT(Tdcache_data_t    )    * out_DCACHE_REQ_WDATA     ;
    134139
    135     // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     140    // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    136141  public    : SC_IN (Tcontrol_t        )    *  in_DCACHE_RSP_VAL       ;
    137142  public    : SC_OUT(Tcontrol_t        )    * out_DCACHE_RSP_ACK       ;
     
    141146  public    : SC_IN (Tdcache_error_t   )    *  in_DCACHE_RSP_ERROR     ;
    142147
    143     // ~~~~~[ Interface "bypass_memory" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     148    // ~~~~~[ Interface "bypass_memory" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    144149  public    : SC_OUT(Tcontrol_t        )   ** out_BYPASS_MEMORY_VAL       ;
    145150  public    : SC_OUT(Tcontext_t        )   ** out_BYPASS_MEMORY_OOO_ENGINE_ID;
     
    147152  public    : SC_OUT(Tgeneral_data_t   )   ** out_BYPASS_MEMORY_DATA      ;
    148153
    149     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     154    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    150155  protected : Tstore_queue_entry_t                                        * _store_queue;
    151156  protected : Tload_queue_entry_t                                         * _load_queue;
     
    160165  public    : void (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit::*function_genMealy_retire) (void);
    161166
    162     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    163 
    164     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     167    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     168
     169    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    165170
    166171    // Registers
     
    182187#endif
    183188
    184     // -----[ methods ]---------------------------------------------------
     189    // -----[ methods ]---------------------------------------------------
    185190
    186191#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Parameters.h

    r77 r78  
    3232  public : const uint32_t            _nb_port_check                ;
    3333  public : const Tspeculative_load_t _speculative_load             ;
     34  public : const uint32_t            _nb_bypass_memory             ;
    3435//public : const uint32_t            _nb_cache_port                ;
    3536  public : const uint32_t            _nb_context                   ;
     
    3839  public : const uint32_t            _nb_packet                    ;
    3940  public : const uint32_t            _size_general_data            ;
     41  public : const uint32_t            _size_special_data            ;
    4042  public : const uint32_t            _nb_general_register          ;
     43  public : const uint32_t            _nb_special_register          ;
    4144
    4245  public : const uint32_t            _size_address_store_queue             ;
     
    4851  public : const uint32_t            _size_packet_id                       ;
    4952  public : const uint32_t            _size_general_register                ;
     53  public : const uint32_t            _size_special_register                ;
    5054  public : const uint32_t            _size_dcache_context_id               ;
    5155  public : const uint32_t            _size_dcache_packet_id                ;
     
    5660  public : const bool                _have_port_packet_id                  ;
    5761  public : const bool                _have_port_dcache_context_id          ;
     62  public : const bool                _have_port_load_queue_ptr             ;
    5863
    5964  public : const Tdcache_address_t   _mask_address_lsb                     ;
     
    6671                        uint32_t            nb_port_check          ,
    6772                        Tspeculative_load_t speculative_load       ,
     73                        uint32_t            nb_bypass_memory       ,
    6874                        uint32_t            nb_context             ,
    6975                        uint32_t            nb_front_end           ,
     
    7177                        uint32_t            nb_packet              ,
    7278                        uint32_t            size_general_data      ,
    73                         uint32_t            nb_general_register    );
     79                        uint32_t            size_special_data      ,
     80                        uint32_t            nb_general_register    ,
     81                        uint32_t            nb_special_register    );
    7482
    7583  public : Parameters  (Parameters & param) ;
    7684  public : ~Parameters () ;
    7785
    78   public : std::string msg_error (void);
     86  public : Parameters_test msg_error (void);
    7987
    8088  public :        std::string   print      (uint32_t depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Types.h

    r71 r78  
    3333  typedef enum
    3434    {
    35       NO_SPECULATIVE_LOAD    , //each load wait all previous store before the data cache access
    36       SPECULATIVE_LOAD_ACCESS, //each load wait all previous store before the commiting
    37       SPECULATIVE_LOAD_COMMIT, //each load commit the result before the end of dependence's check
    38       SPECULATIVE_LOAD_BYPASS //each load bypass the result before the end of dependence's check
     35       NO_SPECULATIVE_LOAD    //each load wait all previous store before the data cache access
     36      ,SPECULATIVE_LOAD_ACCESS //each load wait all previous store before the commiting
     37      ,SPECULATIVE_LOAD_COMMIT //each load commit the result before the end of dependence's check
     38    //,SPECULATIVE_LOAD_BYPASS //each load bypass the result before the end of dependence's check
    3939    } Tspeculative_load_t;
    4040 
     
    212212      case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_ACCESS : return "speculative_load_access"; break;
    213213      case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT : return "speculative_load_commit"; break;
    214       case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_BYPASS : return "speculative_load_bypass"; break;
     214//       case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_BYPASS : return "speculative_load_bypass"; break;
    215215      default    : return ""      ; break;
    216216      }
     
    228228         (x.compare("speculative_load_commit") == 0))
    229229      return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_COMMIT;
    230     if ( (x.compare("3")                       == 0) or
    231          (x.compare("speculative_load_bypass") == 0))
    232       return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_BYPASS;
     230//     if ( (x.compare("3")                       == 0) or
     231//          (x.compare("speculative_load_bypass") == 0))
     232//       return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::SPECULATIVE_LOAD_BYPASS;
    233233   
    234234    throw (ErrorMorpheo ("<fromString> : Unknow string : \""+x+"\""));
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit.cpp

    r71 r78  
    6969      case NO_SPECULATIVE_LOAD     :
    7070      case SPECULATIVE_LOAD_ACCESS :
    71       case SPECULATIVE_LOAD_BYPASS :
     71        //case SPECULATIVE_LOAD_BYPASS :
    7272      default                      :
    7373        {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_allocation.cpp

    r75 r78  
    7272   in_MEMORY_IN_PACKET_ID             = interface->set_signal_in  <Tpacket_t         > ("packet_id"    ,_param->_size_packet_id       );
    7373   in_MEMORY_IN_OPERATION             = interface->set_signal_in  <Toperation_t      > ("operation"   ,_param->_size_operation        );
     74   in_MEMORY_IN_TYPE                  = interface->set_signal_in  <Ttype_t           > ("type"        ,_param->_size_type             );
    7475   in_MEMORY_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in  <Tlsq_ptr_t        > ("store_queue_ptr_write" ,_param->_size_address_store_queue+1); // +1 cf load_queue usage
     76   if (_param->_have_port_load_queue_ptr)
    7577   in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_in  <Tlsq_ptr_t        > ("load_queue_ptr_write"  ,_param->_size_address_load_queue );
    76 // in_MEMORY_IN_HAS_IMMEDIAT          = interface->set_signal_in  <Tcontrol_t        > ("has_immediat",1                              );
     78  in_MEMORY_IN_HAS_IMMEDIAT          = interface->set_signal_in  <Tcontrol_t        > ("has_immediat",1                              );
    7779   in_MEMORY_IN_IMMEDIAT              = interface->set_signal_in  <Tgeneral_data_t   > ("immediat"    ,_param->_size_general_data     );
    7880   in_MEMORY_IN_DATA_RA               = interface->set_signal_in  <Tgeneral_data_t   > ("data_ra"     ,_param->_size_general_data     );
    7981   in_MEMORY_IN_DATA_RB               = interface->set_signal_in  <Tgeneral_data_t   > ("data_rb"     ,_param->_size_general_data     );
    80 // in_MEMORY_IN_DATA_RC               = interface->set_signal_in  <Tspecial_data_t   > ("data_rc"     ,_param->_size_special_data     );
    81 //    in_MEMORY_IN_WRITE_RD              = interface->set_signal_in  <Tcontrol_t        > ("write_rd"    ,1                              );
     82  in_MEMORY_IN_DATA_RC               = interface->set_signal_in  <Tspecial_data_t   > ("data_rc"     ,_param->_size_special_data     );
     83   in_MEMORY_IN_WRITE_RD              = interface->set_signal_in  <Tcontrol_t        > ("write_rd"    ,1                              );
    8284   in_MEMORY_IN_NUM_REG_RD            = interface->set_signal_in  <Tgeneral_address_t> ("num_reg_rd"  ,1                              );
    83 // in_MEMORY_IN_WRITE_RE              = interface->set_signal_in  <Tcontrol_t        > ("write_re"    ,1                              );
    84 // in_MEMORY_IN_NUM_REG_RE            = interface->set_signal_in  <Tspecial_address_t> ("num_reg_re"  ,1                              );
     85  in_MEMORY_IN_WRITE_RE              = interface->set_signal_in  <Tcontrol_t        > ("write_re"    ,1                              );
     86  in_MEMORY_IN_NUM_REG_RE            = interface->set_signal_in  <Tspecial_address_t> ("num_reg_re"  ,1                              );
    8587    }
    8688
     
    105107      if (_param->_have_port_packet_id)       
    106108      out_MEMORY_OUT_PACKET_ID     = interface->set_signal_out <Tpacket_t         > ("packet_id"     ,_param->_size_packet_id        );
     109//    out_MEMORY_OUT_OPERATION     = interface->set_signal_out <Toperation_t      > ("operation"     ,_param->_size_operation        );
     110      out_MEMORY_OUT_TYPE          = interface->set_signal_out <Ttype_t           > ("type"          ,_param->_size_type             );
    107111      out_MEMORY_OUT_WRITE_RD      = interface->set_signal_out <Tcontrol_t        > ("write_rd"      ,1                              );
    108112      out_MEMORY_OUT_NUM_REG_RD    = interface->set_signal_out <Tgeneral_address_t> ("num_reg_rd"    ,_param->_size_general_register );
    109113      out_MEMORY_OUT_DATA_RD       = interface->set_signal_out <Tgeneral_data_t   > ("data_rd"       ,_param->_size_general_data     );
    110 //    out_MEMORY_OUT_WRITE_RE      = interface->set_signal_out <Tcontrol_t        > ("write_rd"      ,1                              );
    111 //    out_MEMORY_OUT_NUM_REG_RE    = interface->set_signal_out <Tspecial_address_t> ("num_reg_re"    ,_param->_size_general_register );
    112 //    out_MEMORY_OUT_DATA_RE       = interface->set_signal_out <Tspecial_data_t   > ("data_re"       ,_param->_size_general_data     );
     114      out_MEMORY_OUT_WRITE_RE      = interface->set_signal_out <Tcontrol_t        > ("write_re"      ,1                              );
     115      out_MEMORY_OUT_NUM_REG_RE    = interface->set_signal_out <Tspecial_address_t> ("num_reg_re"    ,_param->_size_general_register );
     116      out_MEMORY_OUT_DATA_RE       = interface->set_signal_out <Tspecial_data_t   > ("data_re"       ,_param->_size_general_data     );
    113117      out_MEMORY_OUT_EXCEPTION     = interface->set_signal_out <Texception_t      > ("exception"     ,_param->_size_exception        );
     118      out_MEMORY_OUT_NO_SEQUENCE   = interface->set_signal_out <Tcontrol_t        > ("no_sequence"   ,1                              );
     119      out_MEMORY_OUT_ADDRESS       = interface->set_signal_out <Tgeneral_data_t   > ("address"       ,_param->_size_general_data     );
    114120    }
    115121
     
    153159    // ~~~~~[ Interface "bypass_memory" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    154160
    155     if (_param->_speculative_load == SPECULATIVE_LOAD_BYPASS)
     161//  if (_param->_speculative_load == SPECULATIVE_LOAD_BYPASS)
    156162      {
    157         out_BYPASS_MEMORY_VAL          = new SC_OUT(Tcontrol_t        ) * [_param->_size_load_queue];
     163        out_BYPASS_MEMORY_VAL          = new SC_OUT(Tcontrol_t        ) * [_param->_nb_bypass_memory];
    158164        if (_param->_have_port_ooo_engine_id)   
    159         out_BYPASS_MEMORY_OOO_ENGINE_ID= new SC_OUT(Tcontext_t        ) * [_param->_size_load_queue];
    160         out_BYPASS_MEMORY_NUM_REG      = new SC_OUT(Tgeneral_address_t) * [_param->_size_load_queue];
    161         out_BYPASS_MEMORY_DATA         = new SC_OUT(Tgeneral_data_t   ) * [_param->_size_load_queue];
     165        out_BYPASS_MEMORY_OOO_ENGINE_ID= new SC_OUT(Tcontext_t        ) * [_param->_nb_bypass_memory];
     166        out_BYPASS_MEMORY_NUM_REG      = new SC_OUT(Tgeneral_address_t) * [_param->_nb_bypass_memory];
     167        out_BYPASS_MEMORY_DATA         = new SC_OUT(Tgeneral_data_t   ) * [_param->_nb_bypass_memory];
    162168       
    163         for (uint32_t i=0; i<_param->_size_load_queue; i++)
     169        for (uint32_t i=0; i<_param->_nb_bypass_memory; i++)
    164170          {
    165171            Interface_fifo * interface = _interfaces->set_interface("memory_out"
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_deallocation.cpp

    r71 r78  
    4444    delete     in_MEMORY_IN_PACKET_ID   ;
    4545    delete     in_MEMORY_IN_OPERATION   ;
     46    delete     in_MEMORY_IN_TYPE        ;
    4647    delete     in_MEMORY_IN_STORE_QUEUE_PTR_WRITE;
     48    if (_param->_have_port_load_queue_ptr)
    4749    delete     in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ;
    48 //  delete     in_MEMORY_IN_HAS_IMMEDIAT;
     50    delete     in_MEMORY_IN_HAS_IMMEDIAT;
    4951    delete     in_MEMORY_IN_IMMEDIAT    ;
    5052    delete     in_MEMORY_IN_DATA_RA     ;
    5153    delete     in_MEMORY_IN_DATA_RB     ;
    52 //  delete     in_MEMORY_IN_DATA_RC     ;
    53 //  delete     in_MEMORY_IN_WRITE_RD    ;
     54    delete     in_MEMORY_IN_DATA_RC     ;
     55    delete     in_MEMORY_IN_WRITE_RD    ;
    5456    delete     in_MEMORY_IN_NUM_REG_RD  ;
    55 //  delete     in_MEMORY_IN_WRITE_RE    ;
    56 //  delete     in_MEMORY_IN_NUM_REG_RE  ;
     57    delete     in_MEMORY_IN_WRITE_RE    ;
     58    delete     in_MEMORY_IN_NUM_REG_RE  ;
    5759   
    5860    delete    out_MEMORY_OUT_VAL       ;
     
    6668    if (_param->_have_port_packet_id)
    6769    delete    out_MEMORY_OUT_PACKET_ID ;
     70//  delete    out_MEMORY_OUT_OPERATION ;
     71    delete    out_MEMORY_OUT_TYPE      ;
    6872    delete    out_MEMORY_OUT_WRITE_RD  ;
    6973    delete    out_MEMORY_OUT_NUM_REG_RD;
    7074    delete    out_MEMORY_OUT_DATA_RD   ;
    71 //  delete    out_MEMORY_OUT_WRITE_RE  ;
    72 //  delete    out_MEMORY_OUT_NUM_REG_RE;
    73 //  delete    out_MEMORY_OUT_DATA_RE   ;
     75    delete    out_MEMORY_OUT_WRITE_RE  ;
     76    delete    out_MEMORY_OUT_NUM_REG_RE;
     77    delete    out_MEMORY_OUT_DATA_RE   ;
    7478    delete    out_MEMORY_OUT_EXCEPTION ;
     79    delete    out_MEMORY_OUT_NO_SEQUENCE;
     80    delete    out_MEMORY_OUT_ADDRESS   ;
    7581   
    7682    delete    out_DCACHE_REQ_VAL       ;
     
    9197    delete     in_DCACHE_RSP_ERROR     ;
    9298   
    93     if (_param->_speculative_load == SPECULATIVE_LOAD_BYPASS)
    94       {
    95         delete [] out_BYPASS_MEMORY_VAL       ;
    96         if (_param->_have_port_ooo_engine_id)   
    97         delete [] out_BYPASS_MEMORY_OOO_ENGINE_ID;
    98         delete [] out_BYPASS_MEMORY_NUM_REG   ;
    99         delete [] out_BYPASS_MEMORY_DATA      ;
    100       }
     99    delete [] out_BYPASS_MEMORY_VAL       ;
     100    if (_param->_have_port_ooo_engine_id)   
     101    delete [] out_BYPASS_MEMORY_OOO_ENGINE_ID;
     102    delete [] out_BYPASS_MEMORY_NUM_REG   ;
     103    delete [] out_BYPASS_MEMORY_DATA      ;
    101104    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    102105
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_genMoore.cpp

    r71 r78  
    120120    if (_param->_have_port_packet_id)
    121121    PORT_WRITE(out_MEMORY_OUT_PACKET_ID    , memory_out_packet_id    );
     122//  PORT_WRITE(out_MEMORY_OUT_OPERATION    , memory_out_operation    );
     123    PORT_WRITE(out_MEMORY_OUT_TYPE         , TYPE_MEMORY             );
    122124    PORT_WRITE(out_MEMORY_OUT_WRITE_RD     , memory_out_write_rd     );
    123125    PORT_WRITE(out_MEMORY_OUT_NUM_REG_RD   , memory_out_num_reg_rd   );
     
    126128//  PORT_WRITE(out_MEMORY_OUT_NUM_REG_RE   , memory_out_num_reg_re   );
    127129//  PORT_WRITE(out_MEMORY_OUT_DATA_RE      , memory_out_data_re      );
     130    PORT_WRITE(out_MEMORY_OUT_WRITE_RE     , 0);
     131    PORT_WRITE(out_MEMORY_OUT_NUM_REG_RE   , 0);
     132    PORT_WRITE(out_MEMORY_OUT_DATA_RE      , 0);
    128133    PORT_WRITE(out_MEMORY_OUT_EXCEPTION    , memory_out_exception    );
    129 
     134    PORT_WRITE(out_MEMORY_OUT_NO_SEQUENCE  , 0);
     135    PORT_WRITE(out_MEMORY_OUT_ADDRESS      , 0);
    130136    // ~~~~~[ Interface "dache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    131137
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_transition.cpp

    r75 r78  
    265265            //  others in speculation_access_queue
    266266
     267#ifdef DEBUG_TEST
     268            if (PORT_READ(in_MEMORY_IN_TYPE) != TYPE_MEMORY)
     269              throw ERRORMORPHEO(FUNCTION,"The type is different at 'TYPE_MEMORY'");
     270#endif
    267271            Toperation_t    operation            = PORT_READ(in_MEMORY_IN_OPERATION);
    268272            Tgeneral_data_t address              = (PORT_READ(in_MEMORY_IN_IMMEDIAT) +
     
    376380                    _store_queue [index]._packet_id            = (not _param->_have_port_packet_id    )?0:PORT_READ(in_MEMORY_IN_PACKET_ID   );
    377381                    _store_queue [index]._operation            = operation;
    378                     _store_queue [index]._load_queue_ptr_write = PORT_READ(in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE);
     382                    _store_queue [index]._load_queue_ptr_write = (not _param->_have_port_load_queue_ptr)?0:PORT_READ(in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE);
    379383                    _store_queue [index]._address              = address;
    380384
     
    415419
    416420                _speculative_access_queue [index]._operation            = operation;
    417                 _speculative_access_queue [index]._load_queue_ptr_write = PORT_READ(in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE);
     421                _speculative_access_queue [index]._load_queue_ptr_write = (not _param->_have_port_load_queue_ptr)?0:PORT_READ(in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE);
    418422                _speculative_access_queue [index]._store_queue_ptr_write= PORT_READ(in_MEMORY_IN_STORE_QUEUE_PTR_WRITE);
    419423                _speculative_access_queue [index]._address              = address;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Parameters.cpp

    r77 r78  
    2525                          uint32_t            nb_port_check          ,
    2626                          Tspeculative_load_t speculative_load       ,
     27                          uint32_t            nb_bypass_memory       ,
    2728                          uint32_t            nb_context             ,
    2829                          uint32_t            nb_front_end           ,
     
    3031                          uint32_t            nb_packet              ,
    3132                          uint32_t            size_general_data      ,
    32                           uint32_t            nb_general_register    ):
     33                          uint32_t            size_special_data      ,
     34                          uint32_t            nb_general_register    ,
     35                          uint32_t            nb_special_register    ):
    3336    _size_store_queue        (size_store_queue       ),
    3437    _size_load_queue         (size_load_queue        ),
     
    3639    _nb_port_check           (nb_port_check          ),
    3740    _speculative_load        (speculative_load       ),
     41    _nb_bypass_memory        (nb_bypass_memory       ),
    3842    _nb_context              (nb_context             ),
    3943    _nb_front_end            (nb_front_end           ),
     
    4145    _nb_packet               (nb_packet              ),
    4246    _size_general_data       (size_general_data      ),
     47    _size_special_data       (size_special_data      ),
    4348    _nb_general_register     (nb_general_register    ),
     49    _nb_special_register     (nb_special_register    ),
    4450   
    4551    _size_address_store_queue              (log2(size_store_queue             )),
     
    5258    _size_packet_id          (log2(nb_packet          )),
    5359    _size_general_register   (log2(nb_general_register)),
     60    _size_special_register   (log2(nb_special_register)),
    5461    _size_dcache_context_id  (_size_context_id + _size_front_end_id + _size_ooo_engine_id),
    5562    _size_dcache_packet_id   ((log2((size_store_queue>size_load_queue)?size_store_queue:size_load_queue))+1),
     
    6067    _have_port_packet_id         (_size_packet_id    >0),
    6168    _have_port_dcache_context_id (_size_dcache_context_id>0),
     69    _have_port_load_queue_ptr    (_size_load_queue>1),
    6270
    6371    _mask_address_lsb            (gen_mask<Tdcache_address_t>(log2(size_general_data/8))),
     
    7785    _nb_port_check           (param._nb_port_check          ),
    7886    _speculative_load        (param._speculative_load       ),
     87    _nb_bypass_memory        (param._nb_bypass_memory       ),
    7988    _nb_context              (param._nb_context             ),
    8089    _nb_front_end            (param._nb_front_end           ),
     
    8291    _nb_packet               (param._nb_packet              ),
    8392    _size_general_data       (param._size_general_data      ),
     93    _size_special_data       (param._size_special_data      ),
    8494    _nb_general_register     (param._nb_general_register    ),
     95    _nb_special_register     (param._nb_special_register    ),
    8596
    8697    _size_address_store_queue              (param._size_address_store_queue             ),
     
    93104    _size_packet_id          (param._size_packet_id         ),
    94105    _size_general_register   (param._size_general_register  ),
     106    _size_special_register   (param._size_special_register  ),
    95107    _size_dcache_context_id  (param._size_dcache_context_id ),
    96108    _size_dcache_packet_id   (param._size_dcache_packet_id  ),
     
    100112    _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
    101113    _have_port_packet_id     (param._have_port_packet_id    ),
    102 
    103114    _have_port_dcache_context_id(param._have_port_dcache_context_id),
     115    _have_port_load_queue_ptr(param._have_port_load_queue_ptr),
    104116
    105117    _mask_address_lsb        (param._mask_address_lsb),
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Parameters_msg_error.cpp

    r71 r78  
    2121#undef  FUNCTION
    2222#define FUNCTION "Load_store_unit::msg_error"
    23   std::string Parameters::msg_error(void)
     23  Parameters_test Parameters::msg_error(void)
    2424  {
    2525    log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
    2626   
    27     std::string msg = "";
     27    Parameters_test test("Load_store_unit");
    2828
    2929    switch (_speculative_load)
     
    3131      case SPECULATIVE_LOAD_COMMIT :
    3232        {
     33          if (not (_nb_bypass_memory == 0))
     34            test.error("Bypass memory is not supported. Please wait a next revision.");
     35 
    3336          break;
    3437        }
    3538      case NO_SPECULATIVE_LOAD     :
    3639      case SPECULATIVE_LOAD_ACCESS :
    37       case SPECULATIVE_LOAD_BYPASS :
     40      // case SPECULATIVE_LOAD_BYPASS :
    3841      default                      :
    3942        {
    40           msg += "  - Speculative load scheme is not supported : " +toString(_speculative_load);
     43          if (not (_nb_bypass_memory == 0))
     44            test.error("In the load scheme '"+toString(_speculative_load)+"', they have none bypass.");
     45
     46          test.error("Speculative load scheme '"+toString(_speculative_load)+"' is not supported. Please wait a next revision.");
    4147          break;
    4248        }
    4349      }
    4450
    45     return msg;
     51    if (not (_size_store_queue >= 2))
     52      test.error("Store queue must have at less two slot.");
     53
     54    if (not (_nb_bypass_memory <= _size_load_queue))
     55      test.error("Bypass number must be less than load_queue's size.");
    4656
    4757    log_printf(FUNC,Load_store_unit,FUNCTION,"End");
     58
     59    return test;
     60
    4861  };
    4962
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Parameters_print.cpp

    r77 r78  
    3333    xml.singleton_begin("nb_port_check                "); xml.attribut("value",toString(_nb_port_check                )); xml.singleton_end();
    3434    xml.singleton_begin("speculative_load             "); xml.attribut("value",toString(_speculative_load             )); xml.singleton_end();
     35    xml.singleton_begin("nb_bypass_memory             "); xml.attribut("value",toString(_nb_bypass_memory             )); xml.singleton_end();
    3536    xml.singleton_begin("nb_context                   "); xml.attribut("value",toString(_nb_context                   )); xml.singleton_end();
    3637    xml.singleton_begin("nb_front_end                 "); xml.attribut("value",toString(_nb_front_end                 )); xml.singleton_end();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/config0.cfg

    r77 r78  
    12122       2       *2      # nb_spr_write
    13134       4       *2      # size_store_queue
    14 4       4       *2      # size_load_queue   
     141       4       *4      # size_load_queue   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/src/test.cpp

    r76 r78  
    231231  (*(_Read_queue-> in_READ_QUEUE_IN_TYPE           )) (*(READ_QUEUE_IN_TYPE           ));
    232232  (*(_Read_queue-> in_READ_QUEUE_IN_STORE_QUEUE_PTR_WRITE)) (*(READ_QUEUE_IN_STORE_QUEUE_PTR_WRITE));
     233  if (_param->_have_port_load_queue_ptr)
    233234  (*(_Read_queue-> in_READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE )) (*(READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE ));
    234235  (*(_Read_queue-> in_READ_QUEUE_IN_HAS_IMMEDIAT   )) (*(READ_QUEUE_IN_HAS_IMMEDIAT   ));
     
    258259  (*(_Read_queue->out_READ_QUEUE_OUT_TYPE          )) (*(READ_QUEUE_OUT_TYPE          ));
    259260  (*(_Read_queue->out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE)) (*(READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE));
     261  if (_param->_have_port_load_queue_ptr)
    260262  (*(_Read_queue->out_READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE )) (*(READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE ));
    261263  (*(_Read_queue->out_READ_QUEUE_OUT_HAS_IMMEDIAT  )) (*(READ_QUEUE_OUT_HAS_IMMEDIAT  ));
     
    417419              READ_QUEUE_IN_TYPE        ->write(0);
    418420              READ_QUEUE_IN_STORE_QUEUE_PTR_WRITE->write(0);
     421              if (_param->_have_port_load_queue_ptr)
    419422              READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE ->write(0);
    420423              READ_QUEUE_IN_HAS_IMMEDIAT->write(0);
     
    592595   delete    READ_QUEUE_IN_TYPE         ;
    593596   delete    READ_QUEUE_IN_STORE_QUEUE_PTR_WRITE;
     597   if (_param->_have_port_load_queue_ptr)
    594598   delete    READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE ;
    595599   delete    READ_QUEUE_IN_HAS_IMMEDIAT ;
     
    619623   delete    READ_QUEUE_OUT_TYPE        ;
    620624   delete    READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE;
     625   if (_param->_have_port_load_queue_ptr)
    621626   delete    READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE ;
    622627   delete    READ_QUEUE_OUT_HAS_IMMEDIAT;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Parameters.h

    r77 r78  
    5555  public : const bool        _have_port_ooo_engine_id;
    5656  public : const bool        _have_port_rob_id       ;
     57  public : const bool        _have_port_load_queue_ptr;
    5758
    5859  public : const uint32_t    _size_internal_queue;
     
    7677  public : ~Parameters () ;
    7778
    78   public : std::string          msg_error (void);
     79  public : Parameters_test      msg_error (void);
    7980
    8081  public :        std::string   print      (uint32_t depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Parameters.cpp

    r77 r78  
    5858    _have_port_ooo_engine_id (_size_ooo_engine_id > 0),
    5959    _have_port_rob_id        (_size_rob_id        > 0),
     60    _have_port_load_queue_ptr(_size_load_queue    > 1),
    6061
    6162    _size_internal_queue     (  _size_context_id       //_context_id   
     
    116117    _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
    117118    _have_port_rob_id        (param._have_port_rob_id       ),
     119    _have_port_load_queue_ptr(param._have_port_load_queue_ptr),
    118120
    119121    _size_internal_queue     (param._size_internal_queue    )
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Parameters_msg_error.cpp

    r75 r78  
    1919
    2020
    21   std::string Parameters::msg_error(void)
     21  Parameters_test Parameters::msg_error(void)
    2222  {
    2323    log_printf(FUNC,Read_queue,"msg_error","Begin");
    2424
    25     std::string msg = "";
    26 
    27 //     if (_size_queue < 2)
    28 //       {
    29 //         msg += "  - The read_queue must be have less a depth of 2";
    30 //         msg += "    * size_queue                      : " + toString(_size_queue)    + "\n";
    31 //       }
     25    Parameters_test test ("Read_queue");
    3226
    3327    if (_nb_type < 2)
    34       {
    35         msg += "  - The number of type must be > 1";
    36       }
     28      test.error("The number of type must be > 1");
     29
    3730    if (_nb_operation < 2)
    38       {
    39         msg += "  - The number of operation must be > 1";
    40       }
    41    
    42 
    43     return msg;
     31      test.error("The number of operation must be > 1");
    4432
    4533    log_printf(FUNC,Read_queue,"msg_error","End");
     34
     35    return test;
    4636  };
    4737
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_allocation.cpp

    r76 r78  
    7171       in_READ_QUEUE_IN_TYPE           = interface->set_signal_in  <Ttype_t           > ("type"        ,_param->_size_type             );
    7272       in_READ_QUEUE_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in  <Tlsq_ptr_t> ("store_queue_ptr_write", log2(_param->_size_store_queue));
     73       if (_param->_have_port_load_queue_ptr)
    7374       in_READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_in  <Tlsq_ptr_t> ("load_queue_ptr_write" , log2(_param->_size_load_queue ));
    7475       in_READ_QUEUE_IN_HAS_IMMEDIAT   = interface->set_signal_in  <Tcontrol_t        > ("has_immediat",1                             );
     
    110111      out_READ_QUEUE_OUT_TYPE           = interface->set_signal_out <Ttype_t           > ("type"        ,_param->_size_type             );
    111112      out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE = interface->set_signal_out <Tlsq_ptr_t> ("store_queue_ptr_write", log2(_param->_size_store_queue));
     113      if (_param->_have_port_load_queue_ptr)
    112114      out_READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_out <Tlsq_ptr_t> ("load_queue_ptr_write" , log2(_param->_size_load_queue ));
    113115      out_READ_QUEUE_OUT_HAS_IMMEDIAT   = interface->set_signal_out <Tcontrol_t        > ("has_immediat",1                             );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_deallocation.cpp

    r76 r78  
    4242    delete     in_READ_QUEUE_IN_TYPE           ;
    4343    delete     in_READ_QUEUE_IN_STORE_QUEUE_PTR_WRITE;
     44    if (_param->_have_port_load_queue_ptr)
    4445    delete     in_READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE ;
    4546    delete     in_READ_QUEUE_IN_HAS_IMMEDIAT   ;
     
    7172    delete    out_READ_QUEUE_OUT_TYPE           ;
    7273    delete    out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE;
     74    if (_param->_have_port_load_queue_ptr)
    7375    delete    out_READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE ;
    7476    delete    out_READ_QUEUE_OUT_HAS_IMMEDIAT   ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_genMoore.cpp

    r76 r78  
    4444    PORT_WRITE (out_READ_QUEUE_OUT_TYPE        , _queue_head->_type        );
    4545    PORT_WRITE (out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE, _queue_head->_store_queue_ptr_write);
     46    if (_param->_have_port_load_queue_ptr)
    4647    PORT_WRITE (out_READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE , _queue_head->_load_queue_ptr_write );
    4748    PORT_WRITE (out_READ_QUEUE_OUT_HAS_IMMEDIAT, _queue_head->_has_immediat);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_transition.cpp

    r76 r78  
    6767            entry->_type         = PORT_READ(in_READ_QUEUE_IN_TYPE        );
    6868            entry->_store_queue_ptr_write = PORT_READ(in_READ_QUEUE_IN_STORE_QUEUE_PTR_WRITE);
     69            if (_param->_have_port_load_queue_ptr)
    6970            entry->_load_queue_ptr_write  = PORT_READ(in_READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE );
    7071            entry->_has_immediat = PORT_READ(in_READ_QUEUE_IN_HAS_IMMEDIAT);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/configuration_multi_port_write.cfg

    r77 r78  
    15150       0       *2      # nb_bypass_memory
    16164       4       *2      # size_store_queue
    17 4       4       *2      # size_load_queue
     171       4       *4      # size_load_queue
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/src/test.cpp

    r76 r78  
    216216  (*(_Reservation_station-> in_INSERT_TYPE             )) (*( in_INSERT_TYPE             ));
    217217  (*(_Reservation_station-> in_INSERT_STORE_QUEUE_PTR_WRITE)) (*( in_INSERT_STORE_QUEUE_PTR_WRITE));
     218  if (_param->_have_port_load_queue_ptr)
    218219  (*(_Reservation_station-> in_INSERT_LOAD_QUEUE_PTR_WRITE )) (*( in_INSERT_LOAD_QUEUE_PTR_WRITE ));
    219220  (*(_Reservation_station-> in_INSERT_HAS_IMMEDIAT     )) (*( in_INSERT_HAS_IMMEDIAT     ));
     
    251252  (*(_Reservation_station->out_RETIRE_TYPE           [i])) (*(out_RETIRE_TYPE           [i]));
    252253  (*(_Reservation_station->out_RETIRE_STORE_QUEUE_PTR_WRITE [i])) (*(out_RETIRE_STORE_QUEUE_PTR_WRITE [i]));
     254  if (_param->_have_port_load_queue_ptr)
    253255  (*(_Reservation_station->out_RETIRE_LOAD_QUEUE_PTR_WRITE  [i])) (*(out_RETIRE_LOAD_QUEUE_PTR_WRITE  [i]));
    254256  (*(_Reservation_station->out_RETIRE_HAS_IMMEDIAT   [i])) (*(out_RETIRE_HAS_IMMEDIAT   [i]));
     
    446448              in_INSERT_TYPE        ->write(0);
    447449              in_INSERT_STORE_QUEUE_PTR_WRITE->write(0);
     450              if (_param->_have_port_load_queue_ptr)
    448451              in_INSERT_LOAD_QUEUE_PTR_WRITE ->write(0);
    449452              in_INSERT_HAS_IMMEDIAT->write(0);
     
    692695  delete     in_INSERT_TYPE        ;
    693696  delete     in_INSERT_STORE_QUEUE_PTR_WRITE;
     697  if (_param->_have_port_load_queue_ptr)
    694698  delete     in_INSERT_LOAD_QUEUE_PTR_WRITE ;
    695699  delete     in_INSERT_HAS_IMMEDIAT;
     
    725729  delete [] out_RETIRE_TYPE        ;
    726730  delete [] out_RETIRE_STORE_QUEUE_PTR_WRITE;
     731  if (_param->_have_port_load_queue_ptr)
    727732  delete [] out_RETIRE_LOAD_QUEUE_PTR_WRITE ;
    728733  delete [] out_RETIRE_HAS_IMMEDIAT;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Parameters.h

    r77 r78  
    6262  public : const bool        _have_port_ooo_engine_id;
    6363  public : const bool        _have_port_rob_id       ;
     64  public : const bool        _have_port_load_queue_ptr;
    6465
    6566    //-----[ methods ]-----------------------------------------------------------
     
    8485  public : ~Parameters () ;
    8586
    86   public :        std::string  msg_error  (void);
     87  public :        Parameters_test msg_error  (void);
    8788
    8889  public :        std::string   print      (uint32_t depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Parameters.cpp

    r77 r78  
    6363    _have_port_front_end_id  (_size_front_end_id  > 0),
    6464    _have_port_ooo_engine_id (_size_ooo_engine_id > 0),
    65     _have_port_rob_id        (_size_rob_id        > 0)
     65    _have_port_rob_id        (_size_rob_id        > 0),
     66    _have_port_load_queue_ptr(_size_load_queue    > 1)
    6667  {
    6768    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
     
    100101    _have_port_front_end_id  (param._have_port_front_end_id ),
    101102    _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
    102     _have_port_rob_id        (param._have_port_rob_id       )
     103    _have_port_rob_id        (param._have_port_rob_id       ),
     104    _have_port_load_queue_ptr(param._have_port_load_queue_ptr)
    103105  {
    104106    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Parameters_msg_error.cpp

    r75 r78  
    2121#undef  FUNCTION
    2222#define FUNCTION "Reservation_station::msg_error"
    23   std::string Parameters::msg_error(void)
     23  Parameters_test Parameters::msg_error(void)
    2424  {
    2525    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
    2626
    27     std::string msg = "";
    28 
    29 //     if (_size_queue < 2)
    30 //       {
    31 //         msg += "  - The reservation_station must be have less a depth of 2";
    32 //         msg += "    * size_queue                      : " + toString(_size_queue)    + "\n";
    33 //       }
     27    Parameters_test test ("Reservation_station");
    3428
    3529    if (_size_queue < _nb_inst_retire)
    36       {
    37         msg += "  - The reservation_station can't have more retire port than entry in the queue.";
    38       }
    39    
    40     return msg;
     30      test.error("The reservation_station can't have more retire port than entry in the queue.");
    4131
    4232    log_printf(FUNC,Reservation_station,FUNCTION,"End");
     33
     34    return test;
    4335  };
    4436
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_allocation.cpp

    r76 r78  
    7373       in_INSERT_TYPE           = interface->set_signal_in <Ttype_t           > ("type"           ,_param->_size_type             );
    7474       in_INSERT_STORE_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("store_queue_ptr_write" ,log2(_param->_size_store_queue));
     75       if (_param->_have_port_load_queue_ptr)
    7576       in_INSERT_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_in <Tlsq_ptr_t> ("load_queue_ptr_write"  ,log2(_param->_size_load_queue) );
    7677       in_INSERT_HAS_IMMEDIAT   = interface->set_signal_in <Tcontrol_t        > ("has_immediat"   ,1                             );
     
    108109    out_RETIRE_TYPE           = new SC_OUT(Ttype_t           ) * [_param->_nb_inst_retire];
    109110    out_RETIRE_STORE_QUEUE_PTR_WRITE = new SC_OUT(Tlsq_ptr_t ) * [_param->_nb_inst_retire];
     111    if (_param->_have_port_load_queue_ptr)
    110112    out_RETIRE_LOAD_QUEUE_PTR_WRITE  = new SC_OUT(Tlsq_ptr_t ) * [_param->_nb_inst_retire];
    111113    out_RETIRE_HAS_IMMEDIAT   = new SC_OUT(Tcontrol_t        ) * [_param->_nb_inst_retire];
     
    141143        out_RETIRE_TYPE         [i] = interface->set_signal_out<Ttype_t           > ("type"         ,_param->_size_type);
    142144        out_RETIRE_STORE_QUEUE_PTR_WRITE [i] = interface->set_signal_out<Tlsq_ptr_t> ("store_queue_ptr_write" ,log2(_param->_size_store_queue));
     145        if (_param->_have_port_load_queue_ptr)
    143146        out_RETIRE_LOAD_QUEUE_PTR_WRITE  [i] = interface->set_signal_out<Tlsq_ptr_t> ("load_queue_ptr_write"  ,log2(_param->_size_load_queue) );
    144147
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_deallocation.cpp

    r76 r78  
    4444    delete     in_INSERT_TYPE          ;
    4545    delete     in_INSERT_STORE_QUEUE_PTR_WRITE;
     46    if (_param->_have_port_load_queue_ptr)
    4647    delete     in_INSERT_LOAD_QUEUE_PTR_WRITE ;
    4748    delete     in_INSERT_HAS_IMMEDIAT  ;
     
    7778    delete [] out_RETIRE_TYPE          ;
    7879    delete [] out_RETIRE_STORE_QUEUE_PTR_WRITE;
     80    if (_param->_have_port_load_queue_ptr)
    7981    delete [] out_RETIRE_LOAD_QUEUE_PTR_WRITE ;
    8082    delete [] out_RETIRE_HAS_IMMEDIAT  ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_genMoore.cpp

    r76 r78  
    102102            PORT_WRITE(out_RETIRE_TYPE          [i],_queue[index_find]._type);
    103103            PORT_WRITE(out_RETIRE_STORE_QUEUE_PTR_WRITE [i],_queue[index_find]._store_queue_ptr_write);
     104            if (_param->_have_port_load_queue_ptr)
    104105            PORT_WRITE(out_RETIRE_LOAD_QUEUE_PTR_WRITE  [i],_queue[index_find]._load_queue_ptr_write );
    105106            PORT_WRITE(out_RETIRE_HAS_IMMEDIAT  [i],_queue[index_find]._has_immediat);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_transition.cpp

    r76 r78  
    259259            _queue[index]._type            = PORT_READ(in_INSERT_TYPE           );
    260260            _queue[index]._store_queue_ptr_write = PORT_READ(in_INSERT_STORE_QUEUE_PTR_WRITE);
     261            if (_param->_have_port_load_queue_ptr)
    261262            _queue[index]._load_queue_ptr_write  = PORT_READ(in_INSERT_LOAD_QUEUE_PTR_WRITE );
    262263            _queue[index]._has_immediat    = PORT_READ(in_INSERT_HAS_IMMEDIAT   );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/SelfTest/configuration.cfg

    r77 r78  
    13132       2       *2      # nb_spr_write           
    14144       4       *2      # size_store_queue       
    15 4       4       *2      # size_load_queue         
     151       4       *4      # size_load_queue         
    16162       2       *2      # nb_inst_retire         
    17172       2       *2      # nb_bypass_write         
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/SelfTest/src/test.cpp

    r76 r78  
    161161  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_TYPE                  );
    162162  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE );
     163  if (_param->_have_port_load_queue_ptr)
    163164  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE  );
    164165  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_HAS_IMMEDIAT          );
     
    187188  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_TYPE                 ,_param->_nb_inst_retire);
    188189  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_retire);
     190  if (_param->_have_port_load_queue_ptr)
    189191  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_retire);
    190192  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_HAS_IMMEDIAT         ,_param->_nb_inst_retire);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/include/Parameters.h

    r77 r78  
    5757  public : const bool        _have_port_ooo_engine_id ;
    5858  public : const bool        _have_port_packet_id     ;
     59  public : const bool        _have_port_load_queue_ptr;
    5960
    6061  public : morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue         ::Parameters * _param_read_queue;
     
    8283  public : ~Parameters () ;
    8384
    84   public :        std::string  msg_error  (void);
     85  public :        Parameters_test msg_error  (void);
    8586
    8687  public :        std::string   print      (uint32_t depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Parameters.cpp

    r77 r78  
    6666    _have_port_front_end_id   (_size_front_end_id >0),
    6767    _have_port_ooo_engine_id  (_size_ooo_engine_id>0),
    68     _have_port_packet_id      (_size_packet_id    >0)
     68    _have_port_packet_id      (_size_packet_id    >0),
     69    _have_port_load_queue_ptr (_size_load_queue   >1)
    6970  {
    7071    log_printf(FUNC,Read_unit,FUNCTION,"Begin");
     
    144145    _have_port_front_end_id   (param._have_port_front_end_id  ),
    145146    _have_port_ooo_engine_id  (param._have_port_ooo_engine_id ),
    146     _have_port_packet_id      (param._have_port_packet_id     )
     147    _have_port_packet_id      (param._have_port_packet_id     ),
     148    _have_port_load_queue_ptr (param._have_port_load_queue_ptr)
    147149  {
    148150    log_printf(FUNC,Read_unit,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Parameters_msg_error.cpp

    r76 r78  
    2121#undef  FUNCTION
    2222#define FUNCTION "Read_unit::msg_error"
    23   std::string Parameters::msg_error(void)
     23  Parameters_test Parameters::msg_error(void)
    2424  {
    2525    log_printf(FUNC,Read_unit,FUNCTION,"Begin");
    2626
    27     std::string msg = "";
    28 
    29     return msg;
     27    Parameters_test test ("Read_unit");
    3028
    3129    log_printf(FUNC,Read_unit,FUNCTION,"End");
     30
     31    return test;
    3232  };
    3333
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Read_unit_allocation.cpp

    r76 r78  
    5959       ALLOC_INTERFACE("read_unit_in", IN, WEST, "Enter of new operation");
    6060
    61        ALLOC_VAL_IN    ( in_READ_UNIT_IN_VAL);
    62        ALLOC_ACK_OUT   (out_READ_UNIT_IN_ACK);
     61       ALLOC_VALACK_IN    ( in_READ_UNIT_IN_VAL,VAL);
     62       ALLOC_VALACK_OUT   (out_READ_UNIT_IN_ACK,ACK);
    6363       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_CONTEXT_ID           ,"context_id"           ,Tcontext_t        ,_param->_size_context_id   );
    6464       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_FRONT_END_ID         ,"front_end_id"         ,Tcontext_t        ,_param->_size_front_end_id );
     
    6767       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_OPERATION            ,"operation"            ,Toperation_t      ,_param->_size_operation    );
    6868       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_TYPE                 ,"type"                 ,Ttype_t           ,_param->_size_type         );
    69        ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue  );
    70        ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue   );
     69       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,log2(_param->_size_store_queue));
     70       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,log2(_param->_size_load_queue));
    7171       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_HAS_IMMEDIAT         ,"has_immediat"         ,Tcontrol_t        ,1);
    7272       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_IMMEDIAT             ,"immediat"             ,Tgeneral_data_t   ,_param->_size_general_data);
     
    8787       ALLOC1_INTERFACE("read_unit_out", OUT, EAST, "Output of operation. All operand is valid.", _param->_nb_inst_retire);
    8888
    89        ALLOC1_VAL_OUT   (out_READ_UNIT_OUT_VAL);
    90        ALLOC1_ACK_IN    ( in_READ_UNIT_OUT_ACK);
     89       ALLOC1_VALACK_OUT   (out_READ_UNIT_OUT_VAL,VAL);
     90       ALLOC1_VALACK_IN    ( in_READ_UNIT_OUT_ACK,ACK);
    9191       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_CONTEXT_ID           ,"context_id"           ,Tcontext_t        ,_param->_size_context_id      );
    9292       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_FRONT_END_ID         ,"front_end_id"         ,Tcontext_t        ,_param->_size_front_end_id    );
     
    9595       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_OPERATION            ,"operation"            ,Toperation_t      ,_param->_size_operation       );
    9696       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_TYPE                 ,"type"                 ,Ttype_t           ,_param->_size_type            );
    97        ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue     );
    98        ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue      );
     97       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,log2(_param->_size_store_queue));
     98       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,log2(_param->_size_load_queue ));
    9999       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_HAS_IMMEDIAT         ,"has_immediat"         ,Tcontrol_t        ,1                             );
    100100       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_IMMEDIAT             ,"immediat"             ,Tgeneral_data_t   ,_param->_size_general_data    );
     
    112112       ALLOC1_INTERFACE("gpr_read", OUT, SOUTH, "Read port.", _param->_nb_gpr_read);
    113113
    114        ALLOC1_VAL_OUT   (out_GPR_READ_VAL);
    115        ALLOC1_ACK_IN    ( in_GPR_READ_ACK);
     114       ALLOC1_VALACK_OUT   (out_GPR_READ_VAL,VAL);
     115       ALLOC1_VALACK_IN    ( in_GPR_READ_ACK,ACK);
    116116       ALLOC1_SIGNAL_OUT(out_GPR_READ_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id   );
    117117       ALLOC1_SIGNAL_OUT(out_GPR_READ_NUM_REG      ,"num_reg"      ,Tgeneral_address_t,_param->_size_general_data    );
     
    124124       ALLOC1_INTERFACE("spr_read", OUT, SOUTH, "Read port.", _param->_nb_spr_read);
    125125
    126        ALLOC1_VAL_OUT   (out_SPR_READ_VAL);
    127        ALLOC1_ACK_IN    ( in_SPR_READ_ACK);
     126       ALLOC1_VALACK_OUT   (out_SPR_READ_VAL,VAL);
     127       ALLOC1_VALACK_IN    ( in_SPR_READ_ACK,ACK);
    128128       ALLOC1_SIGNAL_OUT(out_SPR_READ_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id   );
    129129       ALLOC1_SIGNAL_OUT(out_SPR_READ_NUM_REG      ,"num_reg"      ,Tspecial_address_t,_param->_size_special_data    );
     
    136136       ALLOC1_INTERFACE("gpr_write", IN , SOUTH, "Write port.", _param->_nb_gpr_write);
    137137
    138        ALLOC1_VAL_IN    ( in_GPR_WRITE_VAL);
     138       ALLOC1_VALACK_IN    ( in_GPR_WRITE_VAL,VAL);
    139139       ALLOC1_SIGNAL_IN ( in_GPR_WRITE_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id   );
    140140       ALLOC1_SIGNAL_IN ( in_GPR_WRITE_NUM_REG      ,"num_reg"      ,Tgeneral_address_t,_param->_size_general_data    );
     
    146146       ALLOC1_INTERFACE("spr_write", IN , SOUTH, "Write port.", _param->_nb_spr_write);
    147147
    148        ALLOC1_VAL_IN    ( in_SPR_WRITE_VAL);
     148       ALLOC1_VALACK_IN    ( in_SPR_WRITE_VAL,VAL);
    149149       ALLOC1_SIGNAL_IN ( in_SPR_WRITE_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id   );
    150150       ALLOC1_SIGNAL_IN ( in_SPR_WRITE_NUM_REG      ,"num_reg"      ,Tspecial_address_t,_param->_size_special_data    );
     
    216216       name = _name+"_read_queue";
    217217       std::cout << "Instance : " << name << std::endl;
    218        
    219218       {
    220219#ifdef POSITION
     
    248247         _component->port_map(name, "in_READ_QUEUE_IN_TYPE"                 ,dest, "in_READ_UNIT_IN_TYPE"                 );
    249248         _component->port_map(name, "in_READ_QUEUE_IN_STORE_QUEUE_PTR_WRITE",dest, "in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE");
     249         if (_param->_have_port_load_queue_ptr)
    250250         _component->port_map(name, "in_READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE" ,dest, "in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE" );
    251251         _component->port_map(name, "in_READ_QUEUE_IN_HAS_IMMEDIAT"         ,dest, "in_READ_UNIT_IN_HAS_IMMEDIAT"         );
     
    284284         _component->port_map(name,"out_READ_QUEUE_OUT_TYPE"                 ,dest, "in_INSERT_TYPE"                 );
    285285         _component->port_map(name,"out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE",dest, "in_INSERT_STORE_QUEUE_PTR_WRITE");
     286         if (_param->_have_port_load_queue_ptr)
    286287         _component->port_map(name,"out_READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE" ,dest, "in_INSERT_LOAD_QUEUE_PTR_WRITE" );
    287288         _component->port_map(name,"out_READ_QUEUE_OUT_HAS_IMMEDIAT"         ,dest, "in_INSERT_HAS_IMMEDIAT"         );
     
    375376       name = _name+"_reservation_station";
    376377       std::cout << "Instance : " << name << std::endl;
    377        
    378378       {
    379379#ifdef POSITION
     
    408408         _component->port_map(name, "in_INSERT_TYPE"                 ,dest,"out_READ_QUEUE_OUT_TYPE"                 );
    409409         _component->port_map(name, "in_INSERT_STORE_QUEUE_PTR_WRITE",dest,"out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE");
     410         if (_param->_have_port_load_queue_ptr)
    410411         _component->port_map(name, "in_INSERT_LOAD_QUEUE_PTR_WRITE" ,dest,"out_READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE" );
    411412         _component->port_map(name, "in_INSERT_HAS_IMMEDIAT"         ,dest,"out_READ_QUEUE_OUT_HAS_IMMEDIAT"         );
     
    452453           _component->port_map(name,"out_RETIRE_"+toString(i)+"_TYPE"                 ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_TYPE"                 );
    453454           _component->port_map(name,"out_RETIRE_"+toString(i)+"_STORE_QUEUE_PTR_WRITE",dest,"out_READ_UNIT_OUT_"+toString(i)+"_STORE_QUEUE_PTR_WRITE");
     455           if (_param->_have_port_load_queue_ptr)
    454456           _component->port_map(name,"out_RETIRE_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" );
    455457           _component->port_map(name,"out_RETIRE_"+toString(i)+"_HAS_IMMEDIAT"         ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_HAS_IMMEDIAT"         );
     
    528530         }       
    529531     }
     532     
    530533
    531534#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Read_unit_deallocation.cpp

    r76 r78  
    4242        delete     in_READ_UNIT_IN_TYPE                 ;
    4343        delete     in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE;
     44        if (_param->_have_port_load_queue_ptr)
    4445        delete     in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE ;
    4546        delete     in_READ_UNIT_IN_HAS_IMMEDIAT         ;
     
    7071        delete [] out_READ_UNIT_OUT_TYPE                 ;
    7172        delete [] out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE;
     73        if (_param->_have_port_load_queue_ptr)
    7274        delete [] out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ;
    7375        delete [] out_READ_UNIT_OUT_HAS_IMMEDIAT         ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h

    r77 r78  
    5555  public : ~Parameters () ;
    5656
    57   public :        std::string  msg_error  (void);
     57  public :        Parameters_test msg_error  (void);
    5858
    5959  public :        std::string   print      (uint32_t depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_allocation.cpp

    r75 r78  
    5454       ALLOC_INTERFACE ("execute_queue_in", IN, WEST, "Input of execute_queue");
    5555       
    56        ALLOC_VAL_IN    ( in_EXECUTE_QUEUE_IN_VAL);
    57        ALLOC_ACK_OUT   (out_EXECUTE_QUEUE_IN_ACK);
     56       ALLOC_VALACK_IN ( in_EXECUTE_QUEUE_IN_VAL,VAL);
     57       ALLOC_VALACK_OUT(out_EXECUTE_QUEUE_IN_ACK,ACK);
    5858       if(_param->_have_port_context_id)
    5959       ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_CONTEXT_ID   ,"context_id"   ,Tcontext_t        ,_param->_size_context_id       );
     
    7676       ALLOC_INTERFACE ("execute_queue_out", OUT, EAST, "Output of execute_queue");
    7777       
    78        ALLOC_VAL_OUT   (out_EXECUTE_QUEUE_OUT_VAL);
    79        ALLOC_ACK_IN    ( in_EXECUTE_QUEUE_OUT_ACK);
     78       ALLOC_VALACK_OUT(out_EXECUTE_QUEUE_OUT_VAL,VAL);
     79       ALLOC_VALACK_IN ( in_EXECUTE_QUEUE_OUT_ACK,ACK);
    8080       if(_param->_have_port_context_id)
    8181       ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_CONTEXT_ID   ,"context_id"   ,Tcontext_t     ,_param->_size_context_id   );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters_msg_error.cpp

    r73 r78  
    2222#undef  FUNCTION
    2323#define FUNCTION "Execute_queue::msg_error"
    24   std::string Parameters::msg_error(void)
     24  Parameters_test Parameters::msg_error(void)
    2525  {
    2626    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
    2727
    28     std::string msg = "";
    29 
    30     return msg;
     28    Parameters_test test ("Execute_queue");
    3129
    3230    log_printf(FUNC,Execute_queue,FUNCTION,"End");
     31
     32    return test;
    3333  };
    3434
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Parameters.h

    r77 r78  
    6666  public : ~Parameters () ;
    6767
    68   public :        std::string  msg_error  (void);
     68  public :        Parameters_test msg_error  (void);
    6969
    7070  public :        std::string   print      (uint32_t depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters_msg_error.cpp

    r74 r78  
    2222#undef  FUNCTION
    2323#define FUNCTION "Write_queue::msg_error"
    24   std::string Parameters::msg_error(void)
     24  Parameters_test Parameters::msg_error(void)
    2525  {
    2626    log_printf(FUNC,Write_queue,FUNCTION,"Begin");
    2727
    28     std::string msg = "";
     28    Parameters_test test ("Write_queue");
    2929
    3030    if (_nb_bypass_write > _size_queue)
    31       msg += " * The write_queue can't have more bypass_write than entry in the queue.";
    32 
    33     return msg;
     31      test.error("The write_queue can't have more bypass_write than entry in the queue.");
    3432
    3533    log_printf(FUNC,Write_queue,FUNCTION,"End");
     34
     35    return test;
    3636  };
    3737
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_allocation.cpp

    r77 r78  
    5353       ALLOC_INTERFACE ("write_queue_in", IN, WEST, "Input of write_queue");
    5454       
    55        ALLOC_VAL_IN    ( in_WRITE_QUEUE_IN_VAL);
    56        ALLOC_ACK_OUT   (out_WRITE_QUEUE_IN_ACK);
     55       ALLOC_VALACK_IN ( in_WRITE_QUEUE_IN_VAL,VAL);
     56       ALLOC_VALACK_OUT(out_WRITE_QUEUE_IN_ACK,ACK);
    5757       ALLOC_SIGNAL_IN ( in_WRITE_QUEUE_IN_CONTEXT_ID   ,"context_id"   ,Tcontext_t        ,_param->_size_context_id       );
    5858       ALLOC_SIGNAL_IN ( in_WRITE_QUEUE_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id     );
     
    7676       ALLOC_INTERFACE ("write_queue_out", OUT, EAST, "Output of write_queue");
    7777       
    78        ALLOC_VAL_OUT   (out_WRITE_QUEUE_OUT_VAL);
    79        ALLOC_ACK_IN    ( in_WRITE_QUEUE_OUT_ACK);
     78       ALLOC_VALACK_OUT(out_WRITE_QUEUE_OUT_VAL,VAL);
     79       ALLOC_VALACK_IN ( in_WRITE_QUEUE_OUT_ACK,ACK);
    8080       ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_CONTEXT_ID   ,"context_id"   ,Tcontext_t     ,_param->_size_context_id   );
    8181       ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_FRONT_END_ID ,"front_end_id" ,Tcontext_t     ,_param->_size_front_end_id );
     
    9494       ALLOC1_INTERFACE("gpr_write", OUT, SOUTH ,"Output of write_queue", _param->_nb_gpr_write);
    9595
    96        ALLOC1_VAL_OUT   (out_GPR_WRITE_VAL);
    97        ALLOC1_ACK_IN    ( in_GPR_WRITE_ACK);
     96       ALLOC1_VALACK_OUT(out_GPR_WRITE_VAL,VAL);
     97       ALLOC1_VALACK_IN ( in_GPR_WRITE_ACK,ACK);
    9898       ALLOC1_SIGNAL_OUT(out_GPR_WRITE_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id   );
    9999       ALLOC1_SIGNAL_OUT(out_GPR_WRITE_NUM_REG      ,"num_reg"      ,Tgeneral_address_t,_param->_size_general_register);
     
    105105       ALLOC1_INTERFACE("spr_write", OUT, SOUTH ,"Output of write_queue", _param->_nb_spr_write);
    106106
    107        ALLOC1_VAL_OUT   (out_SPR_WRITE_VAL);
    108        ALLOC1_ACK_IN    ( in_SPR_WRITE_ACK);
     107       ALLOC1_VALACK_OUT(out_SPR_WRITE_VAL,VAL);
     108       ALLOC1_VALACK_IN ( in_SPR_WRITE_ACK,ACK);
    109109       ALLOC1_SIGNAL_OUT(out_SPR_WRITE_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id   );
    110110       ALLOC1_SIGNAL_OUT(out_SPR_WRITE_NUM_REG      ,"num_reg"      ,Tspecial_address_t,_param->_size_special_register);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/include/Parameters.h

    r77 r78  
    7474  public : ~Parameters () ;
    7575
    76   public :        std::string  msg_error  (void);
     76  public :        Parameters_test msg_error  (void);
    7777
    7878  public :        std::string   print      (uint32_t depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Parameters_msg_error.cpp

    r74 r78  
    2020#undef  FUNCTION
    2121#define FUNCTION "Write_unit::msg_error"
    22   std::string Parameters::msg_error(void)
     22  Parameters_test Parameters::msg_error(void)
    2323  {
    2424    log_printf(FUNC,Write_unit,FUNCTION,"Begin");
    2525
    26     std::string msg = "";
     26    Parameters_test test ("Write_unit");
    2727
    2828    if (_size_write_queue == 0)
    29       msg += " * Write queue must have a less one entry.";
    30 
    31     return msg;
     29      test.error("Write queue must have a less one entry.");
    3230
    3331    log_printf(FUNC,Write_unit,FUNCTION,"End");
     32
     33    return test;
    3434  };
    3535
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_allocation.cpp

    r77 r78  
    5959       ALLOC_INTERFACE ("write_unit_in", IN, WEST, "Input of write_unit");
    6060       
    61        ALLOC_VAL_IN    ( in_WRITE_UNIT_IN_VAL);
    62        ALLOC_ACK_OUT   (out_WRITE_UNIT_IN_ACK);
     61       ALLOC_VALACK_IN ( in_WRITE_UNIT_IN_VAL,VAL);
     62       ALLOC_VALACK_OUT(out_WRITE_UNIT_IN_ACK,ACK);
    6363       ALLOC_SIGNAL_IN ( in_WRITE_UNIT_IN_CONTEXT_ID   ,"context_id"   ,Tcontext_t        ,_param->_size_context_id       );
    6464       ALLOC_SIGNAL_IN ( in_WRITE_UNIT_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id     );
     
    8282       ALLOC_INTERFACE ("write_unit_out", OUT, EAST, "Output of write_unit");
    8383       
    84        ALLOC_VAL_OUT   (out_WRITE_UNIT_OUT_VAL);
    85        ALLOC_ACK_IN    ( in_WRITE_UNIT_OUT_ACK);
     84       ALLOC_VALACK_OUT(out_WRITE_UNIT_OUT_VAL,VAL);
     85       ALLOC_VALACK_IN ( in_WRITE_UNIT_OUT_ACK,ACK);
    8686       ALLOC_SIGNAL_OUT(out_WRITE_UNIT_OUT_CONTEXT_ID   ,"context_id"   ,Tcontext_t     ,_param->_size_context_id   );
    8787       ALLOC_SIGNAL_OUT(out_WRITE_UNIT_OUT_FRONT_END_ID ,"front_end_id" ,Tcontext_t     ,_param->_size_front_end_id );
     
    100100       ALLOC1_INTERFACE("gpr_write", OUT, SOUTH ,"Output of write_unit", _param->_nb_gpr_write);
    101101
    102        ALLOC1_VAL_OUT   (out_GPR_WRITE_VAL);
    103        ALLOC1_ACK_IN    ( in_GPR_WRITE_ACK);
     102       ALLOC1_VALACK_OUT(out_GPR_WRITE_VAL,VAL);
     103       ALLOC1_VALACK_IN ( in_GPR_WRITE_ACK,ACK);
    104104       ALLOC1_SIGNAL_OUT(out_GPR_WRITE_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id   );
    105105       ALLOC1_SIGNAL_OUT(out_GPR_WRITE_NUM_REG      ,"num_reg"      ,Tgeneral_address_t,_param->_size_general_register);
     
    111111       ALLOC1_INTERFACE("spr_write", OUT, SOUTH ,"Output of write_unit", _param->_nb_spr_write);
    112112
    113        ALLOC1_VAL_OUT   (out_SPR_WRITE_VAL);
    114        ALLOC1_ACK_IN    ( in_SPR_WRITE_ACK);
     113       ALLOC1_VALACK_OUT(out_SPR_WRITE_VAL,VAL);
     114       ALLOC1_VALACK_IN ( in_SPR_WRITE_ACK,ACK);
    115115       ALLOC1_SIGNAL_OUT(out_SPR_WRITE_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id   );
    116116       ALLOC1_SIGNAL_OUT(out_SPR_WRITE_NUM_REG      ,"num_reg"      ,Tspecial_address_t,_param->_size_special_register);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/SelfTest/src/test.cpp

    r77 r78  
    5252  public : Tpacket_t          _packet_id      ;
    5353//public : Toperation_t       _operation      ;
    54 //public : Ttype_t            _type           ;
     54  public : Ttype_t            _type           ;
    5555  public : Tcontrol_t         _write_rd       ;
    5656  public : Tgeneral_address_t _num_reg_rd     ;
     
    6868                  Tpacket_t          packet_id      ,
    6969//                Toperation_t       operation      ,
    70 //                Ttype_t            type           ,
     70                  Ttype_t            type           ,
    7171                  Tcontrol_t         write_rd       ,
    7272                  Tgeneral_address_t num_reg_rd     ,
     
    8484    _packet_id      = packet_id    ;
    8585//  _operation      = operation    ;
    86 //  _type           = type         ;
     86    _type           = type         ;
    8787    _write_rd       = write_rd     ;
    8888    _num_reg_rd     = num_reg_rd   ;
     
    128128  ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_PACKET_ID    ," in_EXECUTE_UNIT_OUT_PACKET_ID    ",Tpacket_t         ,_param->_nb_execute_unit);
    129129//ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_OPERATION    ," in_EXECUTE_UNIT_OUT_OPERATION    ",Toperation_t      ,_param->_nb_execute_unit);
    130 //ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_TYPE         ," in_EXECUTE_UNIT_OUT_TYPE         ",Ttype_t           ,_param->_nb_execute_unit);
     130  ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_TYPE         ," in_EXECUTE_UNIT_OUT_TYPE         ",Ttype_t           ,_param->_nb_execute_unit);
    131131  ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_WRITE_RD     ," in_EXECUTE_UNIT_OUT_WRITE_RD     ",Tcontrol_t        ,_param->_nb_execute_unit);
    132132  ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_NUM_REG_RD   ," in_EXECUTE_UNIT_OUT_NUM_REG_RD   ",Tgeneral_address_t,_param->_nb_execute_unit);
     
    145145  ALLOC1_SC_SIGNAL(out_WRITE_UNIT_IN_PACKET_ID       ,"out_WRITE_UNIT_IN_PACKET_ID       ",Tpacket_t         ,_param->_nb_write_unit  );
    146146//ALLOC1_SC_SIGNAL(out_WRITE_UNIT_IN_OPERATION       ,"out_WRITE_UNIT_IN_OPERATION       ",Toperation_t      ,_param->_nb_write_unit  );
    147 //ALLOC1_SC_SIGNAL(out_WRITE_UNIT_IN_TYPE            ,"out_WRITE_UNIT_IN_TYPE            ",Ttype_t           ,_param->_nb_write_unit  );
     147  ALLOC1_SC_SIGNAL(out_WRITE_UNIT_IN_TYPE            ,"out_WRITE_UNIT_IN_TYPE            ",Ttype_t           ,_param->_nb_write_unit  );
    148148  ALLOC1_SC_SIGNAL(out_WRITE_UNIT_IN_WRITE_RD        ,"out_WRITE_UNIT_IN_WRITE_RD        ",Tcontrol_t        ,_param->_nb_write_unit  );
    149149  ALLOC1_SC_SIGNAL(out_WRITE_UNIT_IN_NUM_REG_RD      ,"out_WRITE_UNIT_IN_NUM_REG_RD      ",Tgeneral_address_t,_param->_nb_write_unit  );
     
    176176  INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_PACKET_ID    ,_param->_nb_execute_unit);
    177177//INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_OPERATION    ,_param->_nb_execute_unit);
    178 //INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_TYPE         ,_param->_nb_execute_unit);
     178  INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_TYPE         ,_param->_nb_execute_unit);
    179179  INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_WRITE_RD     ,_param->_nb_execute_unit);
    180180  INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_NUM_REG_RD   ,_param->_nb_execute_unit);
     
    198198  INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit,out_WRITE_UNIT_IN_PACKET_ID       ,_param->_nb_write_unit  );
    199199//INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit,out_WRITE_UNIT_IN_OPERATION       ,_param->_nb_write_unit  );
    200 //INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit,out_WRITE_UNIT_IN_TYPE            ,_param->_nb_write_unit  );
     200  INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit,out_WRITE_UNIT_IN_TYPE            ,_param->_nb_write_unit  );
    201201  INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit,out_WRITE_UNIT_IN_WRITE_RD        ,_param->_nb_write_unit  );
    202202  INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit,out_WRITE_UNIT_IN_NUM_REG_RD      ,_param->_nb_write_unit  );
     
    282282                                          nb_request_in,
    283283                                          //range<Toperation_t      > (rand(), _param->_size_operation       ),
    284                                           //range<Ttype_t           > (rand(), _param->_size_type            ),
     284                                          range<Ttype_t           > (rand(), _param->_size_type            ),
    285285                                          range<Tcontrol_t        > (rand(), 2                             ),
    286286                                          range<Tgeneral_address_t> (rand(), _param->_size_general_register),
     
    314314                  in_EXECUTE_UNIT_OUT_PACKET_ID            [i] ->write(request[i].front()._packet_id            );
    315315//                in_EXECUTE_UNIT_OUT_OPERATION            [i] ->write(request[i].front()._operation            );
    316 //                in_EXECUTE_UNIT_OUT_TYPE                 [i] ->write(request[i].front()._type                 );
     316                  in_EXECUTE_UNIT_OUT_TYPE                 [i] ->write(request[i].front()._type                 );
    317317                  in_EXECUTE_UNIT_OUT_WRITE_RD             [i] ->write(request[i].front()._write_rd             );
    318318                  in_EXECUTE_UNIT_OUT_NUM_REG_RD           [i] ->write(request[i].front()._num_reg_rd           );
     
    368368                TEST(Tcontext_t        ,out_WRITE_UNIT_IN_OOO_ENGINE_ID        [i]->read(), request[execute_unit].front()._ooo_engine_id        );
    369369//              TEST(Toperation_t      ,out_WRITE_UNIT_IN_OPERATION            [i]->read(), request[execute_unit].front()._operation            );
    370 //              TEST(Ttype_t           ,out_WRITE_UNIT_IN_TYPE                 [i]->read(), request[execute_unit].front()._type                 );
     370                TEST(Ttype_t           ,out_WRITE_UNIT_IN_TYPE                 [i]->read(), request[execute_unit].front()._type                 );
    371371                TEST(Tcontrol_t        ,out_WRITE_UNIT_IN_WRITE_RD             [i]->read(), request[execute_unit].front()._write_rd             );
    372372                TEST(Tgeneral_address_t,out_WRITE_UNIT_IN_NUM_REG_RD           [i]->read(), request[execute_unit].front()._num_reg_rd           );
     
    405405  delete []  in_EXECUTE_UNIT_OUT_PACKET_ID    ;
    406406//delete []  in_EXECUTE_UNIT_OUT_OPERATION    ;
    407 //delete []  in_EXECUTE_UNIT_OUT_TYPE         ;
     407  delete []  in_EXECUTE_UNIT_OUT_TYPE         ;
    408408  delete []  in_EXECUTE_UNIT_OUT_WRITE_RD     ;
    409409  delete []  in_EXECUTE_UNIT_OUT_NUM_REG_RD   ;
     
    423423  delete [] out_WRITE_UNIT_IN_PACKET_ID       ;
    424424//delete [] out_WRITE_UNIT_IN_OPERATION       ;
    425 //delete [] out_WRITE_UNIT_IN_TYPE            ;
     425  delete [] out_WRITE_UNIT_IN_TYPE            ;
    426426  delete [] out_WRITE_UNIT_IN_WRITE_RD        ;
    427427  delete [] out_WRITE_UNIT_IN_NUM_REG_RD      ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Execution_unit_to_Write_unit.h

    r77 r78  
    1717#include "Common/include/ToString.h"
    1818#include "Common/include/Debug.h"
     19#include "Behavioural/include/Identification.h"
    1920
    20 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Types.h"
     21#include "Behavioural/include/Types.h"
    2122#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Parameters.h"
    2223#ifdef STATISTICS
     
    7172  public    : SC_IN (Tpacket_t         )   **  in_EXECUTE_UNIT_OUT_PACKET_ID      ;
    7273//public    : SC_IN (Toperation_t      )   **  in_EXECUTE_UNIT_OUT_OPERATION      ;
    73 //public    : SC_IN (Ttype_t           )   **  in_EXECUTE_UNIT_OUT_TYPE           ;
     74  public    : SC_IN (Ttype_t           )   **  in_EXECUTE_UNIT_OUT_TYPE           ;
    7475  public    : SC_IN (Tcontrol_t        )   **  in_EXECUTE_UNIT_OUT_WRITE_RD       ;
    7576  public    : SC_IN (Tgeneral_address_t)   **  in_EXECUTE_UNIT_OUT_NUM_REG_RD     ;
     
    9091  public    : SC_OUT(Tpacket_t         )   ** out_WRITE_UNIT_IN_PACKET_ID      ;
    9192//public    : SC_OUT(Toperation_t      )   ** out_WRITE_UNIT_IN_OPERATION      ;
    92 //public    : SC_OUT(Ttype_t           )   ** out_WRITE_UNIT_IN_TYPE           ;
     93  public    : SC_OUT(Ttype_t           )   ** out_WRITE_UNIT_IN_TYPE           ;
    9394  public    : SC_OUT(Tcontrol_t        )   ** out_WRITE_UNIT_IN_WRITE_RD       ;
    9495  public    : SC_OUT(Tgeneral_address_t)   ** out_WRITE_UNIT_IN_NUM_REG_RD     ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Parameters.h

    r77 r78  
    1010
    1111#include "Behavioural/include/Parameters.h"
     12#include "Behavioural/include/Types.h"
    1213#include "Common/include/Debug.h"
    13 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Types.h"
     14#include "Behavioural/include/Identification.h"
    1415
    1516namespace morpheo {
     
    7071  public : ~Parameters ();
    7172
    72   public :        std::string  msg_error  (void);
     73  public :        Parameters_test msg_error  (void);
    7374
    7475  public :        std::string   print      (uint32_t depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/src/Execution_unit_to_Write_unit_allocation.cpp

    r77 r78  
    6060       ALLOC1_INTERFACE("execute_unit_out", IN, EAST, "Output of execution_unit", _param->_nb_execute_unit);
    6161
    62        ALLOC1_VAL_IN    ( in_EXECUTE_UNIT_OUT_VAL);
    63        ALLOC1_ACK_OUT   (out_EXECUTE_UNIT_OUT_ACK);
     62       ALLOC1_VALACK_IN ( in_EXECUTE_UNIT_OUT_VAL,VAL);
     63       ALLOC1_VALACK_OUT(out_EXECUTE_UNIT_OUT_ACK,ACK);
    6464       ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_CONTEXT_ID   ,"context_id"   ,Tcontext_t        ,_param->_size_context_id      );
    6565       ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_FRONT_END_ID ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id    );
     
    6767       ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_packet_id       );
    6868     //ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation       );
    69      //ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type            );
     69       ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type            );
    7070       ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_WRITE_RD     ,"write_rd"     ,Tcontrol_t        ,1                             );
    7171       ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_NUM_REG_RD   ,"num_reg_rd"   ,Tgeneral_address_t,_param->_size_general_register);
     
    8282       ALLOC1_INTERFACE("write_unit_in", OUT, WEST, "Input of write_unit", _param->_nb_write_unit);
    8383
    84        ALLOC1_VAL_OUT(out_WRITE_UNIT_IN_VAL);
    85        ALLOC1_ACK_IN ( in_WRITE_UNIT_IN_ACK);
     84       ALLOC1_VALACK_OUT(out_WRITE_UNIT_IN_VAL,VAL);
     85       ALLOC1_VALACK_IN ( in_WRITE_UNIT_IN_ACK,ACK);
    8686       ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_CONTEXT_ID   ,"context_id"   ,Tcontext_t        ,_param->_size_context_id      );
    8787       ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id    );
     
    8989       ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_packet_id       );
    9090     //ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation       );
    91      //ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type            );
     91       ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type            );
    9292       ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_WRITE_RD     ,"write_rd"     ,Tcontrol_t        ,1                             );
    9393       ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_NUM_REG_RD   ,"num_reg_rd"   ,Tgeneral_address_t,_param->_size_general_register);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/src/Execution_unit_to_Write_unit_deallocation.cpp

    r77 r78  
    3939        delete []  in_EXECUTE_UNIT_OUT_PACKET_ID    ;
    4040      //delete []  in_EXECUTE_UNIT_OUT_OPERATION    ;
    41       //delete []  in_EXECUTE_UNIT_OUT_TYPE         ;
     41        delete []  in_EXECUTE_UNIT_OUT_TYPE         ;
    4242        delete []  in_EXECUTE_UNIT_OUT_WRITE_RD     ;
    4343        delete []  in_EXECUTE_UNIT_OUT_NUM_REG_RD   ;
     
    6161        delete [] out_WRITE_UNIT_IN_PACKET_ID    ;
    6262      //delete [] out_WRITE_UNIT_IN_OPERATION    ;
    63       //delete [] out_WRITE_UNIT_IN_TYPE         ;
     63        delete [] out_WRITE_UNIT_IN_TYPE         ;
    6464        delete [] out_WRITE_UNIT_IN_WRITE_RD     ;
    6565        delete [] out_WRITE_UNIT_IN_NUM_REG_RD   ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/src/Execution_unit_to_Write_unit_genMealy.cpp

    r77 r78  
    7575                    PORT_WRITE(out_WRITE_UNIT_IN_PACKET_ID             [dest], PORT_READ(in_EXECUTE_UNIT_OUT_PACKET_ID             [i]));
    7676                  //PORT_WRITE(out_WRITE_UNIT_IN_OPERATION             [dest], PORT_READ(in_EXECUTE_UNIT_OUT_OPERATION             [i]));
    77                   //PORT_WRITE(out_WRITE_UNIT_IN_TYPE                  [dest], PORT_READ(in_EXECUTE_UNIT_OUT_TYPE                  [i]));
     77                    PORT_WRITE(out_WRITE_UNIT_IN_TYPE                  [dest], PORT_READ(in_EXECUTE_UNIT_OUT_TYPE                  [i]));
    7878                    PORT_WRITE(out_WRITE_UNIT_IN_WRITE_RD              [dest], PORT_READ(in_EXECUTE_UNIT_OUT_WRITE_RD              [i]));
    7979                    PORT_WRITE(out_WRITE_UNIT_IN_NUM_REG_RD            [dest], PORT_READ(in_EXECUTE_UNIT_OUT_NUM_REG_RD            [i]));
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/src/Parameters_msg_error.cpp

    r77 r78  
    2121#undef  FUNCTION
    2222#define FUNCTION "Execution_unit_to_Write_unit::msg_error"
    23   std::string Parameters::msg_error(void)
     23  Parameters_test Parameters::msg_error(void)
    2424  {
    2525    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
    2626
    27     std::string msg = "";
     27    Parameters_test test("Execution_unit_to_Write_unit");
    2828
    2929    for (uint32_t i=0; i<_nb_execute_unit; i++)
     
    3535
    3636        if (j == _nb_write_unit)
    37           msg += "  - The execute_unit ["+toString(i)+"] is link with none write_unit.\n";
     37          test.error("The execute_unit ["+toString(i)+"] is link with none write_unit.");
    3838      }   
    3939
     
    4646
    4747        if (j == _nb_thread)
    48           msg += "  - The write_unit ["+toString(i)+"] have none source's thread.\n";
     48          test.error("The write_unit ["+toString(i)+"] have none source's thread.");
    4949      }   
    5050
    51     return msg;
     51    if ( (_priority != PRIORITY_STATIC     ) and
     52         (_priority != PRIORITY_ROUND_ROBIN))
     53      test.error("Unsupported priority scheme. It must be Static or Round Robin.");
    5254
    5355    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
     56
     57    return test;
    5458  };
    5559
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/SelfTest/config_multi_execute-mono_thread.cfg

    r77 r78  
    111116      16      *2      # nb_special_register   
    12124       4       *2      # size_store_queue       
    13 4       4       *2      # size_load_queue       
     131       4       *4      # size_load_queue       
    14140       1       +1      # priority
    15151       1       +1      # table_routing        [0][0]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/SelfTest/src/test.cpp

    r77 r78  
    190190  INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_TYPE                 ,_param->_nb_read_unit);
    191191  INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_read_unit);
     192  if (_param->_have_port_load_queue_ptr)
    192193  INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_read_unit);
    193194  INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_HAS_IMMEDIAT         ,_param->_nb_read_unit);
     
    214215  INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_TYPE                 ,_param->_nb_execute_unit);
    215216  INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE,_param->_nb_execute_unit);
     217  if (_param->_have_port_load_queue_ptr)
    216218  INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_execute_unit);
    217219  INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ,_param->_nb_execute_unit);
     
    352354                  in_READ_UNIT_OUT_TYPE                 [i] ->write(request[i].front()._type                 );
    353355                  in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE[i] ->write(request[i].front()._store_queue_ptr_write);
     356                  if (_param->_have_port_load_queue_ptr)
    354357                  in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE [i] ->write(request[i].front()._load_queue_ptr_write );
    355358                  in_READ_UNIT_OUT_HAS_IMMEDIAT         [i] ->write(request[i].front()._has_immediat         );
     
    408411                TEST(Ttype_t           ,out_EXECUTE_UNIT_IN_TYPE                 [i]->read(), request[read_unit].front()._type                 );
    409412                TEST(Tlsq_ptr_t        ,out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE[i]->read(), request[read_unit].front()._store_queue_ptr_write);
     413                if (_param->_have_port_load_queue_ptr)
    410414                TEST(Tlsq_ptr_t        ,out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i]->read(), request[read_unit].front()._load_queue_ptr_write );
    411415                TEST(Tcontrol_t        ,out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         [i]->read(), request[read_unit].front()._has_immediat         );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/include/Parameters.h

    r77 r78  
    1111#include "Common/include/Debug.h"
    1212#include "Behavioural/include/Parameters.h"
    13 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/include/Types.h"
     13#include "Behavioural/include/Types.h"
     14#include "Behavioural/include/Identification.h"
    1415
    1516namespace morpheo {
     
    3839  public : const uint32_t    _size_load_queue        ;
    3940  public : const Tpriority_t _priority               ;
    40   public :       bool     ** _table_routing          ; //array [nb_read_unit][nb_execute_unit]
    41   public :       bool     ** _table_execute_type     ; //array [nb_execute_unit][nb_type]
    42   public :       bool     ** _table_execute_thread   ; //array [nb_execute_unit][nb_thread]
     41  public :       bool     ** _table_routing          ; //[nb_read_unit][nb_execute_unit]
     42  public :       bool     ** _table_execute_type     ; //[nb_execute_unit][nb_type]
     43  public :       bool     ** _table_execute_thread   ; //[nb_execute_unit][nb_thread]
    4344
    4445  public : const uint32_t    _size_context_id        ;
     
    5354  public : const bool        _have_port_ooo_engine_id;
    5455  public : const bool        _have_port_packet_id    ;
     56  public : const bool        _have_port_load_queue_ptr;
    5557
    5658  public : const uint32_t    _nb_thread              ;
     
    7880  public : ~Parameters () ;
    7981
    80   public :        std::string  msg_error  (void);
     82  public :        Parameters_test msg_error  (void);
    8183
    8284  public :        std::string   print      (uint32_t depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/include/Read_unit_to_Execution_unit.h

    r77 r78  
    1717#include "Common/include/ToString.h"
    1818#include "Common/include/Debug.h"
    19 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/include/Types.h"
     19#include "Behavioural/include/Types.h"
     20#include "Behavioural/include/Identification.h"
    2021
    2122#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/include/Parameters.h"
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Parameters.cpp

    r77 r78  
    6060    _have_port_ooo_engine_id (_size_ooo_engine_id > 0),
    6161    _have_port_packet_id     (_size_packet_id     > 0),
     62    _have_port_load_queue_ptr(_size_load_queue    > 1),
    6263
    6364    _nb_thread               (get_nb_thread (nb_context, nb_front_end, nb_ooo_engine))
     
    6869    _table_execute_type   = table_execute_type  ;
    6970    _table_execute_thread = table_execute_thread;
    70    
    71     _nb_load_store_unit = 0;
     71
     72    _nb_load_store_unit   = 0;
    7273
    7374    for (uint32_t i=0; i<nb_execute_unit; i++)
    74       if (table_execute_type[i][TYPE_MEMORY] == true)
    75         _nb_load_store_unit ++;
    76 
     75      {
     76        if (table_execute_type[i][TYPE_MEMORY] == true)
     77          _nb_load_store_unit ++;
     78      }
    7779    // a execution_unit can't be a load_store unit and a functionnal unit
    7880    _nb_functionnal_unit = nb_execute_unit-_nb_load_store_unit;
     
    111113    _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
    112114    _have_port_packet_id     (param._have_port_packet_id    ),
     115    _have_port_load_queue_ptr(param._have_port_load_queue_ptr),
    113116
    114117    _nb_thread               (param._nb_thread              )
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Parameters_msg_error.cpp

    r77 r78  
    2121#undef  FUNCTION
    2222#define FUNCTION "Read_unit_to_Execution_unit::msg_error"
    23   std::string Parameters::msg_error(void)
     23  Parameters_test Parameters::msg_error(void)
    2424  {
    2525    log_printf(FUNC,Read_unit_to_Execution_unit,FUNCTION,"Begin");
    2626
    27     std::string msg = "";
     27    Parameters_test test ("Read_unit_to_Execution_unit");
    2828
    2929    // TYPE         | multiple? | Optionnal? | Exclusive? | Comment
     
    9090                // Test uniq type
    9191                if (type_present [j][k] and type_uniq[k])
    92                   msg += "  - The execute_unit '"+toString(i)+"' can execute operation of type '"+toString_type(k)+"' at the thread '"+toString(j)+"'. But an another execute_unit can be execute the same type for the same thread. And the type must be uniq !.\n";
     92                  test.error("The execute_unit '"+toString(i)+"' can execute operation of type '"+toString_type(k)+"' at the thread '"+toString(j)+"'. But an another execute_unit can be execute the same type for the same thread. And the type must be uniq !.");
    9393               
    9494                type_present [j][k] = true;
     
    9999        for (uint32_t i=0; i<_nb_thread; i++)
    100100          if (not type_present [i][j])
    101             msg += "  - The thread '"+toString(i)+"' can't access at the execute_unit to execute the type's operation '"+toString_type(j)+"' (and this type is not optionnal !).\n";
     101            test.error("The thread '"+toString(i)+"' can't access at the execute_unit to execute the type's operation '"+toString_type(j)+"' (and this type is not optionnal !).");
    102102           
    103103    // Test all excluve type
     
    108108            if ((j != k) and (_table_execute_type[i][k] == true))
    109109              {
    110                 msg += "  - The execute_unit ["+toString(i)+"] implement the type '"+toString_type(j)+"', and this type is exclusive with all others type.\n";
     110                test.error("The execute_unit ["+toString(i)+"] implement the type '"+toString_type(j)+"', and this type is exclusive with all others type.");
    111111                break;
    112112              }
     
    120120
    121121        if (j == _nb_thread)
    122           msg += "  - The execute_unit ["+toString(i)+"] have none source's thread.\n";
     122          test.error("The execute_unit ["+toString(i)+"] have none source's thread.");
    123123      }   
    124    
    125     return msg;
    126124
     125    if ( (_priority != PRIORITY_STATIC     ) and
     126         (_priority != PRIORITY_ROUND_ROBIN))
     127      test.error("Unsupported priority scheme. It must be Static or Round Robin.");
     128       
    127129    log_printf(FUNC,Read_unit_to_Execution_unit,FUNCTION,"End");
     130
     131    return test;
    128132  };
    129133
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Read_unit_to_Execution_unit.cpp

    r77 r78  
    8989                      << (*(in_READ_UNIT_OUT_OPERATION             [i]))
    9090                      << (*(in_READ_UNIT_OUT_TYPE                  [i]))
    91                       << (*(in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE [i]))
    92                       << (*(in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE  [i]))
    9391                      << (*(in_READ_UNIT_OUT_HAS_IMMEDIAT          [i]))
    9492                      << (*(in_READ_UNIT_OUT_IMMEDIAT              [i]))
     
    9997                      << (*(in_READ_UNIT_OUT_NUM_REG_RD            [i]))
    10098                      << (*(in_READ_UNIT_OUT_WRITE_RE              [i]))
    101                       << (*(in_READ_UNIT_OUT_NUM_REG_RE            [i]));
    102 
     99                      << (*(in_READ_UNIT_OUT_NUM_REG_RE            [i]))
     100                      << (*(in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE [i]));
     101
     102            if (_param->_have_port_load_queue_ptr)
     103            sensitive  << (*(in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE  [i]));
    103104            if (_param->_have_port_context_id)
    104105            sensitive  << (*(in_READ_UNIT_OUT_CONTEXT_ID            [i]));
     
    260261              }
    261262
     263            if (_param->_have_port_load_queue_ptr)
     264              {
    262265            (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    263266
     
    274277                (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID        [j]));
    275278              }
    276 
     279              }
     280           
    277281            (*(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    278282
     
    364368                (*(out_EXECUTE_UNIT_IN_WRITE_RD [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
    365369              }
    366 
     370           
    367371            (*(out_EXECUTE_UNIT_IN_NUM_REG_RD [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    368372
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Read_unit_to_Execution_unit_allocation.cpp

    r77 r78  
    5959       ALLOC1_INTERFACE("read_unit_out", IN, EAST, "Output of read_unit", _param->_nb_read_unit);
    6060
    61        ALLOC1_VAL_IN ( in_READ_UNIT_OUT_VAL);
    62        ALLOC1_ACK_OUT(out_READ_UNIT_OUT_ACK);
     61       ALLOC1_VALACK_IN ( in_READ_UNIT_OUT_VAL,VAL);
     62       ALLOC1_VALACK_OUT(out_READ_UNIT_OUT_ACK,ACK);
    6363
    6464       ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_CONTEXT_ID           ,"CONTEXT_ID"           ,Tcontext_t        ,_param->_size_context_id);
     
    6868       ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_OPERATION            ,"OPERATION"            ,Toperation_t      ,_param->_size_operation);
    6969       ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_TYPE                 ,"TYPE"                 ,Ttype_t           ,_param->_size_type);
    70        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,"STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,_param->_size_store_queue);
    71        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,"LOAD_QUEUE_PTR_WRITE" ,Tlsq_ptr_t        ,_param->_size_load_queue);
     70       ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,"STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,log2(_param->_size_store_queue));
     71       ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,"LOAD_QUEUE_PTR_WRITE" ,Tlsq_ptr_t        ,log2(_param->_size_load_queue));
    7272       ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_HAS_IMMEDIAT         ,"HAS_IMMEDIAT"         ,Tcontrol_t        ,1);
    7373       ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_IMMEDIAT             ,"IMMEDIAT"             ,Tgeneral_data_t   ,_param->_size_general_data);
     
    8282    // ~~~~~[ Interface "execute_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8383     {
    84        ALLOC1_INTERFACE("execute_unit_out", IN, EAST, "Output of execute_unit", _param->_nb_execute_unit);
    85 
    86        ALLOC1_VAL_OUT(out_EXECUTE_UNIT_IN_VAL);
    87        ALLOC1_ACK_IN ( in_EXECUTE_UNIT_IN_ACK);
     84       ALLOC1_INTERFACE("execute_unit_in", OUT, WEST, "Input of execute_unit", _param->_nb_execute_unit);
     85       
     86       ALLOC1_VALACK_OUT(out_EXECUTE_UNIT_IN_VAL,VAL);
     87       ALLOC1_VALACK_IN ( in_EXECUTE_UNIT_IN_ACK,ACK);
    8888
    8989       ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_CONTEXT_ID           ,"CONTEXT_ID"           ,Tcontext_t        ,_param->_size_context_id);
     
    9393       ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_OPERATION            ,"OPERATION"            ,Toperation_t      ,_param->_size_operation);
    9494       ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_TYPE                 ,"TYPE"                 ,Ttype_t           ,_param->_size_type);
    95        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE,"STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,_param->_size_store_queue);
    96        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,"LOAD_QUEUE_PTR_WRITE" ,Tlsq_ptr_t        ,_param->_size_load_queue);
    9795       ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ,"HAS_IMMEDIAT"         ,Tcontrol_t        ,1);
     96       ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_DATA_RC              ,"DATA_RC"              ,Tspecial_data_t   ,_param->_size_special_data);
     97       ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_WRITE_RD             ,"WRITE_RD"             ,Tcontrol_t        ,1);
     98       ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_WRITE_RE             ,"WRITE_RE"             ,Tcontrol_t        ,1);
     99       ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_NUM_REG_RE           ,"NUM_REG_RE"           ,Tspecial_address_t,_param->_size_special_register);
     100       ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE,"STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,log2(_param->_size_store_queue));
     101       ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,"LOAD_QUEUE_PTR_WRITE" ,Tlsq_ptr_t        ,log2(_param->_size_load_queue));
    98102       ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_IMMEDIAT             ,"IMMEDIAT"             ,Tgeneral_data_t   ,_param->_size_general_data);
    99103       ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_DATA_RA              ,"DATA_RA"              ,Tgeneral_data_t   ,_param->_size_general_data);
    100104       ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_DATA_RB              ,"DATA_RB"              ,Tgeneral_data_t   ,_param->_size_general_data);
    101        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_DATA_RC              ,"DATA_RC"              ,Tspecial_data_t   ,_param->_size_special_data);
    102        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_WRITE_RD             ,"WRITE_RD"             ,Tcontrol_t        ,1);
    103105       ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_NUM_REG_RD           ,"NUM_REG_RD"           ,Tgeneral_address_t,_param->_size_general_register);
    104        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_WRITE_RE             ,"WRITE_RE"             ,Tcontrol_t        ,1);
    105        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_NUM_REG_RE           ,"NUM_REG_RE"           ,Tspecial_address_t,_param->_size_special_register);
    106106     }
    107107    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Read_unit_to_Execution_unit_deallocation.cpp

    r77 r78  
    4242        delete [] in_READ_UNIT_OUT_TYPE                 ;
    4343        delete [] in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE;
     44        if (_param->_have_port_load_queue_ptr)
    4445        delete [] in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ;
    4546        delete [] in_READ_UNIT_OUT_HAS_IMMEDIAT         ;
     
    6667        delete [] out_EXECUTE_UNIT_IN_OPERATION            ;
    6768        delete [] out_EXECUTE_UNIT_IN_TYPE                 ;
     69        delete [] out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ;
     70        delete [] out_EXECUTE_UNIT_IN_DATA_RC              ;
     71        delete [] out_EXECUTE_UNIT_IN_WRITE_RD             ;
     72        delete [] out_EXECUTE_UNIT_IN_WRITE_RE             ;
     73        delete [] out_EXECUTE_UNIT_IN_NUM_REG_RE           ;
    6874        delete [] out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE;
     75        if (_param->_have_port_load_queue_ptr)
    6976        delete [] out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ;
    70         delete [] out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ;
    7177        delete [] out_EXECUTE_UNIT_IN_IMMEDIAT             ;
    7278        delete [] out_EXECUTE_UNIT_IN_DATA_RA              ;
    7379        delete [] out_EXECUTE_UNIT_IN_DATA_RB              ;
    74         delete [] out_EXECUTE_UNIT_IN_DATA_RC              ;
    75         delete [] out_EXECUTE_UNIT_IN_WRITE_RD             ;
    7680        delete [] out_EXECUTE_UNIT_IN_NUM_REG_RD           ;
    77         delete [] out_EXECUTE_UNIT_IN_WRITE_RE             ;
    78         delete [] out_EXECUTE_UNIT_IN_NUM_REG_RE           ;
    7981      }
    8082    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Read_unit_to_Execution_unit_genMealy.cpp

    r77 r78  
    7878                    PORT_WRITE(out_EXECUTE_UNIT_IN_OPERATION             [dest], PORT_READ(in_READ_UNIT_OUT_OPERATION             [i]));
    7979                    PORT_WRITE(out_EXECUTE_UNIT_IN_TYPE                  [dest], PORT_READ(in_READ_UNIT_OUT_TYPE                  [i]));
     80                    PORT_WRITE(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT          [dest], PORT_READ(in_READ_UNIT_OUT_HAS_IMMEDIAT          [i]));
     81                    PORT_WRITE(out_EXECUTE_UNIT_IN_DATA_RC               [dest], PORT_READ(in_READ_UNIT_OUT_DATA_RC               [i]));
     82                    PORT_WRITE(out_EXECUTE_UNIT_IN_WRITE_RD              [dest], PORT_READ(in_READ_UNIT_OUT_WRITE_RD              [i]));
     83                    PORT_WRITE(out_EXECUTE_UNIT_IN_WRITE_RE              [dest], PORT_READ(in_READ_UNIT_OUT_WRITE_RE              [i]));
     84                    PORT_WRITE(out_EXECUTE_UNIT_IN_NUM_REG_RE            [dest], PORT_READ(in_READ_UNIT_OUT_NUM_REG_RE            [i]));
    8085                    PORT_WRITE(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [dest], PORT_READ(in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE [i]));
     86                    if (_param->_have_port_load_queue_ptr)
    8187                    PORT_WRITE(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE  [dest], PORT_READ(in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE  [i]));
    82                     PORT_WRITE(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT          [dest], PORT_READ(in_READ_UNIT_OUT_HAS_IMMEDIAT          [i]));
    8388                    PORT_WRITE(out_EXECUTE_UNIT_IN_IMMEDIAT              [dest], PORT_READ(in_READ_UNIT_OUT_IMMEDIAT              [i]));
    8489                    PORT_WRITE(out_EXECUTE_UNIT_IN_DATA_RA               [dest], PORT_READ(in_READ_UNIT_OUT_DATA_RA               [i]));
    8590                    PORT_WRITE(out_EXECUTE_UNIT_IN_DATA_RB               [dest], PORT_READ(in_READ_UNIT_OUT_DATA_RB               [i]));
    86                     PORT_WRITE(out_EXECUTE_UNIT_IN_DATA_RC               [dest], PORT_READ(in_READ_UNIT_OUT_DATA_RC               [i]));
    87                     PORT_WRITE(out_EXECUTE_UNIT_IN_WRITE_RD              [dest], PORT_READ(in_READ_UNIT_OUT_WRITE_RD              [i]));
    8891                    PORT_WRITE(out_EXECUTE_UNIT_IN_NUM_REG_RD            [dest], PORT_READ(in_READ_UNIT_OUT_NUM_REG_RD            [i]));
    89                     PORT_WRITE(out_EXECUTE_UNIT_IN_WRITE_RE              [dest], PORT_READ(in_READ_UNIT_OUT_WRITE_RE              [i]));
    90                     PORT_WRITE(out_EXECUTE_UNIT_IN_NUM_REG_RE            [dest], PORT_READ(in_READ_UNIT_OUT_NUM_REG_RE            [i]));
    9192                  }
    9293              }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Parameters.h

    r75 r78  
    5050  public : ~Parameters () ;
    5151
    52   public :        std::string  msg_error  (void);
     52  public :        Parameters_test msg_error  (void);
    5353
    5454  public :        std::string   print      (uint32_t depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Parameters_msg_error.cpp

    r75 r78  
    2121#undef  FUNCTION
    2222#define FUNCTION "Register_unit_Glue::msg_error"
    23   std::string Parameters::msg_error(void)
     23  Parameters_test Parameters::msg_error(void)
    2424  {
    2525    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
    2626
    27     std::string msg = "";
    28 
    29     return msg;
     27    Parameters_test test("Register_unit_Glue");
    3028
    3129    log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     30
     31    return test;
    3232  };
    3333
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Parameters.h

    r75 r78  
    7979  public : ~Parameters () ;
    8080
    81   public :        std::string  msg_error  (void);
     81  public :        Parameters_test msg_error  (void);
    8282  public :        std::string   print      (uint32_t depth);
    8383  public : friend std::ostream& operator<< (std::ostream& output_stream,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Register_unit.h

    r75 r78  
    55 * $Id$
    66 *
    7  * [ Description ]
     7 * [ Description ]
    88 *
    99 */
     
    4545#endif
    4646  {
    47     // -----[ fields ]----------------------------------------------------
     47    // -----[ fields ]----------------------------------------------------
    4848    // Parameters
    4949  protected : const std::string       _name;
     
    5959
    6060#ifdef SYSTEMC
    61     // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     61    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    6262    // Interface
    6363  public    : SC_CLOCK                      *  in_CLOCK        ;
    6464  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
    6565
    66     // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     66    // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    6767  public    : SC_IN (Tcontrol_t        )   **  in_GPR_READ_VAL                 ;
    6868  public    : SC_OUT(Tcontrol_t        )   ** out_GPR_READ_ACK                 ;
     
    7272  public    : SC_OUT(Tcontrol_t        )   ** out_GPR_READ_DATA_VAL            ;
    7373
    74     // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     74    // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    7575  public    : SC_IN (Tcontrol_t        )   **  in_GPR_WRITE_VAL                ;
    7676  public    : SC_OUT(Tcontrol_t        )   ** out_GPR_WRITE_ACK                ;
     
    7979  public    : SC_IN (Tgeneral_data_t   )   **  in_GPR_WRITE_DATA               ;
    8080
    81     // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     81    // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8282  public    : SC_IN (Tcontrol_t        )   **  in_SPR_READ_VAL                 ;
    8383  public    : SC_OUT(Tcontrol_t        )   ** out_SPR_READ_ACK                 ;
     
    8787  public    : SC_OUT(Tcontrol_t        )   ** out_SPR_READ_DATA_VAL            ;
    8888
    89     // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     89    // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    9090  public    : SC_IN (Tcontrol_t        )   **  in_SPR_WRITE_VAL                ;
    9191  public    : SC_OUT(Tcontrol_t        )   ** out_SPR_WRITE_ACK                ;
     
    9494  public    : SC_IN (Tspecial_data_t   )   **  in_SPR_WRITE_DATA               ;
    9595   
    96     // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     96    // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    9797  public    : SC_IN (Tcontrol_t        )  ***  in_INSERT_ROB_VAL               ;
    9898  public    : SC_OUT(Tcontrol_t        )  *** out_INSERT_ROB_ACK               ;
     
    102102  public    : SC_IN (Tspecial_address_t)  ***  in_INSERT_ROB_RE_NUM_REG        ;
    103103
    104     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     104    // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    105105  public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_VAL               ;
    106106  public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_ROB_ACK               ;
     
    114114  public    : SC_IN (Tspecial_address_t)  ***  in_RETIRE_ROB_RE_NEW_NUM_REG    ;
    115115
    116     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     116    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    117117  protected : morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile ** component_gpr       ;
    118118  protected : morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile ** component_gpr_status;
     
    121121  protected : morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Register_unit_Glue::Register_unit_Glue      * component_glue      ;
    122122
    123     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     123    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    124124
    125     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     125    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    126126#endif
    127127
    128     // -----[ methods ]---------------------------------------------------
     128    // -----[ methods ]---------------------------------------------------
    129129
    130130#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Parameters_msg_error.cpp

    r75 r78  
    1818#undef  FUNCTION
    1919#define FUNCTION "Register_unit::msg_error"
    20   std::string Parameters::msg_error(void)
     20  Parameters_test Parameters::msg_error(void)
    2121  {
    2222    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
    2323
    24     std::string msg = "";
    25 
    26     return msg;
     24    Parameters_test test("Register_unit");
    2725
    2826    log_printf(FUNC,Register_unit,FUNCTION,"End");
     27
     28    return test;
    2929  };
    3030
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp

    r75 r78  
    240240
    241241            in_RETIRE_ROB_VAL            [i][j] = interface->set_signal_valack_in  (VAL);
    242             out_RETIRE_ROB_ACK            [i][j] = interface->set_signal_valack_out (ACK);
     242           out_RETIRE_ROB_ACK            [i][j] = interface->set_signal_valack_out (ACK);
    243243            in_RETIRE_ROB_RD_OLD_USE     [i][j] = interface->set_signal_in <Tcontrol_t        > ("rd_old_use"    , 1);
    244244            in_RETIRE_ROB_RD_OLD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_old_num_reg", _param->_size_gpr_address);
     
    470470                                   _name+"_glue",
    471471                                   "out_CONST_1");
     472
     473              _component->port_map(_name+"_glue",
     474                                   "out_CONST_1",
     475                                   name_component,
     476                                   "in_WRITE_"+toString(x)+"_DATA" );
     477
     478
    472479              _component->port_map(name_component,
    473480                                   "in_WRITE_"+toString(x++)+"_ADDRESS",
     
    492499                                   "out_CONST_0"
    493500                                   );
     501              _component->port_map( _name+"_glue",
     502                                    "out_CONST_0",
     503                                    name_component,
     504                                   "in_WRITE_"+toString(x)+"_DATA");
    494505
    495506              _component->port_map(name_component,
     
    515526                                   _name+"_glue",
    516527                                   "out_CONST_0");
     528              _component->port_map(_name+"_glue",
     529                                   "out_CONST_0",
     530                                   name_component,
     531                                   "in_WRITE_"+toString(x)+"_DATA" );
    517532
    518533              _component->port_map(name_component,
     
    534549                                   _name+"_glue",
    535550                                   "out_CONST_1"
     551                                   );
     552              _component->port_map(_name+"_glue",
     553                                   "out_CONST_1",
     554                                   name_component,
     555                                   "in_WRITE_"+toString(x)+"_DATA"
    536556                                   );
    537557
     
    651671                                   _name+"_glue",
    652672                                   "out_CONST_1");
     673              _component->port_map(_name+"_glue",
     674                                   "out_CONST_1",
     675                                   name_component,
     676                                   "in_WRITE_"+toString(x)+"_DATA"
     677                                   );
     678
    653679              _component->port_map(name_component,
    654680                                   "in_WRITE_"+toString(x++)+"_ADDRESS",
     
    673699                                   "out_CONST_0"
    674700                                   );
     701              _component->port_map( _name+"_glue",
     702                                    "out_CONST_0",
     703                                   name_component,
     704                                   "in_WRITE_"+toString(x)+"_DATA"
     705                                   );
    675706
    676707              _component->port_map(name_component,
     
    696727                                   _name+"_glue",
    697728                                   "out_CONST_0");
     729              _component->port_map(_name+"_glue",
     730                                   "out_CONST_0",
     731                                   name_component,
     732                                   "in_WRITE_"+toString(x)+"_DATA"
     733                                   );
    698734
    699735              _component->port_map(name_component,
     
    715751                                   _name+"_glue",
    716752                                   "out_CONST_1"
     753                                   );
     754              _component->port_map(_name+"_glue",
     755                                   "out_CONST_1",
     756                                   name_component,
     757                                   "in_WRITE_"+toString(x)+"_DATA"
    717758                                   );
    718759
     
    738779      _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK" );
    739780      _component->port_map(name_component,"in_NRESET", _name, "in_NRESET");
    740       _component->port_map(name_component,"out_CONST_0");
    741       _component->port_map(name_component,"out_CONST_1");
     781//       _component->port_map(name_component,"out_CONST_0",_name,"out_CONST_0");
     782//       _component->port_map(name_component,"out_CONST_1",_name,"out_CONST_1");
    742783
    743784      for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/Makefile.deps

    r72 r78  
    1313include                         $(DIR_MORPHEO)/Behavioural/Makefile.deps
    1414endif
     15ifndef Operation
     16include                         $(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/Makefile.deps
     17endif
     18ifndef Instruction
     19include                         $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/Makefile.deps
     20endif
     21
     22#-----[ Directory ]----------------------------------------
     23
     24Custom_DIR                      =       $(DIR_MORPHEO)/Behavioural/./Custom
    1525
    1626#-----[ Library ]------------------------------------------
    17 Custom_LIBRARY                  =       -lCustom        \
     27
     28Custom_LIBRARY                  =       -lCustom                        \
     29                                        $(Operation_LIBRARY)            \
     30                                        $(Instruction_LIBRARY)          \
    1831                                        $(Behavioural_LIBRARY) 
    1932
    20 Custom_DIR_LIBRARY              =       -L$(DIR_MORPHEO)/Behavioural/./Custom/lib       \
     33Custom_DIR_LIBRARY              =       -L$(Custom_DIR)/lib             \
     34                                        $(Operation_DIR_LIBRARY)        \
     35                                        $(Instruction_DIR_LIBRARY)      \
    2136                                        $(Behavioural_DIR_LIBRARY)
    22 
    23 Custom_DEPENDENCIES             =       Behavioural_library
    24 
    25 Custom_CLEAN                    =       Behavioural_library_clean
    2637
    2738#-----[ Rules ]--------------------------------------------
    2839
    29 #.NOTPARALLEL                   : Custom_library Custom_library_clean
     40Custom_library                  :
     41                                @\
     42                                $(MAKE) Behavioural_library;            \
     43                                $(MAKE) Instruction_library;            \
     44                                $(MAKE) Operation_library;              \
     45                                $(MAKE) --directory=$(Custom_DIR) --makefile=Makefile;
    3046
    31 Custom_library                  : $(Custom_DEPENDENCIES)
     47
     48Custom_library_clean            :
    3249                                @\
    33                                 $(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/./Custom --makefile=Makefile;
    34 
    35 Custom_library_clean            : $(Custom_CLEAN)
    36                                 @\
    37                                 $(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/./Custom --makefile=Makefile clean;
     50                                $(MAKE) Behavioural_library_clean;      \
     51                                $(MAKE) Instruction_library_clean;      \
     52                                $(MAKE) Operation_library_clean;        \
     53                                $(MAKE) --directory=$(Custom_DIR) --makefile=Makefile clean;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/include/Custom.h

    r72 r78  
    1515#include "Behavioural/include/Usage.h"
    1616#include "Behavioural/include/Constants.h"
    17 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Types.h"
    18 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Operation.h"
     17#include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/include/Types.h"
     18#include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/include/Instruction.h"
     19#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Types.h"
     20#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Operation.h"
    1921
    2022namespace morpheo {
     
    2325
    2426  // TODO get_custom_vhdl
    25   // TODO : complete the custom_decod_t type
    26   typedef uint32_t custom_decod_t;
     27  typedef uint32_t custom_vhdl_t;
     28
     29  typedef morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::function_decod_t custom_decod_t;
    2730
    2831  typedef morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::function_execute_t           custom_execute_genMoore_t;
     
    3437  typedef struct
    3538  {
    36     bool                          (*_get_valid_group)              (uint32_t);
    37     uint32_t                      (*_get_nb_register)              (uint32_t);
    38     access_mode_t                 (*_get_access_mode)              (uint32_t, uint32_t);
    39     custom_decod_t              * (*_get_custom_decod)              (uint32_t);
    40     custom_execute_genMoore_t   * (*_get_custom_execute_genMoore)   (uint32_t);
     39    bool                          (*_get_valid_group              ) (uint32_t);
     40    uint32_t                      (*_get_nb_register              ) (uint32_t);
     41    access_mode_t                 (*_get_access_mode              ) (uint32_t, uint32_t);
     42    custom_decod_t              * (*_get_custom_decod             ) (Toperation_t);
     43    custom_execute_genMoore_t   * (*_get_custom_execute_genMoore  ) (Toperation_t);
    4144    custom_execute_transition_t * (*_get_custom_execute_transition) (uint32_t);
    42     custom_execute_transition_t * (*_get_custom_execute_reset)      (uint32_t);
     45    custom_execute_transition_t * (*_get_custom_execute_reset     ) (uint32_t);
     46    custom_vhdl_t               * (*_get_vhdl_decod               ) (void);
     47    custom_vhdl_t               * (*_get_vhdl_execute             ) (void);
    4348  } custom_information_t;
    4449
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/include/Custom_default.h

    r72 r78  
    2323  custom_execute_transition_t * default_get_custom_execute_transition (uint32_t     group);
    2424  custom_execute_transition_t * default_get_custom_execute_reset      (uint32_t     group);
     25  custom_vhdl_t               * default_get_vhdl_decod                (void);
     26  custom_vhdl_t               * default_get_vhdl_execute              (void);
     27 
    2528  custom_information_t          default_get_custom_information        (uint32_t     context);
    2629
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/include/Custom_example.h

    r72 r78  
    2323  custom_execute_transition_t * example_get_custom_execute_transition (uint32_t     group);
    2424  custom_execute_transition_t * example_get_custom_execute_reset      (uint32_t     group);
     25  custom_vhdl_t               * example_get_vhdl_decod                (void);
     26  custom_vhdl_t               * example_get_vhdl_execute              (void);
     27
    2528  custom_information_t          example_get_custom_information        (uint32_t     context);
    2629
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/src/Custom_default.cpp

    r72 r78  
    120120      }
    121121
    122     return NULL; // unimplemented function
     122    return &(morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::instruction_illegal); // unimplemented function
    123123  }
    124124
     
    208208
    209209#undef  FUNCTION
     210#define FUNCTION "custom::default_get_vhdl_decod"
     211  custom_vhdl_t * default_get_vhdl_decod (void)
     212  {
     213    return NULL; // unimplemented function
     214  }
     215
     216#undef  FUNCTION
     217#define FUNCTION "custom::default_get_vhdl_execute"
     218  custom_vhdl_t * default_get_vhdl_execute (void)
     219  {
     220    return NULL; // unimplemented function
     221  }
     222
     223#undef  FUNCTION
    210224#define FUNCTION "custom::default_get_custom_information"
    211225  custom_information_t default_get_custom_information (uint32_t context)
     
    220234    info._get_custom_execute_transition = &morpheo::behavioural::custom::default_get_custom_execute_transition;
    221235    info._get_custom_execute_reset      = &morpheo::behavioural::custom::default_get_custom_execute_reset     ;
     236    info._get_vhdl_decod                = &morpheo::behavioural::custom::default_get_vhdl_decod               ;
     237    info._get_vhdl_execute              = &morpheo::behavioural::custom::default_get_vhdl_execute             ;
    222238    return info;
    223239  }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/src/Custom_example.cpp

    r72 r78  
    147147      }
    148148
    149     return NULL; // unimplemented function
    150 
     149    return &(morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::instruction_illegal); // unimplemented function
    151150  }
    152151
     
    251250
    252251#undef  FUNCTION
     252#define FUNCTION "custom::example_get_vhdl_decod"
     253  custom_vhdl_t * example_get_vhdl_decod (void)
     254  {
     255    return NULL; // unimplemented function
     256  }
     257
     258#undef  FUNCTION
     259#define FUNCTION "custom::example_get_vhdl_execute"
     260  custom_vhdl_t * example_get_vhdl_execute (void)
     261  {
     262    return NULL; // unimplemented function
     263  }
     264
     265#undef  FUNCTION
    253266#define FUNCTION "custom::example_get_custom_information"
    254267  custom_information_t example_get_custom_information (uint32_t context)
     
    265278    info._get_custom_execute_transition = &morpheo::behavioural::custom::example_get_custom_execute_transition;
    266279    info._get_custom_execute_reset      = &morpheo::behavioural::custom::example_get_custom_execute_reset     ;
     280    info._get_vhdl_decod                = &morpheo::behavioural::custom::example_get_vhdl_decod               ;
     281    info._get_vhdl_execute              = &morpheo::behavioural::custom::example_get_vhdl_execute             ;
    267282    return info;
    268283  }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/include/Parameters.h

    r75 r78  
    3232  public : ~Parameters () ;
    3333
    34   public :        std::string  msg_error  (void);
     34  public :        Parameters_test msg_error  (void);
    3535
    3636  public :        std::string   print      (uint32_t depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Parameters_msg_error.cpp

    r75 r78  
    1717#undef  FUNCTION
    1818#define FUNCTION "Queue::msg_error"
    19   std::string Parameters::msg_error(void)
     19  Parameters_test Parameters::msg_error(void)
    2020  {
    2121    log_printf(FUNC,Queue,FUNCTION,"Begin");
    2222
    23     std::string msg = "";
    24 
    25     return msg;
     23    Parameters_test test("Queue");
    2624
    2725    log_printf(FUNC,Queue,FUNCTION,"End");
     26
     27    return test;
    2828  };
    2929
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp

    r71 r78  
    77 */
    88
    9 #define NB_ITERATION 1
     9#define NB_ITERATION 16
    1010
    1111#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/include/test.h"
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h

    r75 r78  
    3737  public : ~Parameters () ;
    3838
    39   public :        std::string  msg_error  (void);
     39  public :        Parameters_test msg_error  (void);
    4040  public :        std::string   print      (uint32_t depth);
    4141  public : friend std::ostream& operator<< (std::ostream& output_stream,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h

    r75 r78  
    5252  private   : counter_t                      * _stat_nb_read;
    5353  private   : counter_t                      * _stat_nb_write;
    54   private   : counter_t                      * _stat_average_read ;
    55   private   : counter_t                      * _stat_average_write;
    56   private   : counter_t                      * _stat_percent_use_read ;
    57   private   : counter_t                      * _stat_percent_use_write;
    5854#endif
    5955
     
    8884
    8985    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    90   private   : SC_REGISTER (Tdata_t)        ** reg_DATA         ;
     86  private   : Tdata_t * reg_DATA;
    9187
    9288    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/Parameters_msg_error.cpp

    r75 r78  
    1717namespace registerfile_monolithic    {
    1818
    19   std::string Parameters::msg_error(void)
     19  Parameters_test Parameters::msg_error(void)
    2020  {
    21     std::string msg = "";
     21    Parameters_test test("RegisterFile_Monolithic");
    2222
    2323    if ((8*sizeof(Tdata_t)) < _size_word)
    24       {
    25         msg += "  - type \"Tdata_t\" is too little to the size defined by size_word\n";
    26         msg += "    * size_word                       : " + toString(_size_word) + "\n";
    27         msg += "    * Tdata_t                   (bits): " + toString(8*(sizeof(Tdata_t))) + "\n";
    28       }
     24      test.error("Type \"Tdata_t\" is too little to the size defined by size_word");
    2925
    3026    if ((8*sizeof(Taddress_t)) < log2(_nb_word))
    31       {
    32         msg += "  - type \"Taddress_t\" is too little to the size defined by nb_word\n";
    33         msg += "    * nb_word                         : " + toString(_nb_word)    + "\n";
    34         msg += "      > size                   (bits) : " + toString(log2(_nb_word)) + "\n";
    35         msg += "    * Taddress_t               (bits) : " + toString(8*(sizeof(Taddress_t))) + "\n";
    36       }
     27      test.error("type \"Taddress_t\" is too little to the size defined by nb_word");
    3728
    3829    if ((_nb_port_read + _nb_port_read_write) < 1)
    39       {
    40         msg += "  - you need a read port\n";
    41         msg += "    * nb_port_read                    : " + toString(_nb_port_read)       + "\n";
    42         msg += "    * nb_port_read_write              : " + toString(_nb_port_read_write) + "\n";
    43       }
     30      test.error("you need a read port");
    4431
    4532    if ((_nb_port_write + _nb_port_read_write) < 1)
    46       {
    47         msg += "  - you need a write port\n";
    48         msg += "    * nb_port_write                   : " + toString(_nb_port_write)      + "\n";
    49         msg += "    * nb_port_read_write              : " + toString(_nb_port_read_write) + "\n";
    50       }
    51 //     if (_nb_word < 2)
    52 //       {
    53 //         msg += "  - nb_word must be >= 2\n";
    54 //         msg += "    * nb_word                         : " + toString(_nb_word)    + "\n";
    55 //       }
     33      test.error("you need a write port");
    5634
    57     return msg;
     35    return test;
    5836  };
    5937
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_allocation.cpp

    r75 r78  
    120120
    121121    // ----- Register
    122     reg_DATA = new SC_REGISTER (Tdata_t) * [_param->_nb_word];
     122    reg_DATA = new Tdata_t [_param->_nb_word];
    123123   
    124     for (uint32_t i=0; i<_param->_nb_word; i++)
    125       {
    126         std::string rename = "reg_DATA["  + toString(i) + "]";
    127         reg_DATA [i]  = new SC_REGISTER (Tdata_t) (rename.c_str());
    128       }
    129 
    130124#ifdef POSITION
    131125    _component->generate_file();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_genMealy_read.cpp

    r71 r78  
    2929            else
    3030              address = 0;
    31             Tdata_t    data    = REGISTER_READ(reg_DATA[address]);
     31            Tdata_t    data    = reg_DATA[address];
    3232
    3333            log_printf(TRACE,RegisterFile,"genMealy_read","[%d] -> %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));
    3434
    35 #ifdef STATISTICS
    36             (*_stat_nb_read) ++;
    37 #endif   
    3835            // Write in registerFile
    3936            PORT_WRITE(out_READ_DATA[i],data);
     
    6158              address = 0;
    6259           
    63             data = REGISTER_READ(reg_DATA[address]);
     60            data = reg_DATA[address];
    6461
    6562            log_printf(TRACE,RegisterFile,"genMealy_read","[%d] -> %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_statistics_declaration.cpp

    r75 r78  
    2323    _stat_nb_read           = _stat->create_variable("nb_read" );
    2424    _stat_nb_write          = _stat->create_variable("nb_write");
    25    
    26     _stat_average_read      = _stat->create_counter("average_read" , "", "Average read by cycle");
    27     _stat_average_write     = _stat->create_counter("average_write", "", "Average write by cycle");
    2825
    29     _stat_percent_use_read  = _stat->create_counter("percent_use_read" , "%", "Read port usage");
    30     _stat_percent_use_write = _stat->create_counter("percent_use_write", "%", "Write port usage");
     26    _stat->create_expr_average_by_cycle("average_read" , "nb_read" , "", "Average read by cycle" );
     27    _stat->create_expr_average_by_cycle("average_write", "nb_write", "", "Average write by cycle");
    3128
    32     _stat->create_expr("average_read" , "/ nb_read  cycle", false);
    33     _stat->create_expr("average_write", "/ nb_write cycle", false);
    34 
    35     _stat->create_expr("percent_use_read" , "/ * average_read  100 " + toString(_param->_nb_port_read +_param->_nb_port_read_write), false);
    36     _stat->create_expr("percent_use_write", "/ * average_write 100 " + toString(_param->_nb_port_write+_param->_nb_port_read_write), false);
     29    _stat->create_expr_percent         ("percent_use_read" , "average_read" , toString(_param->_nb_port_read +_param->_nb_port_read_write), "Percent read by cycle" );
     30    _stat->create_expr_percent         ("percent_use_write", "average_write", toString(_param->_nb_port_write+_param->_nb_port_read_write), "Percent write by cycle");
    3731
    3832  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp

    r75 r78  
    3838
    3939            // Write in registerFile
    40             REGISTER_WRITE(reg_DATA[address],data);
     40            reg_DATA[address] = data;
    4141          }
    4242      }
     
    6262               
    6363                // Write in registerFile
    64                 REGISTER_WRITE(reg_DATA[address],data);
     64                reg_DATA[address] = data;
    6565              }
    6666#ifdef STATISTICS
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h

    r75 r78  
    6464  public : ~Parameters () ;
    6565
    66   public :        std::string  msg_error  (void);
     66  public :        Parameters_test msg_error  (void);
    6767  public :        std::string   print      (uint32_t depth);
    6868  public : friend std::ostream& operator<< (std::ostream& output_stream,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h

    r75 r78  
    7373
    7474    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    75   private   : SC_REGISTER (Tdata_t)       *** reg_DATA         ;
     75  private   : Tdata_t ** reg_DATA;
    7676
    7777    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/Parameters_msg_error.cpp

    r75 r78  
    1515
    1616
    17   std::string Parameters::msg_error(void)
     17  Parameters_test Parameters::msg_error(void)
    1818  {
    1919    log_printf(FUNC,RegisterFile_Multi_Banked,"msg_error","Begin");
    2020
    21     std::string msg = "";
     21    Parameters_test test("RegisterFile_Multi_Banked");
    2222
    2323    if (_nb_port_read < _nb_port_read_by_bank)
    24       {
    25         msg += "  - Each bank read's port must be higher at number of read port\n";
    26         msg += "    * nb_port_read                    : " + toString(_nb_port_read        ) + "\n";
    27         msg += "    * nb_port_read_by_bank            : " + toString(_nb_port_read_by_bank) + "\n";
    28       }
     24      test.error("Each bank read's port must be higher at number of read port");
    2925
    3026    if (_nb_port_write < _nb_port_write_by_bank)
    31       {
    32         msg += "  - Each bank write's port must be higher at number of write port\n";
    33         msg += "    * nb_port_write                   : " + toString(_nb_port_write        ) + "\n";
    34         msg += "    * nb_port_write_by_bank           : " + toString(_nb_port_write_by_bank) + "\n";
    35       }
     27      test.error("Each bank write's port must be higher at number of write port");
    3628   
    3729    if (_nb_bank < 1)
    38       {
    39         msg += "  - nb_bank must be higher at 1\n";
    40         msg += "    * nb_bank                         : " + toString(_nb_bank             ) + "\n";
    41       }
    42 
    43     return msg;
     30      test.error("nb_bank must be higher at 1");
    4431
    4532    log_printf(FUNC,RegisterFile_Multi_Banked,"msg_error","End");
     33
     34    return test;
    4635  };
    4736
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_allocation.cpp

    r75 r78  
    9696    // ~~~~~[ Registers ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    9797
    98     reg_DATA = new SC_REGISTER (Tdata_t) ** [_param->_nb_bank];
     98    reg_DATA = new Tdata_t * [_param->_nb_bank];
    9999
    100100    for (uint32_t i=0; i<_param->_nb_bank; i++)
    101101      {
    102         reg_DATA [i] = new SC_REGISTER (Tdata_t) * [_param->_nb_word];
    103        
    104         for (uint32_t j=0; j<_param->_nb_word; j++)
    105           {
    106             std::string rename = "reg_DATA_"  + toString(i) + "_"  + toString(j);
    107             reg_DATA [i][j]  = new SC_REGISTER (Tdata_t) (rename.c_str());
    108           }
     102        reg_DATA [i] = new Tdata_t [_param->_nb_word];
    109103      }
    110104
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_full_crossbar_genMealy_read.cpp

    r62 r78  
    6262                    log_printf(TRACE,RegisterFile_Multi_Banked,"full_crossbar_genMealy_read"," * bank_port : %d",j);
    6363
    64                     Tdata_t    data    = REGISTER_READ(reg_DATA[bank][num_reg]);
     64                    Tdata_t    data    = reg_DATA[bank][num_reg];
    6565                   
    6666                    log_printf(TRACE,RegisterFile_Multi_Banked,"full_crossbar_genMealy_read"," * data      : %d",data);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_partial_crossbar_genMealy_read.cpp

    r62 r78  
    6464                    log_printf(TRACE,RegisterFile_Multi_Banked,"full_crossbar_genMealy_read"," * bank_port : %d",j);
    6565
    66                     Tdata_t    data    = REGISTER_READ(reg_DATA[bank][num_reg]);
     66                    Tdata_t    data    = reg_DATA[bank][num_reg];
    6767                   
    6868                    log_printf(TRACE,RegisterFile_Multi_Banked,"full_crossbar_genMealy_read"," * data      : %d",data);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_transition.cpp

    r75 r78  
    3131           
    3232            // Write in registerFile
    33             REGISTER_WRITE(reg_DATA[internal_WRITE_BANK[i]][internal_WRITE_NUM_REG[i]],data);
     33            reg_DATA[internal_WRITE_BANK[i]][internal_WRITE_NUM_REG[i]] = data;
    3434          }
    3535      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/Parameters.h

    r75 r78  
    4343  public : ~Parameters () ;
    4444
    45   public :        std::string   msg_error  (void);
     45  public :        Parameters_test  msg_error  (void);
    4646  public :        std::string   print      (uint32_t depth);
    4747  public : friend std::ostream& operator<< (std::ostream& output_stream,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/RegisterFile.h

    r75 r78  
    55 * $Id$
    66 *
    7  * [ Description ]
     7 * [ Description ]
    88 *
    99 */
     
    4141#endif
    4242  {
    43     // -----[ fields ]----------------------------------------------------
     43    // -----[ fields ]----------------------------------------------------
    4444    // Parameters
    4545  protected : const std::string       _name;
     
    5454
    5555#ifdef SYSTEMC
    56     // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     56    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5757    // Interface
    5858  public    : SC_CLOCK                      *  in_CLOCK        ;
     
    7373#endif
    7474
    75     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     75    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    7676  protected : morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::RegisterFile_Monolithic  ::RegisterFile_Monolithic   * component_RegisterFile_Monolithic  ;
    7777  protected : morpheo::behavioural::generic::registerfile::registerfile_multi_banked::RegisterFile_Multi_Banked::RegisterFile_Multi_Banked * component_RegisterFile_Multi_Banked;
    7878
    79     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     79    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    8080
    81     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     81    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8282
    83     // -----[ methods ]---------------------------------------------------
     83    // -----[ methods ]---------------------------------------------------
    8484
    8585#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/Parameters_msg_error.cpp

    r75 r78  
    1616
    1717
    18   std::string Parameters::msg_error(void)
     18  Parameters_test Parameters::msg_error(void)
    1919  {
    20     log_printf(FUNC,RegisterFile,"msg_error","Begin");
    21 
    2220    if (_instance == instance_RegisterFile_Monolithic)
    2321      return _param_registerfile_monolithic  ->msg_error();
    2422    else
    2523      return _param_registerfile_multi_banked->msg_error();
    26    
    27     log_printf(FUNC,RegisterFile,"msg_error","End");
    2824  };
    2925
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Parameters.h

    r75 r78  
    3434  public : ~Parameters () ;
    3535
    36   public :        std::string  msg_error  (void);
     36  public :        Parameters_test msg_error  (void);
    3737  public :        std::string   print      (uint32_t depth);
    3838  public : friend std::ostream& operator<< (std::ostream& output_stream,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Parameters_msg_error.cpp

    r75 r78  
    1717
    1818
    19   std::string Parameters::msg_error(void)
     19  Parameters_test Parameters::msg_error(void)
    2020  {
    2121    log_printf(FUNC,Select_Priority_Fixed,"msg_error","Begin");
    2222
    23     std::string msg = "";
     23    Parameters_test test ("Select_Priority_Fixed");
    2424
    2525    if ((_encoding_one_hot or _encoding_compact) == false)
    26       {
    27         msg += "  - you must select a less one encoding\n";
    28         msg += "    * encoding_one_hot                : " + toString(_encoding_one_hot) + "\n";
    29         msg += "    * encoding_compact                : " + toString(_encoding_compact) + "\n";
    30       }
     26      test.error("you must select a less one encoding");
    3127
    3228    log_printf(FUNC,Select_Priority_Fixed,"msg_error","End");
    3329
    34     return msg;
     30    return test;
    3531  };
    3632
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/TODO

    r10 r78  
    11- Ajouter quelques algorithme de selection
     2  * Random
     3    -> LFSR (?) qui ne tourne pas à chaque cycle mais à chaque in_access_val = '1'
    24  * Round Robin
    35    -> simple compteur de log2(N) bits
     6  * Not Last Used
     7    -> idem random mais : sauvegarde le dernier élément accéder. Si rand = last_elt, alors on renvoye not rand
    48  * True LRU
    59    -> fifo matériel. Un élément accéder sera placer en fin de fifo.
    6   * Random
    7     -> LFSR (?) qui ne tourne pas à chaque cycle mais à chaque in_access_val = '1'
     10  * fifo
     11    idem true LRU mais aucun evenement lors de l'accès
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/configuration.cfg

    r42 r78  
    11Victim_Pseudo_LRU
    2 4       16      *2      # nb_entity
    3 1       4       *2      # nb_access
    4 1       4       *2      # nb_update
    5 1       16      *2      # size_table
     24       16      *4      # nb_entity
     31       4       *4      # nb_access             # 1     4       *4      # nb_update
     41       16      *4      # size_table
     50       1       +1      # table_global
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/main.cpp

    r15 r78  
    1414  cerr << "<Usage> " << exec << " name_instance list_params" << endl
    1515       << "list_params is :" << endl
    16        << " - nb_entity  (unsigned int)" << endl
    17        << " - nb_access  (unsigned int)" << endl
    18        << " - nb_update  (unsigned int)" << endl
    19        << " - size_table (unsigned int)" << endl;
     16       << " - nb_entity     (unsigned int)" << endl
     17       << " - nb_access     (unsigned int)" << endl
     18//        << " - nb_update     (unsigned int)" << endl
     19       << " - size_table    (unsigned int)" << endl
     20       << " - table_global  (bool        )" << endl;
    2021  exit (1);
    2122}
     
    3031    usage (argv[0]);
    3132
    32   const string   name       = argv[1];
    33   const uint32_t nb_entity  = atoi(argv[2]);
    34   const uint32_t nb_access  = atoi(argv[3]);
    35   const uint32_t nb_update  = atoi(argv[4]);
    36   const uint32_t size_table = atoi(argv[5]);
    37  
    38   morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters param (nb_entity ,
    39                                                                        nb_access ,
    40                                                                        nb_update ,
    41                                                                        size_table);
     33  const string   name         = argv[1];
     34  const uint32_t nb_entity    = atoi(argv[2]);
     35  const uint32_t nb_access    = atoi(argv[3]);
     36//   const uint32_t nb_update    = atoi(argv[4]);
     37  const uint32_t size_table   = atoi(argv[4]);
     38  const bool     table_global = atoi(argv[5]); 
     39  morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters param
     40    (nb_entity ,
     41     nb_access ,
     42//      nb_update ,
     43     size_table,
     44     table_global);
    4245
    4346  test (name,param);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/test.cpp

    r75 r78  
    1515  cout << "<" << name << "> : Simulation SystemC" << endl;
    1616
    17   if (param._nb_update < 1)
    18     {
    19       cerr << "<" << name << "> : To test, need a less one update's port" << endl;
    20       exit (EXIT_FAILURE);
    21     }
    22  
    2317  try
    2418    {
     
    4539                                                                  param_stat,
    4640#endif
    47                                                                   param);
     41                                                                  &param);
    4842 
    4943#ifdef SYSTEMC
     
    5751  sc_signal<Tcontrol_t>                    ACCESS_ACK     [param._nb_access];
    5852  sc_signal<Taddress_t>                    ACCESS_ADDRESS [param._nb_access];
     53  sc_signal<Tcontrol_t>                    ACCESS_HIT     [param._nb_access];
    5954  sc_signal<Tentity_t >                    ACCESS_ENTITY  [param._nb_access];
    60  
    61   sc_signal<Tcontrol_t>                    UPDATE_VAL     [param._nb_update];
    62   sc_signal<Tcontrol_t>                    UPDATE_ACK     [param._nb_update];
    63   sc_signal<Taddress_t>                    UPDATE_ADDRESS [param._nb_update];
    64   sc_signal<Tentity_t >                    UPDATE_ENTITY  [param._nb_update];
     55  sc_signal<Tentity_t >                    ACCESS_VICTIM  [param._nb_access];
    6556 
    6657  /********************************************************
     
    7768        (*(_Victim_Pseudo_LRU-> in_ACCESS_VAL     [i])) (ACCESS_VAL     [i]);
    7869        (*(_Victim_Pseudo_LRU->out_ACCESS_ACK     [i])) (ACCESS_ACK     [i]);
    79         if (param._size_table>1)
     70        if (param._size_address>1)
    8071        (*(_Victim_Pseudo_LRU-> in_ACCESS_ADDRESS [i])) (ACCESS_ADDRESS [i]);
    81         (*(_Victim_Pseudo_LRU->out_ACCESS_ENTITY  [i])) (ACCESS_ENTITY  [i]);
     72        (*(_Victim_Pseudo_LRU-> in_ACCESS_HIT     [i])) (ACCESS_HIT     [i]);
     73        (*(_Victim_Pseudo_LRU-> in_ACCESS_ENTITY  [i])) (ACCESS_ENTITY  [i]);
     74        (*(_Victim_Pseudo_LRU->out_ACCESS_VICTIM  [i])) (ACCESS_VICTIM  [i]);
    8275      }
    8376
    84     for (uint32_t i=0; i<param._nb_update; i++)
    85       {
    86         (*(_Victim_Pseudo_LRU-> in_UPDATE_VAL     [i])) (UPDATE_VAL     [i]);
    87         (*(_Victim_Pseudo_LRU->out_UPDATE_ACK     [i])) (UPDATE_ACK     [i]);
    88         if (param._size_table>1)
    89         (*(_Victim_Pseudo_LRU-> in_UPDATE_ADDRESS [i])) (UPDATE_ADDRESS [i]);
    90         (*(_Victim_Pseudo_LRU-> in_UPDATE_ENTITY  [i])) (UPDATE_ENTITY  [i]);
    91       }
    9277  /********************************************************
    9378   * Simulation - Begin
     
    10590      ACCESS_VAL[i].write(0);
    10691    }
    107   for (uint32_t i=0; i<param._nb_update; i++)
    108     {
    109       UPDATE_VAL[i].write(0);
    110     }
    11192
    11293  sc_start(5);
    11394  cout << "-----[ Test Update ]------------------------------" << endl;
    114   for (uint32_t i=0; i<param._nb_update; i++)
    115     {
    116       UPDATE_VAL[i].write(1);
    117     }
    118  
    119   for (uint32_t j=0; j<param._size_table; j+=param._nb_update)
     95  for (uint32_t i=0; i<param._nb_access; i++)
     96    {
     97      ACCESS_VAL[i].write(1);
     98      ACCESS_HIT[i].write(1);
     99    }
     100 
     101  for (uint32_t j=0; j<param._size_table; j+=param._nb_access)
    120102    for (uint32_t k=0; k<param._nb_entity; k++)
    121103      {
    122104        cout << "time : " << static_cast<uint32_t>(sc_simulation_time()) << endl;
    123         for (uint32_t i=0; i<param._nb_update; i++)
     105        for (uint32_t i=0; i<param._nb_access; i++)
    124106          {
    125107           
     
    131113              addr = 0;
    132114            Tentity_t  entity  = (k+1)%param._nb_entity;
    133             UPDATE_VAL     [i].write(val );
    134             if (param._size_table>1)
    135               UPDATE_ADDRESS [i].write(addr);
    136             UPDATE_ENTITY  [i].write(entity);
     115            ACCESS_VAL     [i].write(val );
     116            if (param._size_address>1)
     117              ACCESS_ADDRESS [i].write(addr);
     118            ACCESS_ENTITY  [i].write(entity);
    137119           
    138120            sc_start(0);
    139             cout << "\t[" << i << "] " << val << " - " << UPDATE_ACK[i].read() << " addr : " << addr << " -> " << entity << endl;
     121            cout << "\t[" << i << "] " << val << " - " << ACCESS_ACK[i].read() << " addr : " << addr << " -> " << entity << endl;
    140122          }
    141123        sc_start(1);
     
    143125                   
    144126
    145   for (uint32_t i=0; i<param._nb_update; i++)
    146     {
    147       UPDATE_VAL[i].write(0);
     127  for (uint32_t i=0; i<param._nb_access; i++)
     128    {
     129      ACCESS_VAL[i].write(0);
    148130    }
    149131
     
    151133
    152134  cout << "-----[ Test Access ]------------------------------" << endl;
     135
     136  for (uint32_t i=0; i<param._nb_access; i++)
     137    {
     138      ACCESS_HIT[i].write(0);
     139    }
    153140 
    154141 
     
    171158                addr = 0;
    172159              ACCESS_VAL     [i].write(val );
    173               if (param._size_table>1)
     160              if (param._size_address>1)
    174161                ACCESS_ADDRESS [i].write(addr);
    175162             
    176163              sc_start(0);
    177164             
    178               Tentity_t  entity  = ACCESS_ENTITY [i].read();
     165              Tentity_t  entity  = ACCESS_VICTIM [i].read();
    179166             
    180167              cout << "\t[" << i << "] " << val << " - " << ACCESS_ACK[i].read() << " addr : " << addr << " -> " << entity << endl;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Parameters.h

    r75 r78  
    2424  public : const uint32_t _nb_entity ; // number of entity
    2525  public : const uint32_t _nb_access ; // number of port to select an entity
    26   public : const uint32_t _nb_update ; // number of port to update the internal entity
     26//public : const uint32_t _nb_update ; // number of port to update the internal entity
    2727  public : const uint32_t _size_table; // Size of victim_pseudo_lru's table
     28  public : const bool     _table_global;
     29  public : const uint32_t _size_address;
    2830
    2931    //-----[ methods ]-----------------------------------------------------------
    3032  public : Parameters  (uint32_t nb_entity ,
    3133                        uint32_t nb_access ,
    32                         uint32_t nb_update ,
    33                         uint32_t size_table);
     34//                      uint32_t nb_update ,
     35                        uint32_t size_table,
     36                        bool     table_global);
    3437  public : Parameters  (Parameters & param) ;
    3538  public : ~Parameters () ;
    3639
    37   public :        std::string  msg_error  (void);
    38   public :        std::string   print      (uint32_t depth);
    39   public : friend std::ostream& operator<< (std::ostream& output_stream,
    40                                             morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters & x);
     40  public :        Parameters_test msg_error  (void);
     41  public :        std::string     print      (uint32_t depth);
     42  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     43                                              morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters & x);
    4144  };
    4245
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Types.h

    r75 r78  
    99 */
    1010
    11 #include "Behavioural/include/Types.h"
     11#include "Behavioural/Generic/Victim/include/Types.h"
    1212
    1313namespace morpheo {
     
    1717namespace victim_pseudo_lru {
    1818
    19   typedef uint32_t Taddress_t;
    20   typedef uint32_t Tentity_t;
     19  class entry_t
     20  {
     21    // Numerotation of victim_pseudo_lru's tree
     22    // Tree of Pseudo-LRU
     23    //
     24    // | d2              [3]                 |
     25    // |          0_______|_______1          |
     26    // |          |               |          |
     27    // | d1      [1]             [5]         |
     28    // |      0___|___1       0___|___1      |
     29    // |      |       |       |       |      |
     30    // | d0  [0]     [2]     [4]     [6]     |
     31    // |    0_|_1   0_|_1   0_|_1   0_|_1    |
     32    // |    |   |   |   |   |   |   |   |    |
     33    // |   Way Way Way Way Way Way Way Way   |
     34    // |    0   1   2   3   4   5   6   7    |
     35    //
     36    // Access :  Way N with N=2*n   -> bit 2*n = 0
     37    //                 with N=2*n+1 -> bit 2*n = 1
     38    //
     39    // if bit = B, depth = D, next_B = B+D if B==1
     40    //                               = B-D if B==0
     41    //
     42    // Update :
     43
     44  private : bool    * _entry;
     45  private : uint32_t  _size;
     46   
     47  public  : entry_t ()
     48    {
     49    };
     50  public  : entry_t (uint32_t size) : _size (size)
     51    {
     52      _entry = new bool [size];
     53     
     54      // initialisation
     55      for (uint32_t i=0; i<size; i++)
     56        _entry [i] = false;
     57    }
     58   
     59  public : ~entry_t ()
     60    {
     61      delete _entry;
     62    }
     63   
     64  private : uint32_t one_access (uint32_t index, uint32_t offset)
     65    {
     66      bool val = _entry[index];
     67     
     68      // Compute next slot
     69      if (val == true)
     70        return index + offset;
     71      else
     72        return index - offset;
     73    }
     74
     75  public : uint32_t access ()
     76    {
     77      uint32_t index = (_size>>1)-1; // middle
     78
     79      for (int32_t i=static_cast<uint32_t>(log2(_size)-1); i>= 1; i--)
     80        {
     81          index = one_access (index,(1<<(i-1)));
     82        }
     83      index = one_access (index,0);
     84     
     85      // reverse by one_access make always a reverse
     86      uint32_t offset = (_entry[index]==true)?1:0;
     87
     88      return index+offset;
     89    }
     90
     91  private : uint32_t one_update (uint32_t index, uint32_t offset, uint32_t value)
     92    {
     93      uint32_t mask = (offset==0)?1:(offset<<1);
     94      bool     val  = ((value & mask) != 0);
     95
     96      // reverse
     97      _entry[index] = not val;
     98
     99      if (val == true)
     100      // Compute next slot
     101        return index + offset;
     102      else
     103        return index - offset;
     104    }
     105  public : void update (uint32_t value)
     106    {
     107      uint32_t index = (_size>>1)-1; // middle
     108
     109      for (int32_t i=static_cast<uint32_t>(log2(_size)-1); i>=1; i--)
     110        {
     111          index = one_update (index,1<<(i-1),value);
     112        }
     113      index = one_update (index,0,value);
     114    }
     115
     116  public : std::string print ()
     117    {
     118      std::string res = "";
     119
     120      for (int32_t i=static_cast<int32_t>(_size)-1; i>=0; i--)
     121        res += toString(_entry[i]) + " ";
     122
     123      return res;
     124    }
     125  };
    21126
    22127}; // end namespace victim_pseudo_lru
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h

    r75 r78  
    55 * $Id$
    66 *
    7  * [ Description ]
     7 * [ Description ]
    88 *
    99 */
     
    5353#endif
    5454  {
    55     // -----[ internal class ]--------------------------------------------
    56   protected : class entry_t
    57   {
    58     // Numerotation of victim_pseudo_lru's tree
    59     // Tree of Pseudo-LRU
    60     //
    61     // | d2              [3]                 |
    62     // |          0_______|_______1          |
    63     // |          |               |          |
    64     // | d1      [1]             [5]         |
    65     // |      0___|___1       0___|___1      |
    66     // |      |       |       |       |      |
    67     // | d0  [0]     [2]     [4]     [6]     |
    68     // |    0_|_1   0_|_1   0_|_1   0_|_1    |
    69     // |    |   |   |   |   |   |   |   |    |
    70     // |   Way Way Way Way Way Way Way Way   |
    71     // |    0   1   2   3   4   5   6   7    |
    72     //
    73     // Access :  Way N with N=2*n   -> bit 2*n = 0
    74     //                 with N=2*n+1 -> bit 2*n = 1
    75     //
    76     // if bit = B, depth = D, next_B = B+D if B==1
    77     //                               = B-D if B==0
    78     //
    79     // Update :
     55    // -----[ fields ]----------------------------------------------------
     56    // Parameters
     57  protected : const std::string   _name;
    8058
    81   private : bool    * _entry;
    82   private : uint32_t  _size;
    83 
    84   public  : entry_t ()
    85     {
    86     };
    87   public  : entry_t (uint32_t size) : _size (size)
    88     {
    89       _entry = new bool [size];
    90      
    91       // initialisation
    92       for (uint32_t i=0; i<size; i++)
    93         _entry [i] = false;
    94     }
    95    
    96   public : ~entry_t ()
    97     {
    98       delete _entry;
    99     }
    100    
    101   private : uint32_t one_access (uint32_t index, uint32_t offset)
    102     {
    103       bool val = _entry[index];
    104      
    105       // Compute next slot
    106       if (val == true)
    107         return index + offset;
    108       else
    109         return index - offset;
    110     }
    111 
    112   public : uint32_t access ()
    113     {
    114       uint32_t index = (_size>>1)-1; // medium
    115 
    116       for (int32_t i=static_cast<uint32_t>(log2(_size)-1); i>= 1; i--)
    117         {
    118           index = one_access (index,(1<<(i-1)));
    119         }
    120       index = one_access (index,0);
    121      
    122       // reverse by one_access make always a reverse
    123       uint32_t offset = (_entry[index]==true)?1:0;
    124 
    125       return index+offset;
    126     }
    127 
    128   private : uint32_t one_update (uint32_t index, uint32_t offset, uint32_t value)
    129     {
    130       uint32_t mask = (offset==0)?1:(offset<<1);
    131       bool     val  = ((value & mask) != 0);
    132 
    133       // reverse
    134       _entry[index] = not val;
    135 
    136       if (val == true)
    137       // Compute next slot
    138         return index + offset;
    139       else
    140         return index - offset;
    141     }
    142   public : void update (uint32_t value)
    143     {
    144       uint32_t index = (_size>>1)-1; // medium
    145 
    146       for (int32_t i=static_cast<uint32_t>(log2(_size)-1); i>=1; i--)
    147         {
    148           index = one_update (index,1<<(i-1),value);
    149         }
    150       index = one_update (index,0,value);
    151     }
    152 
    153   public : std::string print ()
    154     {
    155       std::string res = "";
    156 
    157       for (int32_t i=static_cast<int32_t>(_size)-1; i>=0; i--)
    158         res += toString(_entry[i]) + " ";
    159 
    160       return res;
    161     }
    162 
    163   };
    164     // -----[ fields ]----------------------------------------------------
    165     // Parameters
    166   protected : const std::string     _name;
    167 
    168   protected : const Parameters _param;
     59  protected : const Parameters  * _param;
    16960#ifdef STATISTICS
    17061  public    : Stat                           * _stat;
     
    17566
    17667#ifdef SYSTEMC
    177     // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     68    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    17869    // Interface
    17970  public    : SC_CLOCK                      *  in_CLOCK         ;
     
    18475  public    : SC_OUT(Tcontrol_t)           ** out_ACCESS_ACK    ;
    18576  public    : SC_IN (Taddress_t)           **  in_ACCESS_ADDRESS;
    186   public    : SC_OUT(Tentity_t )           ** out_ACCESS_ENTITY ;
    187     // Interface update
    188   public    : SC_IN (Tcontrol_t)           **  in_UPDATE_VAL    ;
    189   public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_ACK    ;
    190   public    : SC_IN (Taddress_t)           **  in_UPDATE_ADDRESS;
    191   public    : SC_IN (Tentity_t )           **  in_UPDATE_ENTITY ;
     77  public    : SC_IN (Tcontrol_t)           **  in_ACCESS_HIT    ; // hit = 1 : update next_victim with in_entity else with out_victim
     78  public    : SC_IN (Tentity_t )           **  in_ACCESS_ENTITY ;
     79  public    : SC_OUT(Tentity_t )           ** out_ACCESS_VICTIM ;
    19280
    19381    // Interface update
    194     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     82    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    19583  private   : entry_t                      ** reg_TABLE;
    19684
    197     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    198   private   : Tentity_t                     * internal_ACCESS_ENTITY;
     85    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     86  private   : Tcontrol_t                    * internal_ACCESS_ACK   ;
     87  private   : Tentity_t                     * internal_ACCESS_VICTIM;
    19988#endif
    20089
    201     // -----[ methods ]---------------------------------------------------
     90    // -----[ methods ]---------------------------------------------------
    20291
    20392#ifdef SYSTEMC
     
    20594#endif
    20695
    207   public  :          Victim_Pseudo_LRU              (
     96  public  :          Victim_Pseudo_LRU             
     97  (
    20898#ifdef SYSTEMC
    209                                               sc_module_name                                name,
     99   sc_module_name                                name,
    210100#else                                         
    211                                               std::string                                   name,
     101   std::string                                   name,
    212102#endif                                         
    213103#ifdef STATISTICS
    214                                               morpheo::behavioural::Parameters_Statistics * param_statistics,
     104   morpheo::behavioural::Parameters_Statistics * param_statistics,
    215105#endif
    216                                               Parameters                                    param );
     106   Parameters                                  * param );
    217107                                               
    218108  public  :          Victim_Pseudo_LRU              (Parameters param );
     
    224114                                               
    225115  public  : void     transition                (void);
    226   public  : void     genMealy_access           (void);
     116  public  : void     genMoore                  (void);
    227117#endif
    228118                                               
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Parameters.cpp

    r15 r78  
    1717  Parameters::Parameters (uint32_t nb_entity ,
    1818                          uint32_t nb_access ,
    19                           uint32_t nb_update ,
    20                           uint32_t size_table):
     19//                        uint32_t nb_update ,
     20                          uint32_t size_table,
     21                          bool     table_global):
    2122    _nb_entity  (nb_entity ),
    2223    _nb_access  (nb_access ),
    23     _nb_update  (nb_update ),
    24     _size_table (size_table)
     24//     _nb_update  (nb_update ),
     25    _size_table ((table_global == true)?1:size_table),
     26    _table_global (table_global),
     27    _size_address (size_table)
    2528  {
    2629    test();
     
    3033    _nb_entity  (param._nb_entity ),
    3134    _nb_access  (param._nb_access ),
    32     _nb_update  (param._nb_update ),
    33     _size_table (param._size_table)
     35//     _nb_update  (param._nb_update ),
     36    _size_table (param._size_table),
     37    _table_global(param._table_global),
     38    _size_address(param._size_address)
    3439  {
    3540    test();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Parameters_msg_error.cpp

    r75 r78  
    1616namespace victim_pseudo_lru {
    1717
    18   std::string Parameters::msg_error(void)
     18  Parameters_test Parameters::msg_error(void)
    1919  {
    20     std::string msg = "";
     20    Parameters_test test ("Victime_Pseudo_LRU");
    2121
    2222    if (_nb_entity < 2)
    23       {
    24         msg += "  - nb_entity must be >= 2\n";
    25         msg += "    * nb_entity                       : " + toString(_nb_entity) + "\n";
    26       }
    27 
     23      test.error("nb_entity must be >= 2");
     24   
    2825    if (is_positive(log2(_nb_entity)) == false)
    29       {
    30         msg += "  - nb_entity is not a power of 2\n";
    31         msg += "    * nb_entity                       : " + toString(_nb_entity) + "\n";
    32       }
     26      test.error("nb_entity is not a power of 2");
    3327
    3428    if (_nb_access <  1)
    35       {
    36         msg += "  - nb_access must be >= 1\n";
    37         msg += "    * nb_access                       : " + toString(_nb_access) + "\n";
    38       }
     29      test.error("nb_access must be >= 1");
    3930
    4031    if (_size_table < 1)
    41       {
    42         msg += "  - size_table must be >= 1\n";
    43         msg += "    * size_table                      : " + toString(_size_table) + "\n";
    44       }
     32      test.error("size_table must be >= 1");
    4533
    4634    if (is_between_inclusive (static_cast<uint32_t>(log2(_nb_entity)),0 ,(8*sizeof(Tentity_t))) == false)
    47       {
    48         msg += "  - type \"Tentity_t\" is too little to the size defined by nb_entity\n";
    49         msg += "    * nb_entity                       : " + toString(_nb_entity) + "\n";
    50         msg += "    * Tentity_t                (bits) : " + toString(8*(sizeof(Tentity_t))) + "\n";
    51       }
     35      test.error("type \"Tentity_t\" is too little to the size defined by nb_entity");
    5236
    5337    if (is_between_inclusive (static_cast<uint32_t>(log2(_size_table)),0 ,(8*sizeof(Taddress_t))) == false)
    54       {
    55         msg += "  - type \"Taddress_t\" is too little to the size defined by size_table\n";
    56         msg += "    * size_table                      : " + toString(_size_table)    + "\n";
    57         msg += "      > size                   (bits) : " + toString(log2(_size_table)) + "\n";
    58         msg += "    * Taddress_t               (bits) : " + toString(8*(sizeof(Taddress_t))) + "\n";
    59       }
     38      test.error("type \"Taddress_t\" is too little to the size defined by size_table");
    6039
    61 
    62 
    63     return msg;
     40    return test;
    6441  };
    6542
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Parameters_print.cpp

    r75 r78  
    2121
    2222    xml.balise_open("victim_pseudo_lru");
    23     xml.singleton_begin("nb_entity "); xml.attribut("value",toString(_nb_entity )); xml.singleton_end();
    24     xml.singleton_begin("nb_access "); xml.attribut("value",toString(_nb_access )); xml.singleton_end();
    25     xml.singleton_begin("nb_update "); xml.attribut("value",toString(_nb_update )); xml.singleton_end();
    26     xml.singleton_begin("size_table"); xml.attribut("value",toString(_size_table)); xml.singleton_end();
     23    xml.singleton_begin("nb_entity   "); xml.attribut("value",toString(_nb_entity   )); xml.singleton_end();
     24    xml.singleton_begin("nb_access   "); xml.attribut("value",toString(_nb_access   )); xml.singleton_end();
     25//     xml.singleton_begin("nb_update   "); xml.attribut("value",toString(_nb_update   )); xml.singleton_end();
     26    xml.singleton_begin("size_table  "); xml.attribut("value",toString(_size_table  )); xml.singleton_end();
     27    xml.singleton_begin("table_global"); xml.attribut("value",toString(_table_global)); xml.singleton_end();
    2728    xml.balise_close();
    2829
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU.cpp

    r75 r78  
    2222                          morpheo::behavioural::Parameters_Statistics * param_statistics,
    2323#endif
    24                           morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters param ):
     24                          morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters * param ):
    2525                          _name   (name)
    2626                          ,_param (param)
     
    5252    sensitive << (*(in_CLOCK)).pos();
    5353
    54     SC_METHOD (genMealy_access);
     54    SC_METHOD (genMoore);
    5555    dont_initialize ();
    5656    sensitive << (*(in_CLOCK)).neg();
    57     for (uint32_t i=0; i<_param._nb_access; i++)
    58       {
    59         sensitive << *(in_ACCESS_VAL     [i]);
    60         if (_param._size_table>1)
    61           sensitive << *(in_ACCESS_ADDRESS [i]);
    62       }
    6357
    6458#ifdef SYSTEMCASS_SPECIFIC
    65     log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","List dependency information");
    66     // List dependency information
    67     for (uint32_t i=0; i<_param._nb_access; i++)
    68       {
    69         (*(out_ACCESS_ENTITY [i])) (*( in_ACCESS_VAL     [i]));
    70         if (_param._size_table>1)
    71           (*(out_ACCESS_ENTITY [i])) (*( in_ACCESS_ADDRESS [i]));
    72       }
    7359#endif   
    7460
    7561    // Constant - ack is always at one
    76     for (uint32_t i=0; i<_param._nb_access; i++)
    77       PORT_WRITE (out_ACCESS_ACK [i], 1);
    78     for (uint32_t i=0; i<_param._nb_update; i++)
    79       PORT_WRITE (out_UPDATE_ACK [i], 1);
     62    for (uint32_t i=0; i<_param->_nb_access; i++)
     63      {
     64        internal_ACCESS_ACK [i] = 1;
     65        PORT_WRITE (out_ACCESS_ACK [i], internal_ACCESS_ACK [i]);
     66      }
    8067
    8168#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_allocation.cpp

    r75 r78  
    88
    99#include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h"
     10#include "Behavioural/include/Allocation.h"
    1011
    1112namespace morpheo {
     
    4243    // ~~~~~[ Interface : "access" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4344    {
    44        in_ACCESS_VAL     = new SC_IN (Tcontrol_t) * [_param._nb_access];
    45       out_ACCESS_ACK     = new SC_OUT(Tcontrol_t) * [_param._nb_access];
    46       if (_param._size_table>1)
    47        in_ACCESS_ADDRESS = new SC_IN (Taddress_t) * [_param._nb_access];
    48       out_ACCESS_ENTITY  = new SC_OUT(Tentity_t ) * [_param._nb_access];
    49      
    50       for (uint32_t i=0; i<_param._nb_access; i++)
    51         {
    52           Interface_fifo * interface = _interfaces->set_interface("access_"+toString(i)
    53 #ifdef POSITION
    54                                                                   , IN  ,WEST, "Access"
    55 #endif
    56                                                                   );
     45      ALLOC1_INTERFACE("access",IN,WEST, "Access", _param->_nb_access);
    5746
    58            in_ACCESS_VAL     [i] = interface->set_signal_valack_in        ("val"    , VAL);
    59           out_ACCESS_ACK     [i] = interface->set_signal_valack_out       ("ack"    , ACK);
    60          
    61           if (_param._size_table>1)
    62            in_ACCESS_ADDRESS [i] = interface->set_signal_in  <Taddress_t> ("address",static_cast<uint32_t>(log2(_param._size_table)));
    63           out_ACCESS_ENTITY  [i] = interface->set_signal_out <Tentity_t>  ("entity" ,static_cast<uint32_t>(log2(_param._nb_entity )));
    64         }
     47      ALLOC1_VALACK_IN ( in_ACCESS_VAL    ,VAL);
     48      ALLOC1_VALACK_OUT(out_ACCESS_ACK    ,ACK);
     49      ALLOC1_SIGNAL_IN ( in_ACCESS_HIT    ,"hit"    ,Tcontrol_t,1);
     50      ALLOC1_SIGNAL_IN ( in_ACCESS_ADDRESS,"address",Taddress_t,log2(_param->_size_address));
     51      ALLOC1_SIGNAL_IN ( in_ACCESS_ENTITY ,"entity" ,Tentity_t ,log2(_param->_nb_entity   ));
     52      ALLOC1_SIGNAL_OUT(out_ACCESS_VICTIM ,"victim" ,Tentity_t ,log2(_param->_nb_entity   ));
    6553    }
    6654
    67     // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    68    
    69     {
    70        in_UPDATE_VAL     = new SC_IN (Tcontrol_t) *  [_param._nb_update];
    71       out_UPDATE_ACK     = new SC_OUT(Tcontrol_t) *  [_param._nb_update];
    72       if (_param._size_table>1)
    73        in_UPDATE_ADDRESS = new SC_IN (Taddress_t) *  [_param._nb_update];
    74        in_UPDATE_ENTITY  = new SC_IN (Tentity_t ) *  [_param._nb_update];
    75      
    76       for (uint32_t i=0; i<_param._nb_update; i++)
    77         {
    78           Interface_fifo * interface = _interfaces->set_interface("update_"+toString(i)
    79 #ifdef POSITION
    80                                                                   , IN  ,EAST, "Update"
    81 #endif
    82                                                                   );
     55    // -----[ Register ]---------------------------------------------------
     56    reg_TABLE = new entry_t *  [_param->_size_table];
    8357
    84           in_UPDATE_VAL     [i] = interface->set_signal_valack_in        ("val"    , VAL);
    85          out_UPDATE_ACK     [i] = interface->set_signal_valack_out       ("ack"    , ACK);
    86          if (_param._size_table>1)
    87           in_UPDATE_ADDRESS [i] = interface->set_signal_in  <Taddress_t> ("address",static_cast<uint32_t>(log2(_param._size_table)));
    88           in_UPDATE_ENTITY  [i] = interface->set_signal_in  <Tentity_t>  ("entity" ,static_cast<uint32_t>(log2(_param._nb_entity )));
    89         }
    90     }
    91     // -----[ Register ]---------------------------------------------------
    92     reg_TABLE = new entry_t *  [_param._size_table];
    93 
    94     for (uint32_t i=0; i<_param._size_table; i++)
    95       reg_TABLE [i] = new entry_t (_param._nb_entity);
     58    for (uint32_t i=0; i<_param->_size_table; i++)
     59      reg_TABLE [i] = new entry_t (_param->_nb_entity);
    9660   
    9761    // -----[ Internal ]---------------------------------------------------
    98     internal_ACCESS_ENTITY = new Tentity_t [_param._nb_entity];
     62    internal_ACCESS_ACK    = new Tcontrol_t [_param->_nb_access];
     63    internal_ACCESS_VICTIM = new Tentity_t  [_param->_nb_access];
    9964
    10065#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_deallocation.cpp

    r42 r78  
    33 * $Id$
    44 *
    5  * [ Description ]
     5 * [ Description ]
    66 *
    77 */
     
    1919    delete     in_CLOCK;
    2020    delete     in_NRESET;
    21     // -----[ Interface access ]-------------------------------------------
     21    // -----[ Interface access ]-------------------------------------------
    2222    delete []  in_ACCESS_VAL    ;
    2323    delete [] out_ACCESS_ACK    ;
    24     if (_param._size_table>1)
     24    if (_param->_size_address>1)
    2525    delete []  in_ACCESS_ADDRESS;
    26     delete [] out_ACCESS_ENTITY ;
     26    delete []  in_ACCESS_HIT    ;
     27    delete []  in_ACCESS_ENTITY ;
     28    delete [] out_ACCESS_VICTIM ;
    2729   
    28     // -----[ Interface update ]-------------------------------------------
    29     delete []  in_UPDATE_VAL    ;
    30     delete [] out_UPDATE_ACK    ;
    31     if (_param._size_table>1)
    32     delete []  in_UPDATE_ADDRESS;
    33     delete []  in_UPDATE_ENTITY ;
    34 
    35     // -----[ Register ]---------------------------------------------------
     30    // -----[ Register ]---------------------------------------------------
    3631    delete [] reg_TABLE;
    3732
    38     // -----[ Internal ]---------------------------------------------------
    39     delete [] internal_ACCESS_ENTITY;
     33    // -----[ Internal ]---------------------------------------------------
     34    delete [] internal_ACCESS_ACK   ;
     35    delete [] internal_ACCESS_VICTIM;
    4036
    41 #ifdef POSITION
    4237    delete _component;
    43 #else
    44     delete _interfaces;
    45 #endif
    4638  };
    4739
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_genMoore.cpp

    r59 r78  
    1515namespace victim_pseudo_lru {
    1616
    17   void Victim_Pseudo_LRU::genMealy_access (void)
     17  void Victim_Pseudo_LRU::genMoore (void)
    1818  {
    19     for (uint32_t i=0; i<_param._nb_access; i++)
     19    for (uint32_t i=0; i<_param->_nb_access; i++)
    2020      {
    21         if (PORT_READ (in_ACCESS_VAL[i]) == 1)
    22           {
    23             Taddress_t address;
     21        Taddress_t address = (_param->_size_table>1)?PORT_READ(in_ACCESS_ADDRESS[i]):0;
    2422
    25             if (_param._size_table>1)
    26               address = PORT_READ     (in_ACCESS_ADDRESS[i]);
    27             else
    28               address = 0;
    29            
    30             internal_ACCESS_ENTITY[i] = reg_TABLE[address]->access();
    31           }
    32         else
    33           {
    34             internal_ACCESS_ENTITY[i] = 0;
    35           }
     23        internal_ACCESS_VICTIM[i] = reg_TABLE[address]->access();
    3624
    37         PORT_WRITE(out_ACCESS_ENTITY[i], internal_ACCESS_ENTITY[i]);
     25        PORT_WRITE(out_ACCESS_VICTIM[i], internal_ACCESS_VICTIM[i]);
    3826      }//end for i
    3927  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_transition.cpp

    r75 r78  
    1717  void Victim_Pseudo_LRU::transition (void)
    1818  {
    19 #ifdef STATISTICS
    20     uint32_t _stat_nb_access = 0;
    21     uint32_t _stat_nb_update = 0;
    22 #endif
     19    for (uint32_t i=0; i<_param->_nb_access; i++)
     20      {
     21        if (PORT_READ (in_ACCESS_VAL[i]) and internal_ACCESS_ACK)
     22          {
     23            Taddress_t address = (_param->_size_table>1)?PORT_READ(in_ACCESS_ADDRESS[i]):0;
     24            Tentity_t  entity;
    2325
    24     for (uint32_t i=0; i<_param._nb_access; i++)
    25       {
    26         // Access ... (ack is always at 1)
    27         if (PORT_READ (in_ACCESS_VAL[i]) == 1)
    28           {
    29 #ifdef STATISTICS
    30             _stat_nb_access ++;
    31 #endif
    32             Taddress_t address;
     26            if (PORT_READ(in_ACCESS_HIT [i]))
     27              {
     28                // Hit  : don't need a victim
     29// #ifdef STATISTICS
     30//              _stat_nb_update ++;
     31// #endif
     32                entity = PORT_READ(in_ACCESS_ENTITY[i]);
     33              }
     34            else
     35              {
     36                // Miss : need victim
     37// #ifdef STATISTICS
     38//              _stat_nb_access ++;
     39// #endif
     40                entity = internal_ACCESS_VICTIM[i];
     41              }
    3342
    34             if (_param._size_table>1)
    35               address = PORT_READ     (in_ACCESS_ADDRESS[i]);
    36             else
    37               address = 0;
    38            
    39             reg_TABLE[address]->update(internal_ACCESS_ENTITY[i]);
     43            reg_TABLE[address]->update(entity);
    4044          }
    4145      }//end for i
    4246   
    43     for (uint32_t i=0; i<_param._nb_update; i++)
    44       {
    45         // Update ... (ack is always at 1)
    46         if (PORT_READ (in_UPDATE_VAL[i]) == 1)
    47           {
    48 #ifdef STATISTICS
    49             _stat_nb_update ++;
    50 #endif
    51            
    52             Taddress_t address;
    53            
    54             if (_param._size_table>1)
    55               address = PORT_READ     (in_UPDATE_ADDRESS[i]);
    56             else
    57               address = 0;
    58            
    59             reg_TABLE[address]->update(PORT_READ(in_UPDATE_ENTITY[i]));
    60           }
    61       }//end for i
    62 
    6347#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    6448    end_cycle ();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_vhdl_body.cpp

    r75 r78  
    3535    vhdl->set_body ("--    Way Way Way Way Way Way Way Way   ");
    3636    vhdl->set_body ("--     0   1   2   3   4   5   6   7    ");
    37     for (uint32_t i=0; i<_param._nb_access; i++)
     37    for (uint32_t i=0; i<_param->_nb_access; i++)
    3838      {
    3939        vhdl->set_body ("");
     
    4242        std::string access_address;
    4343
    44         if (_param._size_table>1)
     44        if (_param->_size_table>1)
    4545          access_address = "conv_integer(in_ACCESS_"+toString(i)+"_ADDRESS)";
    4646        else
     
    5050        vhdl->set_body ("");
    5151
    52         for (int32_t j=static_cast<uint32_t>(log2(_param._nb_entity)-1); j>=0; j--)
     52        for (int32_t j=static_cast<uint32_t>(log2(_param->_nb_entity)-1); j>=0; j--)
    5353          {
    5454            vhdl->set_body ("access_entity_"+toString(i)+"("+toString(j)+") <= ");
     
    5656            uint32_t cpt=0;
    5757
    58             for (int32_t k=(1<<j)-1; k<static_cast<int32_t>(_param._nb_entity-1); k+=(1<<(j+1)))
     58            for (int32_t k=(1<<j)-1; k<static_cast<int32_t>(_param->_nb_entity-1); k+=(1<<(j+1)))
    5959              {
    6060                std::string cond = "";
    6161               
    6262                // Create the condition
    63                 for (uint32_t l=j+1; l<static_cast<uint32_t>(log2(_param._nb_entity));l++)
     63                for (uint32_t l=j+1; l<static_cast<uint32_t>(log2(_param->_nb_entity));l++)
    6464                  {
    6565                    if (l==static_cast<uint32_t>(j+1))
     
    8585    vhdl->set_body ("");
    8686    vhdl->set_body ("-- port access");
    87     for (uint32_t i=0; i<_param._nb_access; i++)
    88       for (int32_t j=static_cast<uint32_t>(log2(_param._nb_entity)-1); j>=0; j--)
     87    for (uint32_t i=0; i<_param->_nb_access; i++)
     88      for (int32_t j=static_cast<uint32_t>(log2(_param->_nb_entity)-1); j>=0; j--)
    8989        {
    9090          uint32_t cpt=0;
    9191         
    92           for (int32_t k=(1<<j)-1; k<static_cast<int32_t>(_param._nb_entity-1); k+=(1<<(j+1)))
     92          for (int32_t k=(1<<j)-1; k<static_cast<int32_t>(_param->_nb_entity-1); k+=(1<<(j+1)))
    9393            {
    9494              bool   have_cond = false;
     
    9696             
    9797              // condition to change the bit
    98               for (uint32_t l=j+1; l<static_cast<uint32_t>(log2(_param._nb_entity));l++)
     98              for (uint32_t l=j+1; l<static_cast<uint32_t>(log2(_param->_nb_entity));l++)
    9999                {
    100100                  have_cond = true;
     
    118118    vhdl->set_body ("");
    119119    vhdl->set_body ("-- port update");
    120     for (uint32_t i=0; i<_param._nb_update; i++)
    121       for (int32_t j=static_cast<uint32_t>(log2(_param._nb_entity)-1); j>=0; j--)
     120    for (uint32_t i=0; i<_param->_nb_update; i++)
     121      for (int32_t j=static_cast<uint32_t>(log2(_param->_nb_entity)-1); j>=0; j--)
    122122        {
    123123          uint32_t cpt=0;
    124124         
    125           for (int32_t k=(1<<j)-1; k<static_cast<int32_t>(_param._nb_entity-1); k+=(1<<(j+1)))
     125          for (int32_t k=(1<<j)-1; k<static_cast<int32_t>(_param->_nb_entity-1); k+=(1<<(j+1)))
    126126            {
    127127              bool   have_cond = false;
     
    129129             
    130130              // condition to change the bit
    131               for (uint32_t l=j+1; l<static_cast<uint32_t>(log2(_param._nb_entity));l++)
     131              for (uint32_t l=j+1; l<static_cast<uint32_t>(log2(_param->_nb_entity));l++)
    132132                {
    133133                  have_cond = true;
     
    146146                  std::string update_address;
    147147
    148                   if (_param._size_table>1)
     148                  if (_param->_size_table>1)
    149149                    update_address = "conv_integer(in_UPDATE_"+toString(i)+"_ADDRESS)";
    150150                  else
     
    168168    vhdl->set_body ("\tif in_CLOCK'event and in_CLOCK = '1' then");
    169169    vhdl->set_body ("\t\t-- Access port");
    170     for (uint32_t i=0; i<_param._nb_access; i++)
     170    for (uint32_t i=0; i<_param->_nb_access; i++)
    171171      {
    172172        std::string access_address;
    173173
    174         if (_param._size_table>1)
     174        if (_param->_size_table>1)
    175175          access_address = "conv_integer(in_ACCESS_"+toString(i)+"_ADDRESS)";
    176176        else
     
    183183
    184184    vhdl->set_body ("\t\t-- Update port");
    185     for (uint32_t i=0; i<_param._nb_update; i++)
     185    for (uint32_t i=0; i<_param->_nb_update; i++)
    186186      {
    187187        std::string update_address;
    188188
    189         if (_param._size_table>1)
     189        if (_param->_size_table>1)
    190190          update_address = "conv_integer(in_UPDATE_"+toString(i)+"_ADDRESS)";
    191191        else
     
    207207    vhdl->set_body ("-- Ack is always ");
    208208    vhdl->set_body ("");
    209     for (uint32_t i=0; i<_param._nb_access; i++)
     209    for (uint32_t i=0; i<_param->_nb_access; i++)
    210210      {
    211211        vhdl->set_body ("out_ACCESS_"+toString(i)+"_ACK    <= '1';");
     
    213213      }
    214214    vhdl->set_body ("");
    215     for (uint32_t i=0; i<_param._nb_update; i++)
     215    for (uint32_t i=0; i<_param->_nb_update; i++)
    216216      {
    217217        vhdl->set_body ("out_UPDATE_"+toString(i)+"_ACK    <= '1';");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_vhdl_declaration.cpp

    r42 r78  
    1818  void Victim_Pseudo_LRU::vhdl_declaration (Vhdl * & vhdl)
    1919  {
    20     vhdl->set_type ("Ttable", "array (" + toString(_param._size_table-1) + " downto 0) of "+std_logic(_param._nb_entity-1));
     20    vhdl->set_type ("Ttable", "array (" + toString(_param->_size_table-1) + " downto 0) of "+std_logic(_param->_nb_entity-1));
    2121
    2222
    2323    vhdl->set_signal ("reg_TABLE", "Ttable");
    24     for (uint32_t i=0; i<_param._nb_access; i++)
     24    for (uint32_t i=0; i<_param->_nb_access; i++)
    2525      {
    26         vhdl->set_signal ("access_entry_"+toString(i)+"     ",std_logic(_param._nb_entity-1));
    27         vhdl->set_signal ("access_next_entry_"+toString(i)+"",std_logic(_param._nb_entity-1));
    28         vhdl->set_signal ("access_entity_"+toString(i)+"    ",std_logic(static_cast<uint32_t>(log2(_param._nb_entity))));
     26        vhdl->set_signal ("access_entry_"+toString(i)+"     ",std_logic(_param->_nb_entity-1));
     27        vhdl->set_signal ("access_next_entry_"+toString(i)+"",std_logic(_param->_nb_entity-1));
     28        vhdl->set_signal ("access_entity_"+toString(i)+"    ",std_logic(static_cast<uint32_t>(log2(_param->_nb_entity))));
    2929      }
    3030
    31     for (uint32_t i=0; i<_param._nb_update; i++)
     31    for (uint32_t i=0; i<_param->_nb_update; i++)
    3232      {
    33         vhdl->set_signal ("update_next_entry_"+toString(i)+"",std_logic(_param._nb_entity-1));
     33        vhdl->set_signal ("update_next_entry_"+toString(i)+"",std_logic(_param->_nb_entity-1));
    3434      }
    3535  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Common

    r62 r78  
    2929
    3030FLAGS_COMMON                    = $(SYSTEMC_CFLAGS_$(SIMULATOR))        \
    31                                   -O3                                   \
    32                                   -g3                                   \
    33                                   -Wall                                 \
    34                                   -Wunused
     31                                  $(CXX_FLAGS)
    3532
    3633#                                 -Wno-deprecated                       \
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest

    r71 r78  
    7272                                        PERIOD[0]=1;                                                                                    \
    7373                                                                                                                                        \
    74                                         while $(READ) line; do                                                                          \
     74                                        while read line; do                                                                             \
    7575                                                LINE=($$line);                                                                          \
    7676                                                                                                                                        \
     
    117117                                export SYSTEMC=$(SYSTEMC_$(SIMULATOR)) ; ./$(DIR_BIN)/$(EXEC).x $(EXEC_PARAMS) $* `$(CAT) $<` &> $@
    118118                                declare -i count=`$(GREP) -ch "Test OK" $@`;            \
     119                                declare    timing=`$(GREP) -h "Timing"  $@`;            \
    119120                                if $(TEST) $$count -ne 0;                               \
    120                                 then echo "                     $* ... OK";             \
    121                                 else echo "                     $* ... KO"; exit 1;     \
     121                                then echo -e "                     $* ... OK\t$$timing";\
     122                                else echo    "                     $* ... KO"; exit 1;     \
    122123                                fi;
    123124
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Synthesis

    r68 r78  
    5454                                        $(ECHO) -e ""                                     >> $(FPGA_CFG_FILE_LOCAL);                    \
    5555                                done;                                   \
    56                                 ($(XILINX_ENV); $(CD) $(FPGA_CFG_FILE_GLOBAL_DIR); $(FPGA_CFG_FILE_GLOBAL));                            \
     56                                ($(XILINX_ENV); cd $(FPGA_CFG_FILE_GLOBAL_DIR); $(FPGA_CFG_FILE_GLOBAL));                               \
    5757                                $(MAKE) $(FPGA_LOG_FILES);
    5858
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.deps

    r77 r78  
    2020#-----[ Library ]------------------------------------------
    2121
    22 Behavioural_LIBRARY             =       -lCommon                \
    23                                         -lBehavioural   
     22Behavioural_LIBRARY             =       -lBehavioural   \
     23                                        -lCommon                                       
    2424
    25 Behavioural_DIR_LIBRARY         =       -L$(Common_DIR)/lib     \
    26                                         -L$(Behavioural_DIR)/lib
     25Behavioural_DIR_LIBRARY         =       -L$(Behavioural_DIR)/lib        \
     26                                        -L$(Common_DIR)/lib
    2727
    2828#-----[ Rules ]--------------------------------------------
     
    3030Behavioural_library             :
    3131                                @\
    32                                 $(MAKE) Common_library;
     32                                $(MAKE) Common_library;         \
    3333                                $(MAKE) --directory=$(Behavioural_DIR)  --makefile=Makefile;
    3434
    3535Behavioural_library_clean       :
    3636                                @\
    37                                 $(MAKE) Common_library_clean;
     37                                $(MAKE) Common_library_clean;   \
    3838                                $(MAKE) --directory=$(Behavioural_DIR)  --makefile=Makefile clean;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/Makefile.deps

    r77 r78  
    3030@COMPONENT_library              :
    3131                                @\
    32                                 $(MAKE) Behavioural_library;
     32                                $(MAKE) Behavioural_library;            \
    3333                                $(MAKE) --directory=$(@COMPONENT_DIR) --makefile=Makefile;
    3434
    3535@COMPONENT_library_clean        :
    3636                                @\
    37                                 $(MAKE) Behavioural_library_clean;
     37                                $(MAKE) Behavioural_library_clean;      \
    3838                                $(MAKE) --directory=$(@COMPONENT_DIR) --makefile=Makefile clean;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/main.cpp

    r76 r78  
    1414  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
    1515  err (_("list_params is :\n"));
     16  err (_(" * ()\n"));
    1617
    1718  exit (1);
     
    2425#endif
    2526{
    26   if (argc != 2+NB_PARAMS)
     27  if (argc != static_cast<int>(2+NB_PARAMS))
    2728    usage (argc, argv);
    2829
    29   uint32_t       x = 1;
     30  uint32_t x = 1;
    3031
    31   const string   name      =      argv[x++];
     32  string name = argv[x++];
    3233//const uint32_t size_data = atoi(argv[x++]);
    3334//const uint32_t nb_port   = atoi(argv[x++]);
    3435
     36  int _return = EXIT_SUCCESS;
    3537  try
    3638    {
     
    4648  catch (morpheo::ErrorMorpheo & error)
    4749    {
    48       msg (_("<%s> : %s.\n"),name.c_str(), error.what ());
    49       exit (EXIT_FAILURE);
     50      msg (_("<%s> :\n%s"),name.c_str(), error.what ());
     51      _return = EXIT_FAILURE;
    5052    }
    5153  catch (...)
    5254    {
    5355      err (_("<%s> : This test must generate a error.\n"),name.c_str());
    54       exit (EXIT_FAILURE);
     56      _return = EXIT_FAILURE;
    5557    }
    5658
    57   return (EXIT_SUCCESS);
     59  return (_return);
    5860}
    59 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/New_Component.h

    r76 r78  
    1616#include "Common/include/ToString.h"
    1717#include "Common/include/Debug.h"
    18 #include "Behavioural/include/Types.h"
    1918
     19#include "Behavioural/@DIRECTORY/include/Types.h"
    2020#include "Behavioural/@DIRECTORY/include/Parameters.h"
    2121#ifdef STATISTICS
     
    5353#ifdef SYSTEMC
    5454    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    55     // Interface
     55    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5656  public    : SC_CLOCK                      *  in_CLOCK        ;
    5757  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
     
    105105
    106106#ifdef STATISTICS
    107   public  : void        statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
     107  public  : void        statistics_allocation     (morpheo::behavioural::Parameters_Statistics * param_statistics);
     108  public  : void        statistics_deallocation   (void);
    108109#endif
    109110#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/Parameters.h

    r77 r78  
    2222    //-----[ methods ]-----------------------------------------------------------
    2323  public : Parameters  ();
    24   public : Parameters  (Parameters & param) ;
     24//   public : Parameters  (Parameters & param) ;
    2525  public : ~Parameters () ;
    2626
    27   public :        std::string  msg_error  (void);
     27  public :        Parameters_test msg_error  (void);
    2828
    29   public :        std::string   print      (uint32_t depth);
    30   public : friend std::ostream& operator<< (std::ostream& output_stream,
     29  public :        std::string     print      (uint32_t depth);
     30  public : friend std::ostream&   operator<< (std::ostream& output_stream,
    3131                                            morpheo::behavioural::@NAMESPACE_USE::Parameters & x);
    3232  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component.cpp

    r76 r78  
    4646        log_printf(INFO,@COMPONENT,FUNCTION,"Allocation of statistics");
    4747
    48         statistics_declaration(param_statistics);
     48        statistics_allocation(param_statistics);
    4949      }
    5050#endif
     
    8787    if (_usage & USE_STATISTICS)
    8888      {
    89         log_printf(INFO,@COMPONENT,FUNCTION,"Generate Statistics file");
    90        
    91         delete _stat;
     89        statistics_deallocation();
    9290      }
    9391#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_allocation.cpp

    r76 r78  
    3737    _interfaces = entity->set_interfaces();
    3838
    39     // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    40 
     39    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     40    {
    4141      Interface * interface = _interfaces->set_interface(""
    4242#ifdef POSITION
     
    4646#endif
    4747                                                         );
    48 
    49      in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
    50      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
    51 
     48     
     49      in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
     50      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
     51    }
    5252    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    5353
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_statistics_allocation.cpp

    r76 r78  
    1414
    1515#undef  FUNCTION
    16 #define FUNCTION "@COMPONENT::statistics_declaration"
    17   void @COMPONENT::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics)
     16#define FUNCTION "@COMPONENT::statistics_allocation"
     17  void @COMPONENT::statistics_allocation (morpheo::behavioural::Parameters_Statistics * param_statistics)
    1818  {
    1919    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters.cpp

    r53 r78  
    2121  };
    2222 
    23 #undef  FUNCTION
    24 #define FUNCTION "@COMPONENT::Parameters (copy)"
    25   Parameters::Parameters (Parameters & param)
    26   {
    27     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
    28     test();
    29     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
    30   };
     23// #undef  FUNCTION
     24// #define FUNCTION "@COMPONENT::Parameters (copy)"
     25//   Parameters::Parameters (Parameters & param)
     26//   {
     27//     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     28//     test();
     29//     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     30//   };
    3131
    3232#undef  FUNCTION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters_msg_error.cpp

    r76 r78  
    1616#undef  FUNCTION
    1717#define FUNCTION "@COMPONENT::msg_error"
    18   std::string Parameters::msg_error(void)
     18  Parameters_test Parameters::msg_error(void)
    1919  {
    2020    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
    2121
    22     std::string msg = "";
    23 
    24     return msg;
     22    Parameters_test test ("@COMPONENT");
    2523
    2624    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     25
     26    return test;
    2727  };
    2828
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/Makefile.deps

    r77 r78  
    3030@COMPONENT_library              :
    3131                                @\
    32                                 $(MAKE) Behavioural_library;
     32                                $(MAKE) Behavioural_library;            \
    3333                                $(MAKE) --directory=$(@COMPONENT_DIR) --makefile=Makefile;
    3434
    3535@COMPONENT_library_clean        :
    3636                                @\
    37                                 $(MAKE) Behavioural_library_clean;
     37                                $(MAKE) Behavioural_library_clean;      \
    3838                                $(MAKE) --directory=$(@COMPONENT_DIR) --makefile=Makefile clean;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/main.cpp

    r76 r78  
    1414  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
    1515  err (_("list_params is :\n"));
     16  err (_(" * ()\n"));
    1617
    1718  exit (1);
     
    2425#endif
    2526{
    26   if (argc != 2+NB_PARAMS)
     27  if (argc != static_cast<int>(2+NB_PARAMS))
    2728    usage (argc, argv);
    2829
    29   uint32_t       x = 1;
     30  uint32_t x = 1;
    3031
    31   const string   name      =      argv[x++];
     32  string name = argv[x++];
    3233//const uint32_t size_data = atoi(argv[x++]);
    3334//const uint32_t nb_port   = atoi(argv[x++]);
    3435
     36  int _return = EXIT_SUCCESS;
    3537  try
    3638    {
     
    4648  catch (morpheo::ErrorMorpheo & error)
    4749    {
    48       msg (_("<%s> : %s.\n"),name.c_str(), error.what ());
    49       exit (EXIT_FAILURE);
     50      msg (_("<%s> :\n%s"),name.c_str(), error.what ());
     51      _return = EXIT_FAILURE;
    5052    }
    5153  catch (...)
    5254    {
    5355      err (_("<%s> : This test must generate a error.\n"),name.c_str());
    54       exit (EXIT_FAILURE);
     56      _return = EXIT_FAILURE;
    5557    }
    5658
    57   return (EXIT_SUCCESS);
     59  return (_return);
    5860}
    59 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/include/New_Component.h

    r76 r78  
    5353#ifdef SYSTEMC
    5454    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    55     // Interface
     55    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5656  public    : SC_CLOCK                      *  in_CLOCK        ;
    5757  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
     
    104104
    105105#ifdef STATISTICS
    106   public  : void        statistics_declaration    (morpheo::behavioural::Parameters_Statistics * param_statistics);
     106  public  : void        statistics_allocation     (morpheo::behavioural::Parameters_Statistics * param_statistics);
     107  public  : void        statistics_deallocation   (void);
    107108#endif
    108109#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/include/Parameters.h

    r77 r78  
    2222    //-----[ methods ]-----------------------------------------------------------
    2323  public : Parameters  ();
    24   public : Parameters  (Parameters & param) ;
     24//   public : Parameters  (Parameters & param) ;
    2525  public : ~Parameters () ;
    2626
    27   public :        std::string  msg_error  (void);
     27  public :        Parameters_test msg_error  (void);
    2828
    29   public :        std::string   print      (uint32_t depth);
    30   public : friend std::ostream& operator<< (std::ostream& output_stream,
     29  public :        std::string     print      (uint32_t depth);
     30  public : friend std::ostream&   operator<< (std::ostream& output_stream,
    3131                                            morpheo::behavioural::@NAMESPACE_USE::Parameters & x);
    3232  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component.cpp

    r76 r78  
    4646        log_printf(INFO,@COMPONENT,FUNCTION,"Allocation of statistics");
    4747
    48         statistics_declaration(param_statistics);
     48        statistics_allocation(param_statistics);
    4949      }
    5050#endif
     
    8787    if (_usage & USE_STATISTICS)
    8888      {
    89         log_printf(INFO,@COMPONENT,FUNCTION,"Generate Statistics file");
    90        
    91         delete _stat;
     89        statistics_deallocation();
    9290      }
    9391#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_allocation.cpp

    r76 r78  
    3636
    3737    _interfaces = entity->set_interfaces();
    38 
    39     // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    40 
     38   
     39    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     40    {
    4141      Interface * interface = _interfaces->set_interface(""
    4242#ifdef POSITION
     
    4646#endif
    4747                                                         );
     48     
     49      in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
     50      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
     51    }
     52   
     53    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     54   
     55    // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     56    std::string src,dest;
    4857
    49      in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
    50      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
    5158
    52     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     59    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     60     _component->test_map();
    5361
    5462#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_statistics_allocation.cpp

    r76 r78  
    1414
    1515#undef  FUNCTION
    16 #define FUNCTION "@COMPONENT::statistics_declaration"
    17   void @COMPONENT::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics)
     16#define FUNCTION "@COMPONENT::statistics_allocation"
     17  void @COMPONENT::statistics_allocation (morpheo::behavioural::Parameters_Statistics * param_statistics)
    1818  {
    1919    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/Parameters.cpp

    r76 r78  
    2121  };
    2222 
    23 #undef  FUNCTION
    24 #define FUNCTION "@COMPONENT::Parameters (copy)"
    25   Parameters::Parameters (Parameters & param)
    26   {
    27     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
    28     test();
    29     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
    30   };
     23// #undef  FUNCTION
     24// #define FUNCTION "@COMPONENT::Parameters (copy)"
     25//   Parameters::Parameters (Parameters & param)
     26//   {
     27//     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     28//     test();
     29//     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     30//   };
    3131
    3232#undef  FUNCTION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/Parameters_msg_error.cpp

    r76 r78  
    1616#undef  FUNCTION
    1717#define FUNCTION "@COMPONENT::msg_error"
    18   std::string Parameters::msg_error(void)
     18  Parameters_test Parameters::msg_error(void)
    1919  {
    2020    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
    2121
    22     std::string msg = "";
    23 
    24     return msg;
     22    Parameters_test test ("@COMPONENT");
    2523
    2624    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     25
     26    return test;
    2727  };
    2828
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h

    r76 r78  
    77// -----[ NO ITERATION ]-------------------------------------------------
    88// ----------------------------------------------------------------------
     9
     10#define __ALLOC_SIGNAL(sig, name, type)         \
     11  {                                             \
     12    sig = new type (name);                      \
     13  }
    914
    1015#ifdef POSITION
     
    1621#endif
    1722
    18 #define ALLOC_VALACK_IN(  sig, name, type)                              \
     23#define ALLOC_VAL_ACK_IN(  sig, name, type)                             \
    1924  {                                                                     \
    2025    sig = interface->set_signal_valack_in (name, type);                 \
    2126  }                                                                     
    22 #define ALLOC_VALACK_OUT( sig, name, type)                              \
     27#define ALLOC_VAL_ACK_OUT( sig, name, type)                             \
    2328  {                                                                     \
    2429    sig = interface->set_signal_valack_out(name, type);                 \
    2530  }                                                                     
    26 #define ALLOC_VAL_IN(     sig)                                          \
    27   {                                                                     \
    28     sig = interface->set_signal_valack_in (VAL);                        \
     31#define ALLOC_VALACK_IN(     sig, type)                                 \
     32  {                                                                     \
     33    sig = interface->set_signal_valack_in (type);                       \
    2934  }                                                                     
    30 #define ALLOC_VAL_OUT(    sig)                                          \
    31   {                                                                     \
    32     sig = interface->set_signal_valack_out(VAL);                        \
    33   }                                                                     
    34 #define ALLOC_ACK_IN(     sig)                                          \
    35   {                                                                     \
    36     sig = interface->set_signal_valack_in (ACK);                        \
    37   }                                                                     
    38 #define ALLOC_ACK_OUT(    sig)                                          \
    39   {                                                                     \
    40     sig = interface->set_signal_valack_out(ACK);                        \
     35#define ALLOC_VALACK_OUT(    sig, type)                                 \
     36  {                                                                     \
     37    sig = interface->set_signal_valack_out(type);                       \
    4138  }                                                                     
    4239#define ALLOC_SIGNAL_IN(  sig, name, type, size)                        \
     
    6057// -----[ ITERATION 1 ]--------------------------------------------------
    6158// ----------------------------------------------------------------------
     59
     60#define __ALLOC1_INTERFACE(name, it1)           \
     61  const std::string interface_name = name;      \
     62  const uint32_t iterator_1 = it1;
     63
     64#define __ALLOC1_SIGNAL_IN( sig, name, type)            \
     65  {                                                                     \
     66    sig = new SC_IN(type) * [iterator_1];                               \
     67    std::string separator="_";                                          \
     68    for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
     69      {                                                                 \
     70        std::string str = "in_"+interface_name+separator+toString(alloc_signal_it1)+separator+name; \
     71        sig [alloc_signal_it1] = new SC_IN(type) (str.c_str());         \
     72      }                                                                 \
     73  }
     74
     75#define __ALLOC1_SIGNAL_OUT( sig, name, type)           \
     76  {                                                                     \
     77    sig = new SC_OUT(type) * [iterator_1];                              \
     78    std::string separator="_";                                          \
     79    for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
     80      {                                                                 \
     81        std::string str = "out_"+interface_name+separator+toString(alloc_signal_it1)+separator+name; \
     82        sig [alloc_signal_it1] = new SC_OUT(type) (str.c_str());                \
     83      }                                                                 \
     84  }
    6285
    6386#ifdef POSITION
     
    6689  Interface_fifo * interface [iterator_1];                              \
    6790  {                                                                     \
    68     std::string      separator="_";                                     \
    69     for (uint32_t i=0; i<iterator_1; i++)                               \
    70       {                                                                 \
    71         interface [i] = _interfaces->set_interface( name+separator+toString(i), direction, localisation, str); \
     91    std::string separator="_";                                          \
     92    for (uint32_t alloc_interface_it1=0; alloc_interface_it1<iterator_1; alloc_interface_it1++) \
     93      {                                                                 \
     94        interface [alloc_interface_it1] = _interfaces->set_interface( name+separator+toString(alloc_interface_it1), direction, localisation, str); \
    7295      }                                                                 \
    7396  }
     
    77100  Interface_fifo * interface [iterator_1];                              \
    78101  {                                                                     \
    79     std::string      separator="_";                                     \
    80     for (uint32_t i=0; i<iterator_1; i++)                               \
    81       {                                                                 \
    82         interface [i] = _interfaces->set_interface( name+separator+toString(i)); \
     102    std::string separator="_";                                          \
     103    for (uint32_t alloc_interface_it1=0; alloc_interface_it1<iterator_1; alloc_interface_it1++) \
     104      {                                                                 \
     105        interface [alloc_interface_it1] = _interfaces->set_interface( name+separator+toString(alloc_interface_it1)); \
    83106      }                                                                 \
    84107  }
    85108#endif
    86109
    87 
    88 #define ALLOC1_VALACK_IN( sig, name, type)                              \
     110#define ALLOC1_VAL_ACK_IN( sig, name, type)                             \
    89111  {                                                                     \
    90112    sig = new SC_IN (Tcontrol_t) * [iterator_1];                        \
    91     for (uint32_t i=0; i<iterator_1; i++)                               \
    92       {                                                                 \
    93         sig [i] = interface[i]->set_signal_valack_in (name, type);      \
    94       }                                                                 \
    95   }
    96 #define ALLOC1_VALACK_OUT(sig, name, type)                              \
     113    for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
     114      {                                                                 \
     115        sig [alloc_signal_it1] = interface[alloc_signal_it1]->set_signal_valack_in (name, type); \
     116      }                                                                 \
     117  }
     118#define ALLOC1_VAL_ACK_OUT(sig, name, type)                             \
    97119  {                                                                     \
    98120    sig = new SC_OUT(Tcontrol_t) * [iterator_1];                        \
    99     for (uint32_t i=0; i<iterator_1; i++)                               \
    100       {                                                                 \
    101         sig [i] = interface[i]->set_signal_valack_out(name, type);      \
    102       }                                                                 \
    103   }
    104 #define ALLOC1_VAL_IN(    sig)                                          \
     121    for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
     122      {                                                                 \
     123        sig [alloc_signal_it1] = interface[alloc_signal_it1]->set_signal_valack_out(name, type); \
     124      }                                                                 \
     125  }
     126#define ALLOC1_VALACK_IN(    sig, type)                                 \
    105127  {                                                                     \
    106128    sig = new SC_IN (Tcontrol_t) * [iterator_1];                        \
    107     for (uint32_t i=0; i<iterator_1; i++)                               \
    108       {                                                                 \
    109         sig [i] = interface[i]->set_signal_valack_in (VAL);             \
    110       }                                                                 \
    111   }
    112 #define ALLOC1_VAL_OUT(   sig)                                          \
     129    for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
     130      {                                                                 \
     131        sig [alloc_signal_it1] = interface[alloc_signal_it1]->set_signal_valack_in (type); \
     132      }                                                                 \
     133  }
     134#define ALLOC1_VALACK_OUT(   sig, type)                                 \
    113135  {                                                                     \
    114136    sig = new SC_OUT(Tcontrol_t) * [iterator_1];                        \
    115     for (uint32_t i=0; i<iterator_1; i++)                               \
    116       {                                                                 \
    117         sig [i] = interface[i]->set_signal_valack_out(VAL);             \
    118       }                                                                 \
    119   }
    120 #define ALLOC1_ACK_IN(    sig)                                          \
    121   {                                                                     \
    122     sig = new SC_IN (Tcontrol_t) * [iterator_1];                        \
    123     for (uint32_t i=0; i<iterator_1; i++)                               \
    124       {                                                                 \
    125         sig [i] = interface[i]->set_signal_valack_in (ACK);             \
    126       }                                                                 \
    127   }
    128 #define ALLOC1_ACK_OUT(   sig)                                          \
    129   {                                                                     \
    130     sig = new SC_OUT(Tcontrol_t) * [iterator_1];                        \
    131     for (uint32_t i=0; i<iterator_1; i++)                               \
    132       {                                                                 \
    133         sig [i] = interface[i]->set_signal_valack_out(ACK);             \
     137    for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
     138      {                                                                 \
     139        sig [alloc_signal_it1] = interface[alloc_signal_it1]->set_signal_valack_out(type); \
    134140      }                                                                 \
    135141  }
     
    138144    {                                                                   \
    139145      sig = new SC_IN (type) * [iterator_1];                            \
    140       for (uint32_t i=0; i<iterator_1; i++)                             \
     146      for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
    141147        {                                                               \
    142           sig [i] = interface[i]->set_signal_in <type> (name, size);    \
     148          sig [alloc_signal_it1] = interface[alloc_signal_it1]->set_signal_in <type> (name, size); \
    143149        }                                                               \
    144150    }
     
    148154    {                                                                   \
    149155      sig = new SC_OUT(type) * [iterator_1];                            \
    150       for (uint32_t i=0; i<iterator_1; i++)                             \
     156      for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
    151157        {                                                               \
    152           sig [i] = interface[i]->set_signal_out<type> (name, size);    \
     158          sig [alloc_signal_it1] = interface[alloc_signal_it1]->set_signal_out<type> (name, size); \
    153159        }                                                               \
    154160    }
     
    159165    std::string separator="_";                                          \
    160166    std::string str;                                                    \
    161     for (uint32_t i=0; i<it1; i++)                                      \
    162       {                                                                 \
    163         str = name+separator+toString(i);                               \
    164         sig [i] = new sc_signal<type> (str.c_str());                    \
    165       }                                                                 \
    166   }
    167 
    168 #define INSTANCE1_SC_SIGNAL(component, sig, it1)        \
    169   for (uint32_t i=0; i<it1; i++)                        \
    170     {                                                   \
    171       (*(component->sig[i])) (*(sig[i]));               \
    172     }
    173 
     167    for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
     168      {                                                                 \
     169        str = name+separator+toString(alloc_signal_it1);                \
     170        sig [alloc_signal_it1] = new sc_signal<type> (str.c_str());     \
     171      }                                                                 \
     172  }
     173
     174#define INSTANCE1_SC_SIGNAL(component, sig, it1)                        \
     175  for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
     176    {                                                                   \
     177      (*(component->sig[alloc_signal_it1])) (*(sig[alloc_signal_it1])); \
     178    }
     179
     180// ----------------------------------------------------------------------
     181// -----[ ITERATION 2 ]--------------------------------------------------
     182// ----------------------------------------------------------------------
     183
     184#ifdef POSITION
     185#define ALLOC2_INTERFACE( name, direction, localisation, str, it1, it2) \
     186  uint32_t iterator_1 = 0;                                              \
     187  uint32_t iterator_2 = 0;                                              \
     188  Interface_fifo *** interface;                                         \
     189  {                                                                     \
     190    std::string separator="_";                                          \
     191    iterator_1 = it1;                                                   \
     192    interface = new Interface_fifo ** [iterator_1];                     \
     193    for (uint32_t alloc_interface_it1=0; alloc_interface_it1<iterator_1; alloc_interface_it1++) \
     194      {                                                                 \
     195        iterator_2 = it2;                                               \
     196        interface [alloc_interface_it1] = new Interface_fifo * [iterator_2]; \
     197        for (uint32_t alloc_interface_it2=0; alloc_interface_it2<iterator_2; alloc_interface_it2++) \
     198          {                                                             \
     199            interface [alloc_interface_it1][alloc_interface_it2] = _interfaces->set_interface( name+separator+toString(alloc_interface_it1)+separator+toString(alloc_interface_it2), direction, localisation, str); \
     200          }                                                             \
     201      }                                                                 \
     202  }
     203#else
     204#define ALLOC2_INTERFACE( name, direction, localisation, str, it1, it2) \
     205  uint32_t iterator_1 = 0;                                              \
     206  uint32_t iterator_2 = 0;                                              \
     207  Interface_fifo *** interface;                                         \
     208  {                                                                     \
     209    std::string separator="_";                                          \
     210    iterator_1 = it1;                                                   \
     211    interface = new Interface_fifo ** [iterator_1];                     \
     212    for (uint32_t alloc_interface_it1=0; alloc_interface_it1<iterator_1; alloc_interface_it1++) \
     213      {                                                                 \
     214        iterator_2 = it2;                                               \
     215        interface [alloc_interface_it1] = new Interface_fifo * [iterator_2]; \
     216        for (uint32_t alloc_interface_it2=0; alloc_interface_it2<iterator_2; alloc_interface_it2++) \
     217          {                                                             \
     218            interface [alloc_interface_it1][alloc_interface_it2] = _interfaces->set_interface( name+separator+toString(alloc_interface_it1)+separator+toString(alloc_interface_it2)); \
     219          }                                                             \
     220      }                                                                 \
     221  }
    174222#endif
     223
     224#define _ALLOC2_VAL_ACK_IN( sig, name, type, it1, it2)                  \
     225  {                                                                     \
     226    sig = new SC_IN (Tcontrol_t) ** [it1];                              \
     227    for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
     228      {                                                                 \
     229        sig [alloc_signal_it1] = new SC_IN (Tcontrol_t) * [it2];        \
     230        for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
     231          {                                                             \
     232            sig [alloc_signal_it1][alloc_signal_it2] = interface[alloc_signal_it1][alloc_signal_it2]->set_signal_valack_in (name, type); \
     233          }                                                             \
     234      }                                                                 \
     235  }
     236
     237#define _ALLOC2_VAL_ACK_OUT( sig, name, type, it1, it2)                 \
     238  {                                                                     \
     239    sig = new SC_OUT (Tcontrol_t) ** [it1];                             \
     240    for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
     241      {                                                                 \
     242        sig [alloc_signal_it1] = new SC_OUT (Tcontrol_t) * [it2];       \
     243        for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
     244          {                                                             \
     245            sig [alloc_signal_it1][alloc_signal_it2] = interface[alloc_signal_it1][alloc_signal_it2]->set_signal_valack_out (name, type); \
     246          }                                                             \
     247      }                                                                 \
     248  }
     249
     250#define _ALLOC2_VALACK_IN(    sig,type, it1, it2)                       \
     251  {                                                                     \
     252    sig = new SC_IN (Tcontrol_t) ** [it1];                              \
     253    for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
     254      {                                                                 \
     255        sig [alloc_signal_it1] = new SC_IN (Tcontrol_t) * [it2];        \
     256        for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
     257          {                                                             \
     258            sig [alloc_signal_it1][alloc_signal_it2] = interface[alloc_signal_it1][alloc_signal_it2]->set_signal_valack_in (type); \
     259          }                                                             \
     260      }                                                                 \
     261  }
     262
     263#define _ALLOC2_VALACK_OUT(    sig,type, it1, it2)                      \
     264  {                                                                     \
     265    sig = new SC_OUT (Tcontrol_t) ** [it1];                             \
     266    for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
     267      {                                                                 \
     268        sig [alloc_signal_it1] = new SC_OUT (Tcontrol_t) * [it2];       \
     269        for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
     270          {                                                             \
     271            sig [alloc_signal_it1][alloc_signal_it2] = interface[alloc_signal_it1][alloc_signal_it2]->set_signal_valack_out (type); \
     272          }                                                             \
     273      }                                                                 \
     274  }
     275
     276#define _ALLOC2_SIGNAL_IN( sig, name, type, size, it1, it2)             \
     277  if (size > 0)                                                         \
     278    {                                                                   \
     279      sig = new SC_IN (type) ** [it1];                                  \
     280      for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
     281        {                                                               \
     282          sig [alloc_signal_it1] = new SC_IN (type) * [it2];            \
     283          for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
     284            {                                                           \
     285              sig [alloc_signal_it1][alloc_signal_it2] = interface[alloc_signal_it1][alloc_signal_it2]->set_signal_in <type> (name, size); \
     286            }                                                           \
     287        }                                                               \
     288    }
     289
     290#define _ALLOC2_SIGNAL_OUT( sig, name, type, size, it1, it2)            \
     291  if (size > 0)                                                         \
     292    {                                                                   \
     293      sig = new SC_OUT (type) ** [it1];                                 \
     294      for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
     295        {                                                               \
     296          sig [alloc_signal_it1] = new SC_OUT (type) * [it2];           \
     297          for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
     298            {                                                           \
     299              sig [alloc_signal_it1][alloc_signal_it2] = interface[alloc_signal_it1][alloc_signal_it2]->set_signal_out <type> (name, size); \
     300            }                                                           \
     301        }                                                               \
     302    }
     303
     304#define ALLOC2_VAL_ACK_IN( sig, name, type      ) _ALLOC2_VAL_ACK_IN( sig, name, type      , iterator_1, iterator_2)
     305#define ALLOC2_VAL_ACK_OUT(sig, name, type      ) _ALLOC2_VAL_ACK_OUT(sig, name, type      , iterator_1, iterator_2)
     306#define ALLOC2_VALACK_IN(  sig,       type      ) _ALLOC2_VALACK_IN(  sig,       type      , iterator_1, iterator_2)
     307#define ALLOC2_VALACK_OUT( sig,       type      ) _ALLOC2_VALACK_OUT( sig,       type      , iterator_1, iterator_2)
     308#define ALLOC2_SIGNAL_IN(  sig, name, type, size) _ALLOC2_SIGNAL_IN(  sig, name, type, size, iterator_1, iterator_2)
     309#define ALLOC2_SIGNAL_OUT( sig, name, type, size) _ALLOC2_SIGNAL_OUT( sig, name, type, size, iterator_1, iterator_2)
     310
     311#define ALLOC2_SC_SIGNAL( sig, name, type, it1, it2)                    \
     312  sc_signal<type> *** sig = new sc_signal<type> ** [it1];               \
     313  {                                                                     \
     314    std::string separator="_";                                          \
     315    std::string str;                                                    \
     316    for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
     317      {                                                                 \
     318        sig [alloc_signal_it1] = new sc_signal<type> * [it2];           \
     319        for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
     320          {                                                             \
     321            str = name+separator+toString(alloc_signal_it1)+separator+toString(alloc_signal_it2); \
     322            sig [alloc_signal_it1][alloc_signal_it2] = new sc_signal<type> (str.c_str()); \
     323          }                                                             \
     324      }                                                                 \
     325  }
     326
     327#define INSTANCE2_SC_SIGNAL(component, sig, it1, it2)                   \
     328  for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
     329    for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
     330      {                                                                 \
     331        (*(component->sig[alloc_signal_it1][alloc_signal_it2])) (*(sig[alloc_signal_it1][alloc_signal_it2])); \
     332      }
     333#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h

    r75 r78  
    2525namespace behavioural          {
    2626
     27#ifdef DEBUG
     28# define PORT_MAP(x,a,b,c,d)                                            \
     29  do                                                                    \
     30    {                                                                   \
     31      try                                                               \
     32        {                                                               \
     33          x->port_map(a,b,c,d);                                         \
     34        }                                                               \
     35      catch (morpheo::ErrorMorpheo & error)                             \
     36        {                                                               \
     37          throw (ErrorMorpheo ("In file "+toString(__FILE__)+", at line "+toString(__LINE__)+"\n"+error.what ())); \
     38        }                                                               \
     39    }                                                                   \
     40  while (0)
     41#else
     42# define PORT_MAP(x,a,b,c,d)                                            \
     43  do                                                                    \
     44    {                                                                   \
     45      x->port_map(a,b,c,d);                                             \
     46    }                                                                   \
     47  while (0)
     48#endif
     49
     50#define COMPONENT_MAP(x,a,b,c,d)                                        \
     51  do                                                                    \
     52    {                                                                   \
     53      PORT_MAP(x,a,b,c,d);                                              \
     54      PORT_MAP(x,c,d,a,b);                                              \
     55    }                                                                   \
     56  while (0)
     57 
     58
    2759  typedef uint8_t Tinstance_t;
    2860
     
    3567  typedef struct
    3668  {
    37     public : Tinstance_t _instance;
    38     public : Entity    * _entity  ;
     69//public : Component * _component;
     70  public : Entity    * _entity   ;
     71  public : Tinstance_t _instance ;
    3972  } Tcomponent_t;   
    4073 
     
    4275  {
    4376    // -----[ fields ]----------------------------------------------------
    44   private   : const Tusage_t        _usage;
    45   private   : Entity              * _entity        ;
     77  private   : const Tusage_t             _usage;
     78  private   : Entity                   * _entity        ;
    4679  private   : std::list<Tcomponent_t*> * _list_component;
    4780
     
    5790#endif
    5891                                                       );
    59   private   : std::string                get_entity        (void);
     92  private   : std::string           get_entity        (void);
    6093
    6194  public    : void                  set_component     (Component * component
     
    69102                                                       );
    70103
    71   private   : std::string                get_component     (void);
     104  private   : std::string           get_component     (void);
    72105
    73106  private   : Entity *              find_entity       (std::string name);
     
    87120                                                       std::string component_dest,
    88121                                                       std::string port_dest    );
    89   public    : void                  port_map          (std::string component_src ,
    90                                                        std::string port_src      );
    91122
    92   public    : bool                  test_map          (void);
     123  public    : bool                  test_map          (bool recursive=true);
     124  private   : bool                  test_map          (uint32_t depth, bool recursive);
    93125
    94126#ifdef POSITION
     
    102134  public    : void                  generate_file     (void);
    103135#endif   
    104   public    : friend std::ostream&       operator<<        (std::ostream& output_stream,
    105                                                             morpheo::behavioural::Component & x);
     136  public    : friend std::ostream&  operator<<        (std::ostream& output_stream,
     137                                                       morpheo::behavioural::Component & x);
    106138  };
    107139
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Constants.h

    r77 r78  
    161161#  define OPERATION_FIND_L_FL1                     0x2        // 000_0000 l.fl1
    162162
    163 #  define OPERATION_SPECIAL_L_MFSPR                0x1        // 000_0000 l.mfspr
    164 #  define OPERATION_SPECIAL_L_MTSPR                0x2        // 000_0000 l.mtspr
    165 #  define OPERATION_SPECIAL_L_MAC                  0x4        // 000_0000 l.mac   , l.maci
    166 #  define OPERATION_SPECIAL_L_MACRC                0x8        // 000_0000 l.macrc
    167 #  define OPERATION_SPECIAL_L_MSB                  0x10       // 000_0000 l.msb
    168 
    169 #  define OPERATION_BRANCH_L_TEST_NF               0x1        // 000_0000 l.bnf
    170 #  define OPERATION_BRANCH_L_TEST_F                0x2        // 000_0000 l.bf
    171 #  define OPERATION_BRANCH_L_JALR                  0x4        // 000_0000 l.jal   , l.jalr , l.jr
     163#  define OPERATION_SPECIAL_L_NOP                  0xff       // 000_0000 l.nop   
     164#  define OPERATION_SPECIAL_L_MFSPR                0x1        // 000_0001 l.mfspr
     165#  define OPERATION_SPECIAL_L_MTSPR                0x2        // 000_0010 l.mtspr
     166#  define OPERATION_SPECIAL_L_RFE                  0x4        // 000_0100 l.rfe 
     167#  define OPERATION_SPECIAL_L_MAC                  0x11       // 001_0001 l.mac   , l.maci
     168#  define OPERATION_SPECIAL_L_MACRC                0x12       // 001_0010 l.macrc
     169#  define OPERATION_SPECIAL_L_MSB                  0x14       // 001_0100 l.msb
     170#  define OPERATION_SPECIAL_L_MSYNC                0x21       // 010_0001 l.msync
     171#  define OPERATION_SPECIAL_L_PSYNC                0x22       // 010_0010 l.psync
     172#  define OPERATION_SPECIAL_L_CSYNC                0x24       // 010_0100 l.csync
     173#  define OPERATION_SPECIAL_L_SYS                  0x41       // 100_0001 l.sys 
     174#  define OPERATION_SPECIAL_L_TRAP                 0x42       // 100_0010 l.trap
     175
     176
     177#  define OPERATION_BRANCH_NONE                    0x1        // 000_0000 l.j
     178#  define OPERATION_BRANCH_L_TEST_NF               0x2        // 000_0000 l.bnf
     179#  define OPERATION_BRANCH_L_TEST_F                0x4        // 000_0000 l.bf
     180#  define OPERATION_BRANCH_L_JALR                  0x8        // 000_0000 l.jal   , l.jalr , l.jr
    172181
    173182  //-------------------------------------------------------[ Custom ]-----
     
    195204
    196205#  define SIZE_EXCEPTION                           5
     206#  define SIZE_EXCEPTION_USE                       4
     207#  define SIZE_EXCEPTION_MEMORY                    3
     208#  define SIZE_EXCEPTION_CUSTOM                    3
     209#  define SIZE_EXCEPTION_ALU                       2
     210#  define SIZE_EXCEPTION_DECOD                     2
     211#  define SIZE_EXCEPTION_IFETCH                    2
    197212
    198213#  define EXCEPTION_NONE                           0x00       // none exception
     
    229244#  define EXCEPTION_CUSTOM_6                       0x1f       // Reserved for custom exceptions
    230245
     246
    231247#define exception_to_address(x) (x<<8)
    232248
     
    253269#  define EXCEPTION_ALU_SPR_ACCESS_INVALID         0x2        // SPR     present in ALU but not compatible privilege
    254270#  define EXCEPTION_ALU_SPR_ACCESS_NOT_COMPLETE    0x3        // SPR not present in ALU
     271
     272#  define EXCEPTION_DECOD_NONE                     0x0        // none exception
     273#  define EXCEPTION_DECOD_ILLEGAL_INSTRUCTION      0x1        // Instruction is illegal (no implemented)
     274#  define EXCEPTION_DECOD_SYSCALL                  0x2        // System Call
     275//#define EXCEPTION_DECOD_TRAP                     0x4        // L.trap or debug unit (note : must read SR !)
     276
     277#  define EXCEPTION_IFETCH_NONE                    0x0        // Fetch Unit generate none exception
     278#  define EXCEPTION_IFETCH_INSTRUCTION_TLB         0x1        // ITLB miss
     279#  define EXCEPTION_IFETCH_INSTRUCTION_PAGE        0x2        // No matching or page violation protection in pages tables
     280#  define EXCEPTION_IFETCH_BUS_ERROR               0x3        // Access at a invalid physical address
     281
     282#  define EXCEPTION_USE_NONE                       0x0        //
     283#  define EXCEPTION_USE_ILLEGAL_INSTRUCTION        0x1        // illegal_instruction
     284#  define EXCEPTION_USE_RANGE                      0x2        // range
     285#  define EXCEPTION_USE_MEMORY_WITH_ALIGNMENT      0x3        // TLB miss, page fault, bus error, alignment
     286#  define EXCEPTION_USE_MEMORY_WITHOUT_ALIGNMENT   0x4        // TLB miss, page fault, bus error
     287#  define EXCEPTION_USE_SYSCALL                    0x5        // syscall
     288#  define EXCEPTION_USE_TRAP                       0x6        // trap
     289#  define EXCEPTION_USE_CUSTOM_0                   0x7        //
     290#  define EXCEPTION_USE_CUSTOM_1                   0x8        //
     291#  define EXCEPTION_USE_CUSTOM_2                   0x9        //
     292#  define EXCEPTION_USE_CUSTOM_3                   0xa        //
     293#  define EXCEPTION_USE_CUSTOM_4                   0xb        //
     294#  define EXCEPTION_USE_CUSTOM_5                   0xc        //
     295#  define EXCEPTION_USE_CUSTOM_6                   0xd        //
     296
     297  //=======================================================[ icache ]=====
     298
     299  //--------------------------------------------------[ icache_type ]-----
     300
     301#  define SIZE_ICACHE_TYPE                              2
     302
     303#  define ICACHE_TYPE_LOAD                              0x0        // 0000
     304#  define ICACHE_TYPE_LOCK                              0x1        // 0001
     305#  define ICACHE_TYPE_INVALIDATE                        0x2        // 0010
     306#  define ICACHE_TYPE_PREFETCH                          0x3        // 0011
     307
     308// just take the 2 less significative bits.
     309#define operation_to_icache_type(x) (x&0x3)
     310
     311  //-------------------------------------------------[ icache_error ]-----
     312
     313#  define SIZE_ICACHE_ERROR                             1
     314
     315#  define ICACHE_ERROR_NONE                             0x0
     316#  define ICACHE_ERROR_BUS_ERROR                        0x1
    255317
    256318  //=======================================================[ dcache ]=====
     
    377439#  define SPR_MACHI                                2          // MAC High
    378440
     441#  define NB_SPR_LOGIC                             2
     442#  define LOG2_NB_SPR_LOGIC                        1
     443  // SPR_LOGIC[0] = F
     444  // SPR_LOGIC[1] = Carry, Overflow
     445#  define SPR_LOGIC_SR_F                           0x0        // Status register bit F                   (size = 1)
     446#  define SPR_LOGIC_SR_CY_OV                       0x1        // Status register bit overflow and carry  (size = 2)
     447
    379448  //----------------------------------------------[ spr_mode_access ]-----
    380449
     
    385454#  define SPR_ACCESS_MODE_READ_ONLY_COND           0x5        // 101 special read
    386455
     456  //--------------------------------------------------------[ event ]-----
     457#  define SIZE_EVENT_STATE                         2
     458
     459#  define EVENT_STATE_NO_EVENT                     0          // no event : current case
     460#  define EVENT_STATE_EVENT                        1          // Have a event : make necessary to manage the event
     461#  define EVENT_STATE_WAITEND                      2          // Wait end of manage event (restaure a good context)
     462#  define EVENT_STATE_END                          3          // CPU can continue
     463
     464#  define SIZE_EVENT_TYPE                          3
     465
     466#  define EVENT_TYPE_NONE                          0          // no event
     467#  define EVENT_TYPE_MISS_SPECULATION              1          // miss of speculation (load or branch miss speculation)
     468#  define EVENT_TYPE_EXCEPTION                     2          // exception or interruption occure
     469#  define EVENT_TYPE_BRANCH_NO_ACCURATE            3          // branch is no accurate (old speculation is a miss)
     470#  define EVENT_TYPE_SPR_ACCESS                    4          // decod a mtspr or mfspr instruction
     471#  define EVENT_TYPE_MSYNC                         5          // decod a memory   synchronization
     472#  define EVENT_TYPE_PSYNC                         6          // decod a pipeline synchronization
     473#  define EVENT_TYPE_CSYNC                         7          // decod a context  synchronization
     474
     475  //-------------------------------------------------[ branch_state ]-----
     476#  define SIZE_BRANCH_STATE                        2
     477
     478#  define BRANCH_STATE_NONE                        0x0        // 0 0
     479#  define BRANCH_STATE_NSPEC_TAKE                  0x1        // 0 1  -> incondionnal
     480#  define BRANCH_STATE_SPEC_NTAKE                  0x2        // 1 0
     481#  define BRANCH_STATE_SPEC_TAKE                   0x3        // 1 1
     482
     483  //---------------------------------------------[ branch_condition ]-----
     484
     485#  define SIZE_BRANCH_CONDITION                    4
     486
     487#  define BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK          0x0        // None condition (jump)
     488#  define BRANCH_CONDITION_NONE_WITH_WRITE_STACK             0x8        // None condition (jump)
     489#  define BRANCH_CONDITION_FLAG_UNSET                        0x2        // Branch if Flag is clear
     490#  define BRANCH_CONDITION_FLAG_SET                          0x3        // Branch if Flag is set
     491#  define BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK 0x4        // Branch if a register is read
     492#  define BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK    0xc        // Branch if a register is read
     493#  define BRANCH_CONDITION_READ_STACK                        0xf        // Branch with pop  in stack pointer
     494
     495  //--------------------------------------------------[ instruction ]-----
     496#  define NB_INSTRUCTION                           213        // 92 ORBIS, 30 ORFPX (15 simple, 15 double), 91 ORVDX (38 on byte, 41 on half, 12 independant format)
     497
     498  enum
     499    {
     500      // ORBIS
     501      INSTRUCTION_L_ADD,
     502      INSTRUCTION_L_ADDC,
     503      INSTRUCTION_L_ADDI,
     504      INSTRUCTION_L_ADDIC,
     505      INSTRUCTION_L_AND,
     506      INSTRUCTION_L_ANDI,
     507      INSTRUCTION_L_BF,
     508      INSTRUCTION_L_BNF,
     509      INSTRUCTION_L_CMOV,
     510      INSTRUCTION_L_CSYNC,
     511      INSTRUCTION_L_CUST1,
     512      INSTRUCTION_L_CUST2,
     513      INSTRUCTION_L_CUST3,
     514      INSTRUCTION_L_CUST4,
     515      INSTRUCTION_L_CUST5,
     516      INSTRUCTION_L_CUST6,
     517      INSTRUCTION_L_CUST7,
     518      INSTRUCTION_L_CUST8,
     519      INSTRUCTION_L_DIV,
     520      INSTRUCTION_L_DIVU,
     521      INSTRUCTION_L_EXTBS,
     522      INSTRUCTION_L_EXTBZ,
     523      INSTRUCTION_L_EXTHS,
     524      INSTRUCTION_L_EXTHZ,
     525      INSTRUCTION_L_EXTWS,
     526      INSTRUCTION_L_EXTWZ,
     527      INSTRUCTION_L_FF1,
     528      INSTRUCTION_L_FL1,
     529      INSTRUCTION_L_J,
     530      INSTRUCTION_L_JAL,
     531      INSTRUCTION_L_JALR,
     532      INSTRUCTION_L_JR,
     533      INSTRUCTION_L_LBS,
     534      INSTRUCTION_L_LBZ,
     535      INSTRUCTION_L_LD,
     536      INSTRUCTION_L_LHS,
     537      INSTRUCTION_L_LHZ,
     538      INSTRUCTION_L_LWS,
     539      INSTRUCTION_L_LWZ,
     540      INSTRUCTION_L_MAC,
     541      INSTRUCTION_L_MACI,
     542      INSTRUCTION_L_MACRC,
     543      INSTRUCTION_L_MFSPR,
     544      INSTRUCTION_L_MOVHI,
     545      INSTRUCTION_L_MSB,
     546      INSTRUCTION_L_MSYNC,
     547      INSTRUCTION_L_MTSPR,
     548      INSTRUCTION_L_MUL,
     549      INSTRUCTION_L_MULI,
     550      INSTRUCTION_L_MULU,
     551      INSTRUCTION_L_NOP,
     552      INSTRUCTION_L_OR,
     553      INSTRUCTION_L_ORI,
     554      INSTRUCTION_L_PSYNC,
     555      INSTRUCTION_L_RFE,
     556      INSTRUCTION_L_ROR,
     557      INSTRUCTION_L_RORI,
     558      INSTRUCTION_L_SB,
     559      INSTRUCTION_L_SD,
     560      INSTRUCTION_L_SFEQ,
     561      INSTRUCTION_L_SFEQI,
     562      INSTRUCTION_L_SFGES,
     563      INSTRUCTION_L_SFGESI,
     564      INSTRUCTION_L_SFGEU,
     565      INSTRUCTION_L_SFGEUI,
     566      INSTRUCTION_L_SFGTS,
     567      INSTRUCTION_L_SFGTSI,
     568      INSTRUCTION_L_SFGTU,
     569      INSTRUCTION_L_SFGTUI,
     570      INSTRUCTION_L_SFLES,
     571      INSTRUCTION_L_SFLESI,
     572      INSTRUCTION_L_SFLEU,
     573      INSTRUCTION_L_SFLEUI,
     574      INSTRUCTION_L_SFLTS,
     575      INSTRUCTION_L_SFLTSI,
     576      INSTRUCTION_L_SFLTU,
     577      INSTRUCTION_L_SFLTUI,
     578      INSTRUCTION_L_SFNE,
     579      INSTRUCTION_L_SFNEI,
     580      INSTRUCTION_L_SH,
     581      INSTRUCTION_L_SLL,
     582      INSTRUCTION_L_SLLI,
     583      INSTRUCTION_L_SRA,
     584      INSTRUCTION_L_SRAI,
     585      INSTRUCTION_L_SRL,
     586      INSTRUCTION_L_SRLI,
     587      INSTRUCTION_L_SUB,
     588      INSTRUCTION_L_SW,
     589      INSTRUCTION_L_SYS,
     590      INSTRUCTION_L_TRAP,
     591      INSTRUCTION_L_XOR,
     592      INSTRUCTION_L_XORI,
     593      // ORFPX
     594      INSTRUCTION_LF_ADD_D,
     595      INSTRUCTION_LF_ADD_S,
     596      INSTRUCTION_LF_CUST1_D,
     597      INSTRUCTION_LF_CUST1_S,
     598      INSTRUCTION_LF_DIV_D,
     599      INSTRUCTION_LF_DIV_S,
     600      INSTRUCTION_LF_FTOI_D,
     601      INSTRUCTION_LF_FTOI_S,
     602      INSTRUCTION_LF_ITOF_D,
     603      INSTRUCTION_LF_ITOF_S,
     604      INSTRUCTION_LF_MADD_D,
     605      INSTRUCTION_LF_MADD_S,
     606      INSTRUCTION_LF_MUL_D,
     607      INSTRUCTION_LF_MUL_S,
     608      INSTRUCTION_LF_REM_D,
     609      INSTRUCTION_LF_REM_S,
     610      INSTRUCTION_LF_SFEQ_D,
     611      INSTRUCTION_LF_SFEQ_S,
     612      INSTRUCTION_LF_SFGE_D,
     613      INSTRUCTION_LF_SFGE_S,
     614      INSTRUCTION_LF_SFGT_D,
     615      INSTRUCTION_LF_SFGT_S,
     616      INSTRUCTION_LF_SFLE_D,
     617      INSTRUCTION_LF_SFLE_S,
     618      INSTRUCTION_LF_SFLT_D,
     619      INSTRUCTION_LF_SFLT_S,
     620      INSTRUCTION_LF_SFNE_D,
     621      INSTRUCTION_LF_SFNE_S,
     622      INSTRUCTION_LF_SUB_D,
     623      INSTRUCTION_LF_SUB_S,
     624      // ORVDX
     625      INSTRUCTION_LV_ADD_B,
     626      INSTRUCTION_LV_ADD_H,
     627      INSTRUCTION_LV_ADDS_B,
     628      INSTRUCTION_LV_ADDS_H,
     629      INSTRUCTION_LV_ADDU_B,
     630      INSTRUCTION_LV_ADDU_H,
     631      INSTRUCTION_LV_ADDUS_B,
     632      INSTRUCTION_LV_ADDUS_H,
     633      INSTRUCTION_LV_ALL_EQ_B,
     634      INSTRUCTION_LV_ALL_EQ_H,
     635      INSTRUCTION_LV_ALL_GE_B,
     636      INSTRUCTION_LV_ALL_GE_H,
     637      INSTRUCTION_LV_ALL_GT_B,
     638      INSTRUCTION_LV_ALL_GT_H,
     639      INSTRUCTION_LV_ALL_LE_B,
     640      INSTRUCTION_LV_ALL_LE_H,
     641      INSTRUCTION_LV_ALL_LT_B,
     642      INSTRUCTION_LV_ALL_LT_H,
     643      INSTRUCTION_LV_ALL_NE_B,
     644      INSTRUCTION_LV_ALL_NE_H,
     645      INSTRUCTION_LV_AND,
     646      INSTRUCTION_LV_ANY_EQ_B,
     647      INSTRUCTION_LV_ANY_EQ_H,
     648      INSTRUCTION_LV_ANY_GE_B,
     649      INSTRUCTION_LV_ANY_GE_H,
     650      INSTRUCTION_LV_ANY_GT_B,
     651      INSTRUCTION_LV_ANY_GT_H,
     652      INSTRUCTION_LV_ANY_LE_B,
     653      INSTRUCTION_LV_ANY_LE_H,
     654      INSTRUCTION_LV_ANY_LT_B,
     655      INSTRUCTION_LV_ANY_LT_H,
     656      INSTRUCTION_LV_ANY_NE_B,
     657      INSTRUCTION_LV_ANY_NE_H,
     658      INSTRUCTION_LV_AVG_B,
     659      INSTRUCTION_LV_AVG_H,
     660      INSTRUCTION_LV_CMP_EQ_B,
     661      INSTRUCTION_LV_CMP_EQ_H,
     662      INSTRUCTION_LV_CMP_GE_B,
     663      INSTRUCTION_LV_CMP_GE_H,
     664      INSTRUCTION_LV_CMP_GT_B,
     665      INSTRUCTION_LV_CMP_GT_H,
     666      INSTRUCTION_LV_CMP_LE_B,
     667      INSTRUCTION_LV_CMP_LE_H,
     668      INSTRUCTION_LV_CMP_LT_B,
     669      INSTRUCTION_LV_CMP_LT_H,
     670      INSTRUCTION_LV_CMP_NE_B,
     671      INSTRUCTION_LV_CMP_NE_H,
     672      INSTRUCTION_LV_CUST1,
     673      INSTRUCTION_LV_CUST2,
     674      INSTRUCTION_LV_CUST3,
     675      INSTRUCTION_LV_CUST4,
     676      INSTRUCTION_LV_MADDS_H,
     677      INSTRUCTION_LV_MAX_B,
     678      INSTRUCTION_LV_MAX_H,
     679      INSTRUCTION_LV_MERGE_B,
     680      INSTRUCTION_LV_MERGE_H,
     681      INSTRUCTION_LV_MIN_B,
     682      INSTRUCTION_LV_MIN_H,
     683      INSTRUCTION_LV_MSUBS_H,
     684      INSTRUCTION_LV_MULS_H,
     685      INSTRUCTION_LV_NAND,
     686      INSTRUCTION_LV_NOR,
     687      INSTRUCTION_LV_OR,
     688      INSTRUCTION_LV_PACK_B,
     689      INSTRUCTION_LV_PACK_H,
     690      INSTRUCTION_LV_PACKS_B,
     691      INSTRUCTION_LV_PACKS_H,
     692      INSTRUCTION_LV_PACKUS_B,
     693      INSTRUCTION_LV_PACKUS_H,
     694      INSTRUCTION_LV_PERM_N,
     695      INSTRUCTION_LV_RL_B,
     696      INSTRUCTION_LV_RL_H,
     697      INSTRUCTION_LV_SLL,
     698      INSTRUCTION_LV_SLL_B,
     699      INSTRUCTION_LV_SLL_H,
     700      INSTRUCTION_LV_SRA_B,
     701      INSTRUCTION_LV_SRA_H,
     702      INSTRUCTION_LV_SRL,
     703      INSTRUCTION_LV_SRL_B,
     704      INSTRUCTION_LV_SRL_H,
     705      INSTRUCTION_LV_SUB_B,
     706      INSTRUCTION_LV_SUB_H,
     707      INSTRUCTION_LV_SUBS_B,
     708      INSTRUCTION_LV_SUBS_H,
     709      INSTRUCTION_LV_SUBU_B,
     710      INSTRUCTION_LV_SUBU_H,
     711      INSTRUCTION_LV_SUBUS_B,
     712      INSTRUCTION_LV_SUBUS_H,
     713      INSTRUCTION_LV_UNPACK_B,
     714      INSTRUCTION_LV_UNPACK_H,
     715      INSTRUCTION_LV_XOR
     716    };
     717
     718  //-----------------------------------------------[ Code Operation ]-----
     719
     720#  define MAX_OPCOD_0                              64            // Instructions with immediat
     721#  define MAX_OPCOD_1                              64            // Instruction ORFPX32/64                 
     722#  define MAX_OPCOD_2                              256           // Instruction ORVDX64
     723#  define MAX_OPCOD_3                              256           // Instructions Register-Register
     724#  define MAX_OPCOD_4                              32            // Instructions "set flag" with register
     725#  define MAX_OPCOD_5                              32            // Instructions "set flag" with immediat
     726#  define MAX_OPCOD_6                              4             // Instruction Shift/Rotate with immediat
     727#  define MAX_OPCOD_7                              16            // Instructions multiply with HI-LO
     728#  define MAX_OPCOD_8                              2             // Instructions acces at HI-LO
     729#  define MAX_OPCOD_9                              8             // Instructions special       
     730#  define MAX_OPCOD_10                             4             // Instructions no operation
     731#  define MAX_OPCOD_11                             4             // Instruction Shift/Rotate with register
     732#  define MAX_OPCOD_12                             4             // Instructions extend
     733#  define MAX_OPCOD_13                             4             // Instructions extend (64b)
     734
     735// OPCOD_0                                         - [31:26]      Instructions with immediat
     736#  define OPCOD_L_J                                0x00          // 000_000
     737#  define OPCOD_L_JAL                              0x01          // 000_001
     738#  define OPCOD_L_BNF                              0x03          // 000_011
     739#  define OPCOD_L_BF                               0x04          // 000_100
     740#  define OPCOD_L_RFE                              0x09          // 001_001
     741#  define OPCOD_L_JR                               0x11          // 010_001
     742#  define OPCOD_L_JALR                             0x12          // 010_010
     743#  define OPCOD_L_MACI                             0x13          // 010_011
     744#  define OPCOD_L_CUST1                            0x1c          // 011_100
     745#  define OPCOD_L_CUST2                            0x1d          // 011_101
     746#  define OPCOD_L_CUST3                            0x1e          // 011_110
     747#  define OPCOD_L_CUST4                            0x1f          // 011_111
     748#  define OPCOD_L_CUST5                            0x3c          // 111_100
     749#  define OPCOD_L_CUST6                            0x3d          // 111_101
     750#  define OPCOD_L_CUST7                            0x3e          // 111_110
     751#  define OPCOD_L_CUST8                            0x3f          // 111_111
     752#  define OPCOD_L_LD                               0x20          // 100_000
     753#  define OPCOD_L_LWZ                              0x21          // 100_001
     754#  define OPCOD_L_LWS                              0x22          // 100_010
     755#  define OPCOD_L_LBZ                              0x23          // 100_011
     756#  define OPCOD_L_LBS                              0x24          // 100_100
     757#  define OPCOD_L_LHZ                              0x25          // 100_101
     758#  define OPCOD_L_LHS                              0x26          // 100_110
     759#  define OPCOD_L_ADDI                             0x27          // 100_111
     760#  define OPCOD_L_ADDIC                            0x28          // 101_000
     761#  define OPCOD_L_ANDI                             0x29          // 101_001
     762#  define OPCOD_L_ORI                              0x2a          // 101_010
     763#  define OPCOD_L_XORI                             0x2b          // 101_011
     764#  define OPCOD_L_MULI                             0x2c          // 101_100
     765#  define OPCOD_L_MFSPR                            0x2d          // 101_101
     766#  define OPCOD_L_MTSPR                            0x30          // 110_000
     767#  define OPCOD_L_SD                               0x34          // 110_100
     768#  define OPCOD_L_SW                               0x35          // 110_101
     769#  define OPCOD_L_SB                               0x36          // 110_110
     770#  define OPCOD_L_SH                               0x37          // 110_111
     771                                                   
     772#  define OPCOD_1                                  0x33          // 110_011         // Instruction ORFPX32/64
     773#  define OPCOD_2                                  0x0a          // 001_010         // Instruction ORVDX64
     774#  define OPCOD_3                                  0x38          // 111_000         // Instructions Register-Register
     775#  define OPCOD_4                                  0x39          // 111_001         // Instructions "set flag" with register
     776#  define OPCOD_5                                  0x2f          // 101_111         // Instructions "set flag" with immediat
     777#  define OPCOD_6                                  0x2e          // 101_110         // Instruction Shift/Rotate with immediat
     778#  define OPCOD_7                                  0x31          // 110_001         // Instructions multiply with HI-LO
     779#  define OPCOD_8                                  0x06          // 000_110         // Instructions acces at HI-LO
     780#  define OPCOD_9                                  0x08          // 001_000         // Instructions special
     781#  define OPCOD_10                                 0x05          // 000_101         // Instructions no operation
     782                                                   
     783// OPCOD_3         instructions                    - [9:8] [3:0]  Instructions Register-Register
     784#  define OPCOD_L_ADD                              0x00          // 00_0000
     785#  define OPCOD_L_ADDC                             0x01          // 00_0001
     786#  define OPCOD_L_SUB                              0x02          // 00_0010
     787#  define OPCOD_L_AND                              0x03          // 00_0011
     788#  define OPCOD_L_OR                               0x04          // 00_0100
     789#  define OPCOD_L_XOR                              0x05          // 00_0101
     790#  define OPCOD_L_CMOV                             0x0e          // 00_1110
     791#  define OPCOD_L_FF1                              0x0f          // 00_1111
     792#  define OPCOD_L_FL1                              0x1f          // 01_1111
     793#  define OPCOD_L_MUL                              0x36          // 11_0110
     794#  define OPCOD_L_DIV                              0x39          // 11_1001
     795#  define OPCOD_L_DIVU                             0x3a          // 11_1010
     796#  define OPCOD_L_MULU                             0x3b          // 11_1011
     797                                                   
     798#  define OPCOD_11                                 0x8           // 1000          // Instruction Shift/Rotate with register
     799#  define OPCOD_12                                 0xc           // 1100          // Instructions extend
     800#  define OPCOD_13                                 0xd           // 1101          // Instructions extend (64b)
     801                                                   
     802// OPCOD_4         instructions                    - [25:21]      Instructions "set flag" with register
     803#  define OPCOD_L_SFEQ                             0x00          // 00000
     804#  define OPCOD_L_SFNE                             0x01          // 00001
     805#  define OPCOD_L_SFGTU                            0x02          // 00010
     806#  define OPCOD_L_SFGEU                            0x03          // 00011
     807#  define OPCOD_L_SFLTU                            0x04          // 00100
     808#  define OPCOD_L_SFLEU                            0x05          // 00101
     809#  define OPCOD_L_SFGTS                            0x0a          // 01010
     810#  define OPCOD_L_SFGES                            0x0b          // 01011
     811#  define OPCOD_L_SFLTS                            0x0c          // 01100
     812#  define OPCOD_L_SFLES                            0x0d          // 01101
     813                                                   
     814// OPCOD_5         instructions                    - [25:21]      Instructions "set flag" with immediat
     815#  define OPCOD_L_SFEQI                            0x00          // 00000
     816#  define OPCOD_L_SFNEI                            0x01          // 00001
     817#  define OPCOD_L_SFGTUI                           0x02          // 00010
     818#  define OPCOD_L_SFGEUI                           0x03          // 00011
     819#  define OPCOD_L_SFLTUI                           0x04          // 00100
     820#  define OPCOD_L_SFLEUI                           0x05          // 00101
     821#  define OPCOD_L_SFGTSI                           0x0a          // 01010
     822#  define OPCOD_L_SFGESI                           0x0b          // 01011
     823#  define OPCOD_L_SFLTSI                           0x0c          // 01100
     824#  define OPCOD_L_SFLESI                           0x0d          // 01101
     825                                                   
     826// OPCOD_6         instructions                    - [7:6]        Instruction Shift/Rotate with immediat
     827#  define OPCOD_L_SLLI                             0x0           // 00
     828#  define OPCOD_L_SRLI                             0x1           // 01
     829#  define OPCOD_L_SRAI                             0x2           // 10
     830#  define OPCOD_L_RORI                             0x3           // 11
     831                                                   
     832// OPCOD_7         instructions                    - [3:0]        Instructions multiply with HI-LO
     833#  define OPCOD_L_MAC                              0x1           // 0001
     834#  define OPCOD_L_MSB                              0x2           // 0010
     835                                                   
     836// OPCOD_8         instructions                    - [17]         Instructions acces at HI-LO
     837#  define OPCOD_L_MOVHI                            0x0           // 0
     838#  define OPCOD_L_MACRC                            0x1           // 1
     839
     840// OPCOD_9         instructions                    - [25:23]      Instruction special
     841#  define OPCOD_L_SYS                              0x0           // 000
     842#  define OPCOD_L_TRAP                             0x2           // 010
     843#  define OPCOD_L_MSYNC                            0x4           // 100
     844#  define OPCOD_L_PSYNC                            0x5           // 101
     845#  define OPCOD_L_CSYNC                            0x6           // 110
     846
     847// OPCOD_10        instructions                    - [25:24]      Instruction no operation
     848#  define OPCOD_L_NOP                              0x1           // 01
     849                                                   
     850// OPCOD_11        instructions                    - [7:6]        Instruction Shift/Rotate with register
     851#  define OPCOD_L_SLL                              0x0           // 00
     852#  define OPCOD_L_SRL                              0x1           // 01
     853#  define OPCOD_L_SRA                              0x2           // 10
     854#  define OPCOD_L_ROR                              0x3           // 11
     855                                                   
     856// OPCOD_12        instructions                    - [9:6]          Instructions extend
     857#  define OPCOD_L_EXTHS                            0x0           // 0000
     858#  define OPCOD_L_EXTHZ                            0x2           // 0010
     859#  define OPCOD_L_EXTBS                            0x1           // 0001
     860#  define OPCOD_L_EXTBZ                            0x3           // 0011
     861                                                   
     862// OPCOD_13        instructions                    - [9:6]        Instructions extend (64b)
     863#  define OPCOD_L_EXTWS                            0x0           // 0000
     864#  define OPCOD_L_EXTWZ                            0x1           // 0001
     865
    387866  /*
    388 #define                 _size_instruction             32
    389 #define                 _size_instruction_log2        5
    390 
    391   //----------------------------------------------------[ Operation ]-----
    392 // #define                 _nb_operation                 32
    393 // #define                 _size_operation               5
    394 
    395 #define                 _operation_none               0x0
    396 #define                 _operation_l_adds             0x1
    397 #define                 _operation_l_addu             0x2
    398 #define                 _operation_l_subs             0x3
    399 #define                 _operation_l_and              0x4
    400 #define                 _operation_l_or               0x5
    401 #define                 _operation_l_xor              0x6
    402 #define                 _operation_l_cmove            0x7
    403 #define                 _operation_l_read_imm         0x8
    404 #define                 _operation_l_movhi            0x9
    405 #define                 _operation_l_muls             0xa
    406 #define                 _operation_l_mulu             0xb
    407 #define                 _operation_l_divs             0xc
    408 #define                 _operation_l_divu             0xd
    409 #define                 _operation_l_exts             0xe
    410 #define                 _operation_l_extz             0xf
    411 #define                 _operation_l_ff1              0x10
    412 #define                 _operation_l_fl1              0x11
    413 #define                 _operation_l_sll              0x12
    414 #define                 _operation_l_sla              0x13
    415 #define                 _operation_l_srl              0x14
    416 #define                 _operation_l_ror              0x15
    417 #define                 _operation_l_cmp_eq           0x16
    418 #define                 _operation_l_cmp_ne           0x17
    419 #define                 _operation_l_cmp_ges          0x18
    420 #define                 _operation_l_cmp_geu          0x19
    421 #define                 _operation_l_cmp_gts          0x1a
    422 #define                 _operation_l_cmp_gtu          0x1b
    423 #define                 _operation_l_cmp_les          0x1c
    424 #define                 _operation_l_cmp_leu          0x1d
    425 #define                 _operation_l_cmp_lts          0x1e
    426 #define                 _operation_l_cmp_ltu          0x1f
    427867
    428868  //--------------------------------------------------[ destination ]-----
     
    466906#define                 mask_CONDITION_STACK          0x8           // Branch with pop  in stack pointer
    467907
    468   //-------------------------------------------------[ branch_state ]-----
    469 #define                 cst_BRANCH_STATE_NONE         0x0           // 0 0
    470 #define                 cst_BRANCH_STATE_NSPEC_TAKE   0x1           // 0 1  -> incondionnal
    471 #define                 cst_BRANCH_STATE_SPEC_NTAKE   0x2           // 1 0
    472 #define                 cst_BRANCH_STATE_SPEC_TAKE    0x3           // 1 1
    473908  */
    474909
     
    6201055
    6211056  /*
    622 //----------------------------------------------------
    623 // Code Operation (before decode)
    624 //----------------------------------------------------
    625 
    626 // Codop                        - [31:26]      Instructions with immediat
    627 #define OPCOD_L_J             0x00          // 000_000
    628 #define OPCOD_L_JAL           0x01          // 000_001
    629 #define OPCOD_L_BNF           0x03          // 000_011
    630 #define OPCOD_L_BF            0x04          // 000_100
    631 #define OPCOD_L_RFE           0x09          // 001_001
    632 #define OPCOD_L_JR            0x11          // 010_001
    633 #define OPCOD_L_JALR          0x12          // 010_010
    634 #define OPCOD_L_MACI          0x13          // 010_011
    635 #define OPCOD_L_CUST1         0x1c          // 011_100
    636 #define OPCOD_L_CUST2         0x1d          // 011_101
    637 #define OPCOD_L_CUST3         0x1e          // 011_110
    638 #define OPCOD_L_CUST4         0x1f          // 011_111
    639 #define OPCOD_L_CUST5         0x3c          // 111_100
    640 #define OPCOD_L_CUST6         0x3d          // 111_101
    641 #define OPCOD_L_CUST7         0x3e          // 111_110
    642 #define OPCOD_L_CUST8         0x3f          // 111_111
    643 #define OPCOD_L_LD            0x20          // 100_000
    644 #define OPCOD_L_LWZ           0x21          // 100_001
    645 #define OPCOD_L_LWS           0x22          // 100_010
    646 #define OPCOD_L_LBZ           0x23          // 100_011
    647 #define OPCOD_L_LBS           0x24          // 100_100
    648 #define OPCOD_L_LHZ           0x25          // 100_101
    649 #define OPCOD_L_LHS           0x26          // 100_110
    650 #define OPCOD_L_ADDI          0x27          // 100_111
    651 #define OPCOD_L_ADDIC         0x28          // 101_000
    652 #define OPCOD_L_ANDI          0x29          // 101_001
    653 #define OPCOD_L_ORI           0x2a          // 101_010
    654 #define OPCOD_L_XORI          0x2b          // 101_011
    655 #define OPCOD_L_MULI          0x2c          // 101_100
    656 #define OPCOD_L_MFSPR         0x2d          // 101_101
    657 #define OPCOD_L_MTSPR         0x30          // 110_000
    658 #define OPCOD_L_SD            0x32          // 110_010
    659 #define OPCOD_L_SW            0x35          // 110_101
    660 #define OPCOD_L_SB            0x36          // 110_110
    661 #define OPCOD_L_SH            0x37          // 110_111
    662 
    663 #define OPCOD_INST_LV         0x0a          // 001_010         // Instruction ORVDX64
    664 #define OPCOD_INST_LF         0x33          // 110_011         // Instruction ORFPX32/64
    665 
    666 #define OPCOD_SPECIAL         0x38          // 111_000         // Instructions Register-Register
    667 #define OPCOD_SPECIAL_1       0x39          // 111_001         // Instructions "set flag" with register
    668 #define OPCOD_SPECIAL_2       0x2f          // 101_111         // Instructions "set flag" with immediat
    669 #define OPCOD_SPECIAL_6       0x2e          // 101_110         // Instruction Shift/Rotate with immediat
    670 #define OPCOD_SPECIAL_7       0x31          // 110_001         // Instructions multiply with HI-LO
    671 #define OPCOD_SPECIAL_8       0x06          // 000_110         // Instructions acces at HI-LO
    672 
    673 // OPCOD_SPECIAL   instructions - [9:8] [3:0]  Instructions Register-Register
    674 #define OPCOD_L_ADD           0x00          // 00_0000
    675 #define OPCOD_L_ADDC          0x01          // 00_0001
    676 #define OPCOD_L_SUB           0x02          // 00_0010
    677 #define OPCOD_L_AND           0x03          // 00_0011
    678 #define OPCOD_L_OR            0x04          // 00_0100
    679 #define OPCOD_L_XOR           0x05          // 00_0101
    680 #define OPCOD_L_CMOV          0x0e          // 00_1110
    681 #define OPCOD_L_FF1           0x0f          // 00_1111
    682 #define OPCOD_L_FL1           0x1f          // 01_1111
    683 #define OPCOD_L_MUL           0x36          // 11_0110
    684 #define OPCOD_L_DIV           0x39          // 11_1001
    685 #define OPCOD_L_DIVU          0x3a          // 11_1010
    686 #define OPCOD_L_MULU          0x3b          // 11_1011
    687 
    688 #define OPCOD_SPECIAL_3       0xc           // 1100          // Instructions extend
    689 #define OPCOD_SPECIAL_4       0xd           // 1101          // Instructions extend (64b)
    690 #define OPCOD_SPECIAL_5       0x8           // 1000          // Instruction Shift/Rotate with register
    691 
    692 // OPCOD_SPECIAL_1 instructions - [25:21]      Instructions "set flag" with register
    693 #define OPCOD_L_SFEQ          0x00          // 00000
    694 #define OPCOD_L_SFNE          0x01          // 00001
    695 #define OPCOD_L_SFGTU         0x02          // 00010
    696 #define OPCOD_L_SFGEU         0x03          // 00011
    697 #define OPCOD_L_SFLTU         0x04          // 00100
    698 #define OPCOD_L_SFLEU         0x05          // 00101
    699 #define OPCOD_L_SFGTS         0x0a          // 01010
    700 #define OPCOD_L_SFGES         0x0b          // 01011
    701 #define OPCOD_L_SFLTS         0x0c          // 01100
    702 #define OPCOD_L_SFLES         0x0d          // 01101
    703 
    704 // OPCOD_SPECIAL_2 instructions - [25:21]      Instructions "set flag" with immediat
    705 #define OPCOD_L_SFEQI         0x00          // 00000
    706 #define OPCOD_L_SFNEI         0x01          // 00001
    707 #define OPCOD_L_SFGTUI        0x02          // 00010
    708 #define OPCOD_L_SFGEUI        0x03          // 00011
    709 #define OPCOD_L_SFLTUI        0x04          // 00100
    710 #define OPCOD_L_SFLEUI        0x05          // 00101
    711 #define OPCOD_L_SFGTSI        0x0a          // 01010
    712 #define OPCOD_L_SFGESI        0x0b          // 01011
    713 #define OPCOD_L_SFLTSI        0x0c          // 01100
    714 #define OPCOD_L_SFLESI        0x0d          // 01101
    715 
    716 // OPCOD_SPECIAL_3 instructions - [9:6]          Instructions extend
    717 #define OPCOD_L_EXTHS         0x0           // 0000
    718 #define OPCOD_L_EXTHZ         0x2           // 0010
    719 #define OPCOD_L_EXTBS         0x1           // 0001
    720 #define OPCOD_L_EXTBZ         0x3           // 0011
    721 
    722 // OPCOD_SPECIAL_4 instructions - [9:6]        Instructions extend (64b)
    723 #define OPCOD_L_EXTWS         0x0           // 0000
    724 #define OPCOD_L_EXTWZ         0x1           // 0001
    725 
    726 // OPCOD_SPECIAL_5 instructions - [7:6]        Instruction Shift/Rotate with register
    727 #define OPCOD_L_SLL           0x0           // 00
    728 #define OPCOD_L_SRL           0x1           // 01
    729 #define OPCOD_L_SRA           0x2           // 10
    730 #define OPCOD_L_ROR           0x3           // 11
    731 
    732 // OPCOD_SPECIAL_6 instructions - [7:6]        Instruction Shift/Rotate with immediat
    733 #define OPCOD_L_SLLI          0x0           // 00
    734 #define OPCOD_L_SRLI          0x1           // 01
    735 #define OPCOD_L_SRAI          0x2           // 10
    736 #define OPCOD_L_RORI          0x3           // 11
    737 
    738 // OPCOD_SPECIAL_7 instructions - [3:0]        Instructions multiply with HI-LO
    739 #define OPCOD_L_MAC           0x1           // 0001
    740 #define OPCOD_L_MSB           0x2           // 0010
    741 
    742 // OPCOD_SPECIAL_8 instructions - [17]         Instructions acces at HI-LO
    743 #define OPCOD_L_MOVHI         0x0           // 0
    744 #define OPCOD_L_MACRC         0x1           // 1
    745 
    746 // Particular case                             Instructions systems
    747 #define OPCOD_L_MSYNC         0x22000000
    748 #define OPCOD_L_CSYNC         0x23000000
    749 #define OPCOD_L_PSYNC         0x22800000
    750 #define OPCOD_L_NOP           0x1500
    751 #define OPCOD_L_SYS           0x2000
    752 #define OPCOD_L_TRAP          0x2100
    753 
    754 //----------------------------------------------------
    755 // Code Operation (after decode)
    756 //----------------------------------------------------
    757 
    758 typedef enum
    759   {
    760     // ##### WARNING : This opcode must be the first#####
    761     INST_L_NO_IMPLEMENTED ,         // Operation is not implemented
    762 
    763     INST_L_ADD            ,         // L.ADD    , L.ADDI   , L.ADDC   , L.ADDIC
    764     INST_L_AND            ,         // L.AND    , L.ANDI
    765     INST_L_OR             ,         // L.OR     , L.ORI
    766     INST_L_XOR            ,         // L.XOR    , L.XORI
    767     INST_L_CMOV           ,         // L.CMOV
    768     INST_L_SUB            ,         // L.SUB
    769     INST_L_FF1            ,         // L.FF1
    770     INST_L_EXTBS          ,         // L.EXTBS
    771     INST_L_EXTBZ          ,         // L.EXTBZ
    772     INST_L_EXTHS          ,         // L.EXTHS
    773     INST_L_EXTHZ          ,         // L.EXTHZ
    774     INST_L_EXTWS          ,         // L.EXTWS
    775     INST_L_EXTWZ          ,         // L.EXTWZ
    776     INST_L_e              ,         //
    777     INST_L_f              ,         //
    778     INST_L_MUL            ,         // L.MUL    , L.MULI
    779     INST_L_MULU           ,         // L.MULU
    780     INST_L_DIV            ,         // L.DIV
    781     INST_L_DIVU           ,         // L.DIVU
    782     INST_L_SLL            ,         // L.SLL    , L.SLLI
    783     INST_L_SRL            ,         // L.SRL    , L.SRLI
    784     INST_L_SRA            ,         // L.SRA    , L.SRAI
    785     INST_L_ROR            ,         // L.ROR    , L.RORI
    786     INST_L_SFGES          ,         // L.SFGES  , L.SFGESI
    787     INST_L_SFGEU          ,         // L.SFGEU  , L.SFGEUI
    788     INST_L_SFGTS          ,         // L.SFGTS  , L.SFGTSI
    789     INST_L_SFGTU          ,         // L.SFGTU  , L.SFGTUI
    790     INST_L_SFLES          ,         // L.SFLES  , L.SFLESI
    791     INST_L_SFLEU          ,         // L.SFLEU  , L.SFLEUI
    792     INST_L_SFLTS          ,         // L.SFLTS  , L.SFLTSI
    793     INST_L_SFLTU          ,         // L.SFLTU  , L.SFLTUI
    794     INST_L_SFEQ           ,         // L.SFEQ   , L.SFEQI
    795     INST_L_SFNE           ,         // L.SFNE   , L.SFNEI
    796     INST_L_READ           ,         // L.BNF    , L.BF     , L.JR
    797     INST_L_MOVHI          ,         // L.MOVI
    798     INST_L_CSYNC          ,         // L.CSYNC
    799     INST_L_MSYNC          ,         // L.MSYNC
    800     INST_L_PSYNC          ,         // L.PSYNC
    801     INST_L_RFE            ,         // L.RFE
    802     INST_L_MAC            ,         // L.MAC    , L.MACI
    803     INST_L_MSB            ,         // L.MSB
    804     INST_L_MACRC          ,         // L.MACRC
    805     INST_L_2b             ,         //
    806     INST_L_MEMB           ,         // L.LBS    , L.LBZ    , L.SB 
    807     INST_L_MEMH           ,         // L.LHS    , L.LHZ    , L.SH
    808     INST_L_MEMW           ,         // L.LWS    , L.LWZ    , L.SW 
    809     INST_L_MEMD           ,         // L.LD                , L.SD 
    810     INST_L_CUST1          ,         // L.CUST1
    811     INST_L_CUST2          ,         // L.CUST2
    812     INST_L_CUST3          ,         // L.CUST3
    813     INST_L_CUST4          ,         // L.CUST4
    814     INST_L_CUST5          ,         // L.CUST5
    815     INST_L_CUST6          ,         // L.CUST6
    816     INST_L_CUST7          ,         // L.CUST7
    817     INST_L_CUST8          ,         // L.CUST8
    818     INST_L_38             ,         //
    819     INST_L_39             ,         //
    820     INST_L_3a             ,         //
    821     INST_L_3b             ,         //
    822     INST_L_3c             ,         // 
    823     INST_L_3d             ,         // 
    824     INST_L_3e             ,         // 
    825     INST_NOP                        // L.NOP
    826   } opcod_t;
    827 
    828 #define LOG2_NB_INST_L        6
    829 #define      NB_INST_L        64 // +1 -> INST_L_NO_IMPLEMENTED
    830 //#define      NB_INST_L        (INST_L_NO_IMPLEMENTED+1)
    8311057  */
    8321058
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h

    r77 r78  
    22#define Debug_component_H
    33
    4 #define DEBUG_Behavioural                                         false
    5 #define   DEBUG_Generic                                           false
    6 #define     DEBUG_Counter                                         false
    7 #define     DEBUG_Group                                           false
    8 #define     DEBUG_Queue                                           false
    9 #define     DEBUG_Queue_Control                                   false
    10 #define     DEBUG_Shifter                                         false
    11 #define     DEBUG_RegisterFile                                    false
    12 #define       DEBUG_RegisterFile_Monolithic                       false
    13 #define       DEBUG_RegisterFile_Multi_Banked                     false
    14 #define     DEBUG_Select                                          false
    15 #define       DEBUG_Select_Priority_Fixed                         false
    16 #define     Debug_Victim                                          false
    17 #define       DEBUG_Victim_Pseudo_LRU                             false
    18 #define   DEBUG_Core                                              false
    19 #define     DEBUG_Multi_Execute_loop                              false
    20 #define       DEBUG_Execute_loop                                  false
    21 #define         DEBUG_Multi_Execute_unit                          false
    22 #define           DEBUG_Execute_unit                              false
    23 #define             DEBUG_Functionnal_unit                        false
    24 #define             DEBUG_Load_store_unit                         false
    25 #define         DEBUG_Multi_Read_unit                             false
    26 #define           DEBUG_Read_unit                                 false
    27 #define             DEBUG_Read_queue                              false
    28 #define             DEBUG_Reservation_station                     false
    29 #define         DEBUG_Multi_Write_unit                            false
    30 #define           DEBUG_Write_unit                                false
    31 #define             DEBUG_Execute_queue                           false
    32 #define             DEBUG_Write_queue                             false
    33 #define         DEBUG_Network                                     true
    34 #define           DEBUG_Execution_unit_to_Write_unit              true
    35 #define           DEBUG_Read_unit_to_Execution_unit               true
    36 #define         DEBUG_Register_unit                               false
    37 #define           DEBUG_Register_unit_Glue                        false
    38 #define     DEBUG_Multi_Front_end                                 false
    39 #define       DEBUG_Front_end                                     false
    40 #define         DEBUG_Prediction_unit                             false
    41 #define           DEBUG_Direction                                 false
    42 #define             DEBUG_Meta_Predictor                          false
    43 #define               DEBUG_Meta_Predictor_Glue                   false
    44 #define                 DEBUG_Two_Level_Branch_Predictor          false
    45 #define                   DEBUG_Two_Level_Branch_Predictor_Glue   false
    46 #define                   DEBUG_Branch_History_Table              false
    47 #define                   DEBUG_Pattern_History_Table             false
     4#  define DEBUG_true                                                true
     5#  define DEBUG_false                                               false
    486
     7#  define DEBUG_Behavioural                                         false
     8#  define   DEBUG_Generic                                           false
     9#  define     DEBUG_Counter                                         false
     10#  define     DEBUG_Queue                                           false
     11#  define     DEBUG_Queue_Control                                   false
     12#  define     DEBUG_RegisterFile                                    false
     13#  define       DEBUG_RegisterFile_Monolithic                       false
     14#  define       DEBUG_RegisterFile_Multi_Banked                     false
     15#  define     DEBUG_Select                                          false
     16#  define       DEBUG_Select_Priority_Fixed                         false
     17#  define     DEBUG_Shifter                                         false
     18#  define     DEBUG_Sort                                            false
     19#  define     DEBUG_Victim                                          false
     20#  define       DEBUG_Victim_Pseudo_LRU                             false
     21#  define   DEBUG_Core                                              false
     22#  define     DEBUG_Multi_Execute_loop                              false
     23#  define       DEBUG_Execute_loop                                  false
     24#  define         DEBUG_Multi_Execute_unit                          false
     25#  define           DEBUG_Execute_unit                              false
     26#  define             DEBUG_Functionnal_unit                        false
     27#  define             DEBUG_Load_store_unit                         false
     28#  define         DEBUG_Multi_Read_unit                             false
     29#  define           DEBUG_Read_unit                                 false
     30#  define             DEBUG_Read_queue                              false
     31#  define             DEBUG_Reservation_station                     false
     32#  define         DEBUG_Multi_Write_unit                            false
     33#  define           DEBUG_Write_unit                                false
     34#  define             DEBUG_Execute_queue                           false
     35#  define             DEBUG_Write_queue                             false
     36#  define         DEBUG_Network                                     false
     37#  define           DEBUG_Execution_unit_to_Write_unit              false
     38#  define           DEBUG_Read_unit_to_Execution_unit               false
     39#  define         DEBUG_Register_unit                               false
     40#  define           DEBUG_Register_unit_Glue                        false
     41#  define     DEBUG_Multi_Front_end                                 false
     42#  define       DEBUG_Front_end                                     false
     43#  define         DEBUG_Decod_unit                                  false
     44#  define           DEBUG_Decod                                     false
     45#  define         DEBUG_Ifetch_unit                                 false
     46#  define           DEBUG_Address_management                        false
     47#  define           DEBUG_Ifetch_queue                              false
     48#  define           DEBUG_Ifetch_unit_Glue                          false
     49#  define         DEBUG_Prediction_unit                             false
     50#  define           DEBUG_Branch_Target_Buffer                      false
     51#  define             DEBUG_Branch_Target_Buffer_Glue               false
     52#  define             DEBUG_Branch_Target_Buffer_Register           false
     53#  define           DEBUG_Direction                                 false
     54#  define             DEBUG_Direction_Glue                          false
     55#  define             DEBUG_Meta_Predictor                          false
     56#  define               DEBUG_Meta_Predictor_Glue                   false
     57#  define                 DEBUG_Two_Level_Branch_Predictor          false
     58#  define                   DEBUG_Two_Level_Branch_Predictor_Glue   false
     59#  define                   DEBUG_Branch_History_Table              false
     60#  define                   DEBUG_Pattern_History_Table             false
     61#  define           DEBUG_Return_Address_Stack                      true
     62#  define           DEBUG_Update_Prediction_Table                   true
     63#  define     DEBUG_Multi_OOO_Engine                                false
     64#  define       DEBUG_OOO_Engine                                    false
     65#  define         DEBUG_Rename_unit                                 false
     66#  define           DEBUG_Load_Store_pointer_unit                   false
     67#  define           DEBUG_Register_translation_unit                 false
     68#  define             DEBUG_Dependency_checking_unit                false
     69#  define             DEBUG_Free_List_unit                          false
     70#  define             DEBUG_Register_Address_Translation_unit       false
     71#  define             DEBUG_Register_translation_unit_Glue          false
     72#  define             DEBUG_Stat_List_unit                          false
     73//#define           DEBUG_Rename_queue                              true
     74#  define           DEBUG_Rename_select                             false
    4975#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h

    r75 r78  
    7878#endif
    7979
    80   public    : bool                  test_map          (bool top_level);
     80  public    : bool                  test_map          (uint32_t depth,bool top_level);
    8181
    8282#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Environnement.h

    r71 r78  
    2222#  define DEBUG_TEST
    2323#endif
     24
     25#define MORPHEO_HOME "MORPHEO_HOME"
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h

    r75 r78  
    229229#endif
    230230
    231   public    : bool                  test_map             (bool top_level);
     231  public    : bool                  test_map             (uint32_t depth, bool top_level);
    232232
    233233#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h

    r75 r78  
    8080#endif
    8181
    82   public    : bool                  test_map              (bool top_level);
     82  public    : bool                  test_map              (uint32_t depth, bool top_level);
    8383
    8484  public    : friend std::ostream&       operator<<            (std::ostream& output_stream,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h

    r77 r78  
    1414#include "Behavioural/include/Environnement.h"
    1515#include "Behavioural/include/Constants.h"
     16#include "Behavioural/include/Test.h"
    1617#include "Common/include/ErrorMorpheo.h"
    1718#include "Common/include/ToString.h"
     
    2223namespace behavioural {
    2324
     25  class Parameters_test
     26  {
     27  private   : std::string _component;
     28  protected : std::string _error;
     29  protected : std::string _warning;
     30  protected : std::string _information;
     31
     32  public    : Parameters_test (std::string component)
     33    {
     34      _component = component;
     35      _error     = "";
     36      _warning   = "";
     37    };
     38  public    : ~Parameters_test (void) {};
     39
     40  public    : bool        have_error  (void)            { return (_error.length() != 0);};
     41  public    : void        error       (std::string str) { _error       += "[   ERROR   ] <" + _component + "> " + str + "\n";}
     42  public    : void        warning     (std::string str) { _warning     += "[  WARNING  ] <" + _component + "> " + str + "\n";}
     43  public    : void        information (std::string str) { _information += "[INFORMATION] <" + _component + "> " + str + "\n";}
     44  public    : std::string print       (void)            { return _error + _warning + _information;};
     45  };
     46
    2447  // Virtual Class - Interface of each component
    2548  class Parameters
    2649  {
    2750    // -----[ fields ]----------------------------------------------------
    28   public   : static const uint32_t   _nb_operation        = MAX_OPERATION;
    29   public   : static const uint32_t   _nb_type             = MAX_TYPE;
    30   public   : static const uint32_t   _size_operation      = SIZE_OPERATION;
    31   public   : static const uint32_t   _size_type           = SIZE_TYPE;     
    32   public   : static const uint32_t   _size_exception      = SIZE_EXCEPTION;
    33   public   : static const uint32_t   _size_dcache_type    = SIZE_DCACHE_TYPE;
    34   public   : static const uint32_t   _size_dcache_error   = SIZE_DCACHE_ERROR;
     51  public   : static const uint32_t   _size_instruction            = 32;
     52  public   : static const uint32_t   _nb_operation                = MAX_OPERATION;
     53  public   : static const uint32_t   _nb_type                     = MAX_TYPE;
     54  public   : static const uint32_t   _size_operation              = SIZE_OPERATION;
     55  public   : static const uint32_t   _size_type                   = SIZE_TYPE;     
     56  public   : static const uint32_t   _size_exception              = SIZE_EXCEPTION;
     57  public   : static const uint32_t   _size_exception_use          = SIZE_EXCEPTION_USE;
     58  public   : static const uint32_t   _size_exception_memory       = SIZE_EXCEPTION_MEMORY;
     59  public   : static const uint32_t   _size_exception_custom       = SIZE_EXCEPTION_CUSTOM;
     60  public   : static const uint32_t   _size_exception_alu          = SIZE_EXCEPTION_ALU   ;
     61  public   : static const uint32_t   _size_exception_decod        = SIZE_EXCEPTION_DECOD ;
     62  public   : static const uint32_t   _size_exception_ifetch       = SIZE_EXCEPTION_IFETCH;
     63  public   : static const uint32_t   _size_icache_type            = SIZE_ICACHE_TYPE;
     64  public   : static const uint32_t   _size_icache_error           = SIZE_ICACHE_ERROR;
     65  public   : static const uint32_t   _size_dcache_type            = SIZE_DCACHE_TYPE;
     66  public   : static const uint32_t   _size_dcache_error           = SIZE_DCACHE_ERROR;
     67  public   : static const uint32_t   _nb_general_register_logic   = 32;
     68  public   : static const uint32_t   _nb_special_register_logic   = NB_SPR_LOGIC;
     69  public   : static const uint32_t   _size_general_register_logic = 5;
     70  public   : static const uint32_t   _size_special_register_logic = LOG2_NB_SPR_LOGIC;
     71  public   : static const uint32_t   _size_event_state            = SIZE_EVENT_STATE;
     72  public   : static const uint32_t   _size_event_type             = SIZE_EVENT_TYPE;
     73  public   : static const uint32_t   _size_branch_state           = SIZE_BRANCH_STATE;
     74  public   : static const uint32_t   _size_branch_condition       = SIZE_BRANCH_CONDITION;
    3575
    3676    // -----[ methods ]---------------------------------------------------
    37   public   :                  Parameters            (void);
    38   public   : virtual          ~Parameters           ();
     77  public   :                          Parameters           (void);
     78  public   : virtual                 ~Parameters           ();
    3979       
    4080    // methods to print and test parameters
    41   public   : virtual std::string   print                 (uint32_t depth) = 0;
    42   public   : virtual std::string  msg_error             (void) = 0;
     81  public   : virtual std::string     print                 (uint32_t depth) = 0;
     82  public   : virtual Parameters_test msg_error             (void) = 0;
    4383
    4484    // methods to generate configuration file
    45 
    4685   
    4786    // methods to test
    48   public   :         void     test                  (void);
    49   public   :         bool     is_natural            (double  val );
    50   public   :         bool     is_positive           (double  val );
    51   public   :         bool     is_multiple           (uint32_t val1,
    52                                                      uint32_t val2);
    53   public   :         bool     is_between_inclusive  (uint32_t val,
    54                                                      uint32_t min,
    55                                                      uint32_t max);
    56   public   :         bool     is_between_exclusive  (uint32_t val,
    57                                                      uint32_t min,
    58                                                      uint32_t max);
     87  public   :         void            test                  (void);
    5988  };
    60 
    6189}; // end namespace behavioural         
    6290}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h

    r75 r78  
    5151
    5252    // -----[ fields ]----------------------------------------------------
    53   private   : const std::string          _name          ;
     53  private   : const std::string     _name          ;
    5454  private   : const direction_t     _direction     ;
    5555  private   : const presence_port_t _presence_port ;
    5656  private   :       uint32_t        _size          ;
    5757
    58   private   : Signal *              _connect_to_signal;   // the actual implementaion, this signal link with one signal (but if signal is an output, it can be connect with many signal ...)
    59   private   : Signal *              _connect_from_signal; // producter of signal. If NULL, then producteur is the current entity
    60   private   : bool                  _is_allocate   ; // Have allocate a sc_in or sc_out port
    61   private   : void *                _sc_signal     ; // sc_in or sc_out associated at this signal
    62   private   : void *                _sc_signal_map ; // sc_out generated this signal
    63   private   : bool                  _is_map_as_src ;
    64   private   : bool                  _is_map_as_dest;
    65   private   : type_info_t           _type_info     ;
     58  private   : Signal *              _connect_to_signal       ;   // the actual implementaion, this signal link with one signal (but if signal is an output, it can be connect with many signal ...)
     59  private   : Signal *              _connect_from_signal     ; // producter of signal. If NULL, then producteur is the current entity
     60  private   : bool                  _is_allocate             ; // Have allocate a sc_in or sc_out port
     61  private   : void *                _sc_signal               ; // sc_in or sc_out associated at this signal
     62  private   : void *                _sc_signal_map           ; // sc_out generated this signal
     63  private   : bool                  _is_map_as_toplevel_dest ;
     64  private   : bool                  _is_map_as_component_src ;
     65  private   : bool                  _is_map_as_component_dest;
     66  private   : type_info_t           _type_info               ;
    6667
    6768#ifdef VHDL_TESTBENCH
     
    9091  public    : bool              presence_testbench      (void);
    9192
    92   public    : bool              test_map                (bool top_level);
     93  public    : bool              test_map                (uint32_t depth, bool top_level);
    9394
    9495  public    : void              link                    (Signal * signal_dest,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Stat.h

    r75 r78  
    6060      bool                           _generate_file;
    6161
    62     public :                     Stat            (std::string name_instance,
    63                                                   std::string name_component,
    64                                                   Parameters_Statistics * param);
     62    public :                     Stat                         (std::string name_instance,
     63                                                               std::string name_component,
     64                                                               Parameters_Statistics * param);
     65    public :                     Stat                         (std::string name_instance,
     66                                                               std::string name_component,
     67                                                               cycle_t nb_cycle_before_begin=0,
     68                                                               cycle_t period=0);
     69    public :                    ~Stat                         (void);
    6570
    66     public :                     Stat            (std::string name_instance,
    67                                                   std::string name_component,
    68                                                   cycle_t nb_cycle_before_begin=0,
    69                                                   cycle_t period=0);
    70     public :                    ~Stat            (void);
    71      
    72     public  : counter_t *        create_variable (std::string varname);
    73     public  : counter_t *        create_counter  (std::string varname,
    74                                                   std::string unit,
    75                                                   std::string description);
    76     private : counter_t *        alloc_operand   (counter_type_t type,
    77                                                   std::string varname,
    78                                                   std::string unit,
    79                                                   std::string description);
    80     public  : void               create_expr     (std::string varname,
    81                                                   std::string expr,
    82                                                   bool each_cycle=true);
     71    public  : counter_t *        create_variable              (std::string varname);
     72    public  : counter_t *        create_counter               (std::string varname,
     73                                                               std::string unit,
     74                                                               std::string description);
     75    private : counter_t *        alloc_operand                (counter_type_t type,
     76                                                               std::string varname,
     77                                                               std::string unit,
     78                                                               std::string description);
    8379
    84     private : Stat_binary_tree * string2tree     (std::string expr);
     80    public  : void               create_expr                  (std::string varname,
     81                                                               std::string expr,
     82                                                               bool each_cycle=false);
     83    public  : void               create_expr_average          (std::string varname,
     84                                                               std::string expr_sum,
     85                                                               std::string expr_deps,
     86                                                               std::string unit,
     87                                                               std::string description);
    8588
    86     public  : void               end_cycle       (void);
    87     private : void               end_simulation  (void);
    88     private : void               test_and_save   (bool force_save=false);
    89     private : void               eval_exprs      (bool only_each_cycle=true);
    90     private : void               eval_expr       (expr_t expr);
    91      
    92     private : bool               is_valid_var    (std::string expr);
     89    public  : void               create_expr_average_by_cycle (std::string varname,
     90                                                               std::string expr_sum,
     91                                                               std::string unit,
     92                                                               std::string description);
    9393
    94     private : void               generate_file   (void);
     94    public  : void               create_expr_percent          (std::string varname,
     95                                                               std::string expr_sum,
     96                                                               std::string expr_max,
     97                                                               std::string description);
    9598
    96     private : bool               have_counter    (void);
     99    private : Stat_binary_tree * string2tree                  (std::string expr);
    97100
    98     public  : void               add_stat        (Stat * stat);
     101    public  : void               end_cycle                    (void);
     102    private : void               end_simulation               (void);
    99103
    100     public  : std::string        print           (uint32_t depth=0);
     104    private : void               test_and_save                (bool force_save=false);
     105
     106    private : void               eval_exprs                   (bool only_each_cycle=true);
     107    private : void               eval_expr                    (expr_t expr);
     108
     109    private : bool               is_valid_var                 (std::string expr);
     110
     111    private : void               generate_file                (void);
     112
     113    private : bool               have_counter                 (void);
     114
     115    public  : void               add_stat                     (Stat * stat);
     116
     117    public  : std::string        print                        (uint32_t depth=0);
    101118    };
    102119
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Types.h

    r77 r78  
    44#include "Common/include/Types.h"
    55#include "Common/include/ToString.h"
     6#include "Common/include/FromString.h"
     7#include "Common/include/ErrorMorpheo.h"
    68#include "Behavioural/include/Constants.h"
    79
     
    1416
    1517  // ***** general
    16   typedef bool          Tcontrol_t;
    17   typedef uint32_t      Toperation_t;
    18 //typedef uint32_t      Tdestination1_t;
    19 //typedef uint32_t      Tdestination2_t;
    20 //typedef uint32_t      Texec_flag_t;
    21 //typedef bool          Texec_excep_t;
    22 //typedef uint32_t      Tcondition_t;
    23 //typedef uint32_t      Tbranch_state_t;
    24 
    25   typedef uint32_t      Texception_t;
    26   typedef uint32_t      Tcontext_t;
    27   typedef uint32_t      Tpacket_t;
    28   typedef uint32_t      Ttype_t;
    29 
    30   // ***** Register
    31   typedef uint32_t      Tgeneral_address_t;
    32   typedef uint32_t      Tgeneral_data_t;
    33   typedef uint32_t      Tspecial_address_t;
    34   typedef uint32_t      Tspecial_data_t;
     18  typedef uint32_t        Tinstruction_t;
     19  typedef bool            Tcontrol_t;
     20  typedef uint8_t         Toperation_t;
     21//typedef uint32_t        Tdestination1_t;
     22//typedef uint32_t        Tdestination2_t;
     23//typedef uint32_t        Texec_flag_t;
     24//typedef bool            Texec_excep_t;
     25                         
     26  typedef uint8_t         Texception_t;
     27  typedef uint8_t         Tcontext_t;
     28  typedef uint8_t         Tpacket_t;
     29  typedef uint8_t         Ttype_t;
     30  typedef uint8_t         Tevent_state_t;
     31  typedef uint8_t         Tevent_type_t;
     32  typedef uint8_t         Tcounter_t; // universal counter
     33  typedef uint8_t         Tptr_t;     // universal pointer
     34                         
     35  // ***** Register       
     36  typedef uint32_t        Tgeneral_address_t;
     37  typedef uint32_t        Tgeneral_data_t;
     38  typedef uint32_t        Tspecial_address_t;
     39  typedef uint32_t        Tspecial_data_t;
    3540
    3641  // ***** component dependant
    37   // ~~~~~ load store queue
    38   typedef uint32_t      Taccess_t;
    39   typedef uint32_t      Tlsq_ptr_t;
    40   typedef uint32_t      Tdcache_address_t;
    41   typedef uint32_t      Tdcache_data_t;
    42   typedef bool          Tdcache_error_t;
    43   typedef uint32_t      Tdcache_type_t;
     42  // ~~~~~ load store queue
     43  typedef uint8_t         Taccess_t;
     44  typedef uint8_t         Tlsq_ptr_t;
     45  typedef uint32_t        Tdcache_address_t;
     46  typedef uint32_t        Tdcache_data_t;
     47  typedef bool            Tdcache_error_t;
     48  typedef uint8_t         Tdcache_type_t;
     49
     50  // ~~~~~ prediction_unit
     51  typedef uint8_t         Thistory_t;
     52  typedef uint8_t         Tprediction_ptr_t;
     53  typedef uint8_t         Tbranch_state_t;
     54  typedef uint8_t         Tbranch_condition_t;
     55  typedef uint8_t         Tdepth_t;     
     56  typedef Tgeneral_data_t Taddress_t;
     57
     58
     59  // ~~~~~ ifetch
     60  typedef uint8_t         Tinst_ifetch_ptr_t;
     61  typedef uint8_t         Tifetch_queue_ptr_t;
     62  typedef uint32_t        Ticache_address_t;
     63  typedef uint32_t        Ticache_instruction_t;
     64  typedef bool            Ticache_error_t;
     65  typedef uint8_t         Ticache_type_t;
     66
     67  typedef enum
     68    {
     69      PRIORITY_STATIC,
     70      PRIORITY_ROUND_ROBIN
     71    } Tpriority_t;
     72
     73  typedef enum
     74    {
     75      LOAD_BALANCING_BALANCE,
     76      LOAD_BALANCING_MAXIMUM_FOR_PRIORITY
     77    } Tload_balancing_t;
     78
     79  typedef enum
     80    {
     81      VICTIM_RANDOM     , // Random
     82      VICTIM_ROUND_ROBIN, // Round Robin
     83      VICTIM_NLU        , // Not Last Used
     84      VICTIM_PSEUDO_LRU , // Pseudo Least Recently Used
     85      VICTIM_LRU        , // Least Recently Used
     86      VICTIM_FIFO         // First IN First OUT
     87    } Tvictim_t;
     88
     89  typedef enum
     90    {
     91      PREDICTOR_NEVER_TAKE      , // Branch is never  Take
     92      PREDICTOR_ALWAYS_TAKE     , // Branch is always Take
     93      PREDICTOR_STATIC          , // If the adress of destination is previous, then the branch is take
     94      PREDICTOR_LAST_TAKE       , // The direction is as the last time (if is the first time : static)
     95      PREDICTOR_COUNTER         , // Counter table
     96      PREDICTOR_LOCAL           , // Counter bank indexed with history bank
     97      PREDICTOR_GLOBAL          , // Counter bank indexed with history table
     98      PREDICTOR_META            , // A meta_predictor choose between 2 predictor : the local or the global
     99      PREDICTOR_CUSTOM            // Note predefined scheme
     100    } Tpredictor_t;
    44101
    45102  //----------------------------------------------[ spr_mode_access ]-----
     
    56113    }
    57114  };
    58 
    59   inline Tcontext_t get_num_thread (Tcontext_t num_context_id   , uint32_t size_context_id   ,
    60                                     Tcontext_t num_front_end_id , uint32_t size_front_end_id ,
    61                                     Tcontext_t num_ooo_engine_id, uint32_t size_ooo_engine_id)
    62   {
    63     return ((num_ooo_engine_id << (size_context_id + size_front_end_id)) |
    64             (num_front_end_id  << (size_context_id)) |
    65             (num_context_id));
    66   }
    67 
    68   inline uint32_t get_nb_thread (uint32_t nb_context ,
    69                                  uint32_t nb_front_end ,
    70                                  uint32_t nb_ooo_engine )
    71   {
    72     return (nb_ooo_engine *
    73             nb_front_end  *
    74             nb_context) ;
    75   }
    76115
    77116}; // end namespace behavioural
     
    96135  };
    97136
     137  template<> inline std::string toString<morpheo::behavioural::Tpriority_t>(const morpheo::behavioural::Tpriority_t& x)
     138  {
     139    switch (x)
     140      {
     141      case morpheo::behavioural::PRIORITY_STATIC      : return "priority_static"; break;
     142      case morpheo::behavioural::PRIORITY_ROUND_ROBIN : return "priority_round_robin"; break;
     143      default    : return ""      ; break;
     144      }
     145  };
     146
     147  template<> inline morpheo::behavioural::Tpriority_t fromString<morpheo::behavioural::Tpriority_t>(const std::string& x)
     148  {
     149    if ( (x.compare("0")                    == 0) or
     150         (x.compare("priority_static")      == 0))
     151      return morpheo::behavioural::PRIORITY_STATIC;
     152    if ( (x.compare("1")                    == 0) or
     153         (x.compare("priority_round_robin") == 0))
     154      return morpheo::behavioural::PRIORITY_ROUND_ROBIN;
     155    throw (ERRORMORPHEO ("fromString","Unknow string : \""+x+"\""));
     156  };
     157
     158  template<> inline std::string toString<morpheo::behavioural::Tload_balancing_t>(const morpheo::behavioural::Tload_balancing_t& x)
     159  {
     160    switch (x)
     161      {
     162      case morpheo::behavioural::LOAD_BALANCING_BALANCE              : return "load_balancing_balance"; break;
     163      case morpheo::behavioural::LOAD_BALANCING_MAXIMUM_FOR_PRIORITY : return "load_balancing_maximum_for_priority"; break;
     164      default    : return ""      ; break;
     165      }
     166  };
     167
     168  template<> inline morpheo::behavioural::Tload_balancing_t fromString<morpheo::behavioural::Tload_balancing_t>(const std::string& x)
     169  {
     170    if ( (x.compare("0")                      == 0) or
     171         (x.compare("load_balancing_balance") == 0))
     172      return morpheo::behavioural::LOAD_BALANCING_BALANCE;
     173    if ( (x.compare("1")                                   == 0) or
     174         (x.compare("load_balancing_maximum_for_priority") == 0))
     175      return morpheo::behavioural::LOAD_BALANCING_MAXIMUM_FOR_PRIORITY;
     176    throw (ERRORMORPHEO ("fromString","Unknow string : \""+x+"\""));
     177  };
     178
     179  template<> inline std::string toString<morpheo::behavioural::Tvictim_t>(const morpheo::behavioural::Tvictim_t& x)
     180  {
     181    switch (x)
     182      {
     183      case morpheo::behavioural::VICTIM_RANDOM      : return "victim_random"     ; break;
     184      case morpheo::behavioural::VICTIM_ROUND_ROBIN : return "victim_round_robin"; break;
     185      case morpheo::behavioural::VICTIM_NLU         : return "victim_nlu"        ; break;
     186      case morpheo::behavioural::VICTIM_PSEUDO_LRU  : return "victim_pseudo_lru" ; break;
     187      case morpheo::behavioural::VICTIM_LRU         : return "victim_lru"        ; break;
     188      case morpheo::behavioural::VICTIM_FIFO        : return "victim_fifo"       ; break;
     189      default    : return ""      ; break;
     190      }
     191  };
     192
     193  template<> inline morpheo::behavioural::Tvictim_t fromString<morpheo::behavioural::Tvictim_t>(const std::string& x)
     194  {
     195    if ( (x.compare("0")                  == 0) or
     196         (x.compare("victim_random")      == 0))
     197      return morpheo::behavioural::VICTIM_RANDOM;
     198    if ( (x.compare("1")                  == 0) or
     199         (x.compare("victim_round_robin") == 0))
     200      return morpheo::behavioural::VICTIM_ROUND_ROBIN;
     201    if ( (x.compare("2")                  == 0) or
     202         (x.compare("victim_nlu")         == 0))
     203      return morpheo::behavioural::VICTIM_NLU;
     204    if ( (x.compare("3")                  == 0) or
     205         (x.compare("victim_pseudo_lru")  == 0))
     206      return morpheo::behavioural::VICTIM_PSEUDO_LRU;
     207    if ( (x.compare("4")                  == 0) or
     208         (x.compare("victim_lru")         == 0))
     209      return morpheo::behavioural::VICTIM_LRU;
     210    if ( (x.compare("5")                  == 0) or
     211         (x.compare("victim_fifo")        == 0))
     212      return morpheo::behavioural::VICTIM_FIFO;
     213    throw (ERRORMORPHEO ("fromString","Unknow string : \""+x+"\""));
     214  };
     215
     216  template<> inline std::string toString<morpheo::behavioural::Tpredictor_t>(const morpheo::behavioural::Tpredictor_t& x)
     217  {
     218    switch (x)
     219      {
     220      case morpheo::behavioural::PREDICTOR_NEVER_TAKE  : return "predictor_never_take" ; break;
     221      case morpheo::behavioural::PREDICTOR_ALWAYS_TAKE : return "predictor_always_take"; break;
     222      case morpheo::behavioural::PREDICTOR_STATIC      : return "predictor_static"     ; break;
     223      case morpheo::behavioural::PREDICTOR_LAST_TAKE   : return "predictor_last_take"  ; break;
     224      case morpheo::behavioural::PREDICTOR_COUNTER     : return "predictor_counter"    ; break;
     225      case morpheo::behavioural::PREDICTOR_LOCAL       : return "predictor_local"      ; break;
     226      case morpheo::behavioural::PREDICTOR_GLOBAL      : return "predictor_global"     ; break;
     227      case morpheo::behavioural::PREDICTOR_META        : return "predictor_meta"       ; break;
     228      case morpheo::behavioural::PREDICTOR_CUSTOM      : return "predictor_custom"     ; break;
     229      default    : return ""      ; break;
     230      }
     231  };
     232
     233  template<> inline morpheo::behavioural::Tpredictor_t fromString<morpheo::behavioural::Tpredictor_t>(const std::string& x)
     234  {
     235    if ( (x.compare("0")                     == 0) or
     236         (x.compare("predictor_never_take")  == 0))
     237      return morpheo::behavioural::PREDICTOR_NEVER_TAKE;
     238    if ( (x.compare("1")                     == 0) or
     239         (x.compare("predictor_always_take") == 0))
     240      return morpheo::behavioural::PREDICTOR_ALWAYS_TAKE;
     241    if ( (x.compare("2")                     == 0) or
     242         (x.compare("predictor_static")      == 0))
     243      return morpheo::behavioural::PREDICTOR_STATIC;
     244    if ( (x.compare("3")                     == 0) or
     245         (x.compare("predictor_last_take")   == 0))
     246      return morpheo::behavioural::PREDICTOR_LAST_TAKE;
     247    if ( (x.compare("4")                     == 0) or
     248         (x.compare("predictor_counter")     == 0))
     249      return morpheo::behavioural::PREDICTOR_COUNTER;
     250    if ( (x.compare("5")                     == 0) or
     251         (x.compare("predictor_local")       == 0))
     252      return morpheo::behavioural::PREDICTOR_LOCAL;
     253    if ( (x.compare("6")                     == 0) or
     254         (x.compare("predictor_global")      == 0))
     255      return morpheo::behavioural::PREDICTOR_GLOBAL;
     256    if ( (x.compare("7")                     == 0) or
     257         (x.compare("predictor_meta")        == 0))
     258      return morpheo::behavioural::PREDICTOR_META;
     259    if ( (x.compare("8")                     == 0) or
     260         (x.compare("predictor_custom")      == 0))
     261      return morpheo::behavioural::PREDICTOR_CUSTOM;
     262    throw (ERRORMORPHEO ("fromString","Unknow string : \""+x+"\""));
     263  };
     264
    98265}; // end namespace morpheo             
    99 
    100266#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp

    r76 r78  
    2020    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    2121
     22//     log_printf(NONE,Behavioural,FUNCTION,"Map %s.%s with %s.%s",
     23//             component_src.c_str(),
     24//             port_src.c_str(),
     25//             component_dest.c_str(),
     26//             port_dest.c_str());
     27
    2228    std::string name_entity = _entity->get_name();
    2329
    2430    // First entity
    2531    Entity * entity_dest = find_entity(component_dest);
    26 
    2732
    2833    if (entity_dest == NULL)
     
    5358
    5459    // need an internal signal ?
    55     bool src_is_port  = entity_src  == _entity;
    56     bool dest_is_port = entity_dest == _entity;
     60    bool src_is_port  = (entity_src  == _entity);
     61    bool dest_is_port = (entity_dest == _entity);
    5762
    5863    if (src_is_port == true)
     
    6772        //       
    6873        // Interface      Component
    69         //    |          |         
     74        //    |              |     
    7075        //  ----> (IN)     --X-> (IN)
    71         //    |          |         
     76        //    |              |     
    7277        //  <-X-- (OUT)    <---- (OUT)
    7378        //    |              |       
     
    8994          }
    9095
     96        // Create internal signal
    9197        signal_dest= signal_internal (entity_productor, signal_productor);
    9298        signal_dest->set_size_max(signal_src->get_size());
    93 
    94         dest_is_port = false;
    9599      }
    96100   
     
    111115  };
    112116
    113   void Component::port_map (std::string component_src ,
    114                             std::string port_src      )
    115   {
    116     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    117    
    118     Entity * entity_src = find_entity(component_src);
    119    
    120     if (entity_src == NULL)
    121       throw (ErrorMorpheo ("<Component::port_map> in component \""+_entity->get_name()+"\", port map with unknow component \""+component_src+"\"."));
    122    
    123     Signal * signal_src = entity_src->find_signal (port_src);
    124    
    125     if (signal_src == NULL)
    126       throw (ErrorMorpheo ("<Component::port_map> in component \""+_entity->get_name()+"\", port map with component \""+component_src+"\" and a unknow signal \""+port_src+"\"."));
    127    
    128     // need an internal signal ?
    129    
    130     if (entity_src == _entity)
    131       throw (ErrorMorpheo ("<Component::port_map> src can't be an interface's port of the top level."));
    132    
    133     if (signal_src->get_direction() != OUT)
    134       throw (ErrorMorpheo ("<Component::port_map> the direction of the signal '"+signal_src->get_name()+"' must be OUT."));
    135 
    136     Signal * signal_dest;
    137 
    138     signal_dest= signal_internal (entity_src, signal_src);
    139     signal_dest->set_size_max(signal_src->get_size());
    140    
    141     try
    142       {
    143         signal_src->link(signal_dest,
    144                          false);
    145       }
    146     catch (morpheo::ErrorMorpheo & error)
    147       {
    148         throw (ErrorMorpheo ("<Component::port_map> Error in mapping "+entity_src ->get_name()+"."+signal_src ->get_name()+" :\n"+error.what ()));
    149       }
    150     //catch (...)
    151     //  {
    152     //  }
    153 
    154     log_printf(FUNC,Behavioural,FUNCTION,"End");
    155   };
    156 
    157117}; // end namespace behavioural         
    158118}; // end namespace morpheo             
    159119
     120
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_component.cpp

    r57 r78  
    2929    Tcomponent_t * entry = new Tcomponent_t;
    3030   
     31//     entry->_component= component;
    3132    entry->_instance = instance;
    3233    entry->_entity   = entity;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_test_map.cpp

    r75 r78  
    1313#undef  FUNCTION
    1414#define FUNCTION "Component::test_map"
    15   bool Component::test_map (void)
     15  bool Component::test_map (bool recursive)
     16  {
     17    return test_map (0, recursive);
     18  }
     19
     20  bool Component::test_map (uint32_t depth, bool recursive)
    1621  {
    1722    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1823
     24    std::string tab  = std::string(depth,'\t');
    1925    std::string name = _entity->get_name();
    2026    bool test_ok = true;
     27
    2128    if (_list_component->empty () == true)
    22       log_printf(NONE,Behavioural,FUNCTION, "Component \"%s\" is a behavioural description",name.c_str());
     29      {
     30        log_printf(NONE,Behavioural,FUNCTION, "%s* Component \"%s\" is a behavioural description",tab.c_str(),name.c_str());
     31      }
    2332    else
    2433      {
    25         log_printf(NONE,Behavioural,FUNCTION, "Component \"%s\" is a structural description",name.c_str());
     34        log_printf(NONE,Behavioural,FUNCTION, "%s* Component \"%s\" is a structural description",tab.c_str(),name.c_str());
    2635
    27         log_printf(INFO,Behavioural,FUNCTION, "Test port I/O");
     36        log_printf(INFO,Behavioural,FUNCTION, "%s* Test port I/O",tab.c_str());
    2837       
    29         test_ok &= _entity->test_map(true);
     38        test_ok &= _entity->test_map(1,true);
    3039
    31         log_printf(INFO,Behavioural,FUNCTION, "Test all internal component");
     40        log_printf(INFO,Behavioural,FUNCTION, "%s* Test all internal component",tab.c_str());
    3241       
    3342        for (std::list<Tcomponent_t *>::iterator i= _list_component->begin();
    3443             i != _list_component->end();
    3544             ++i)
    36           test_ok &= (*i)->_entity->test_map(false);
     45          test_ok &= (*i)->_entity->test_map(1,false);
     46
     47//      if (recursive)
     48//        for (std::list<Tcomponent_t *>::iterator i= _list_component->begin();
     49//             i != _list_component->end();
     50//             ++i)
     51//          test_ok &= (*i)->_component->test_map(1,recursive);
    3752      }
    3853   
     
    4055   
    4156    if (test_ok == false)
    42       throw (ErrorMorpheo ("<Component::test_map> A lot of port is not connected."));
     57      throw (ERRORMORPHEO (FUNCTION,"A lot of port is not connected."));
    4358
    4459    return test_ok;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_test_map.cpp

    r62 r78  
    77
    88#include "Behavioural/include/Entity.h"
    9 
     9#include <iostream>
    1010
    1111namespace morpheo              {
     
    1414#undef  FUNCTION
    1515#define FUNCTION "Entity::test_map"
    16   bool Entity::test_map (bool top_level)
     16  bool Entity::test_map (uint32_t depth, bool top_level)
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1919 
    20     log_printf(NONE,Behavioural,FUNCTION, " * Test mapping : Entity \"%s\"",_name.c_str());
     20    std::string tab  = std::string(depth,'\t');
     21    log_printf(NONE,Behavioural,FUNCTION, "%s* Test mapping : Entity \"%s\"",tab.c_str(),_name.c_str());
    2122 
    22     bool _return = _interfaces->test_map(top_level);
     23    bool _return = _interfaces->test_map(depth+1,top_level);
     24
     25#ifndef DEBUG
     26    if (_return == false)
     27      {
     28        std::cerr << "In entity \"" << _name << "\" (type : \"" << _type << "\"), a lot of port is not connected !" << std::endl;
     29      }
     30#endif
    2331
    2432    log_printf(FUNC,Behavioural,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_test_map.cpp

    r75 r78  
    1414#undef  FUNCTION
    1515#define FUNCTION "Interface::test_map"
    16   bool Interface::test_map (bool top_level)
     16  bool Interface::test_map (uint32_t depth, bool top_level)
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1919
     20    std::string tab  = std::string(depth,'\t');
    2021    bool _return = true;
    2122
    22     log_printf(INFO,Behavioural,FUNCTION, "   * Interface \"%s\"",_name.c_str());
     23    log_printf(NONE,Behavioural,FUNCTION, "%s* Interface \"%s\"",tab.c_str(),_name.c_str());
    2324   
    2425    for (std::list<Signal*>::iterator i  = _list_signal->begin();
    2526         i != _list_signal->end();
    2627         ++i)
    27       _return &= (*i)->test_map(top_level);
     28      _return &= (*i)->test_map(depth+1,top_level);
    2829
    2930    log_printf(FUNC,Behavioural,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_test_map.cpp

    r75 r78  
    1414#undef  FUNCTION
    1515#define FUNCTION "Interfaces::test_map"
    16   bool Interfaces::test_map (bool top_level)
     16  bool Interfaces::test_map (uint32_t depth, bool top_level)
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1919
     20    std::string tab  = std::string(depth,'\t');
     21
    2022    bool _return = true;
    2123
    22     log_printf(INFO,Behavioural,FUNCTION, "   * Interfaces \"%s\"",_name.c_str());
     24    log_printf(NONE,Behavioural,FUNCTION, "%s* Interfaces \"%s\"",tab.c_str(),_name.c_str());
    2325   
    2426    for (std::list<Interface_fifo*>::iterator i  = _list_interface->begin();
    2527         i != _list_interface->end();
    2628         ++i)
    27       _return &= (*i)->test_map(top_level);
     29      _return &= (*i)->test_map(depth+1, top_level);
    2830
    2931    log_printf(FUNC,Behavioural,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters_test.cpp

    r71 r78  
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    19     std::string msg = msg_error();
     19 
     20    Parameters_test x = msg_error();
    2021   
    21     if (msg.length() != 0)
    22       throw (ErrorMorpheo (msg));
     22    std::cerr << x.print() << std::endl;
     23
     24    if (x.have_error())
     25      throw (ErrorMorpheo ("Error(s) in parameters"));
     26
    2327    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2428  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp

    r75 r78  
    2020  {
    2121    log_printf(FUNC,Behavioural,"Signal","Begin");
    22     _size                = size;
    23     _is_allocate         = false;
    24     _is_map_as_src       = false;
    25     _is_map_as_dest      = false;
    26     _connect_from_signal = NULL;
    27     _connect_to_signal   = NULL;
    28     _sc_signal           = NULL;
    29     _sc_signal_map       = NULL;
    30     _type_info           = UNKNOW;
     22    _size                     = size;
     23    _is_allocate              = false;
     24    _is_map_as_component_src  = false;
     25    _is_map_as_component_dest = false;
     26    _is_map_as_toplevel_dest  = false;
     27    _connect_from_signal      = NULL;
     28    _connect_to_signal        = NULL;
     29    _sc_signal                = NULL;
     30    _sc_signal_map            = NULL;
     31    _type_info                = UNKNOW;
    3132#ifdef VHDL_TESTBENCH
    3233    _list_value          = new std::list<std::string>;
    3334#endif
     35   
     36    if (_size == 0)
     37      throw ERRORMORPHEO(FUNCTION,"Size of signal '"+_name+"' is nul");
     38
     39
    3440    log_printf(FUNC,Behavioural,"Signal","End");
    3541  };
     
    4147  {
    4248    log_printf(FUNC,Behavioural,"Signal (copy)","Begin");
    43     _size                = signal._size;
    44     _is_allocate         = signal._is_allocate;
    45     _is_map_as_src       = signal._is_map_as_src ;
    46     _is_map_as_dest      = signal._is_map_as_dest;
    47     _connect_from_signal = signal._connect_from_signal;
    48     _connect_to_signal   = signal._connect_to_signal;
    49     _sc_signal           = signal._sc_signal    ;
    50     _sc_signal_map       = signal._sc_signal_map;
    51     _type_info           = signal._type_info ;
     49    _size                     = signal._size;
     50    _is_allocate              = signal._is_allocate;
     51    _is_map_as_component_src  = signal._is_map_as_component_src ;
     52    _is_map_as_component_dest = signal._is_map_as_component_dest;
     53    _is_map_as_toplevel_dest  = signal._is_map_as_component_dest;
     54    _connect_from_signal      = signal._connect_from_signal;
     55    _connect_to_signal        = signal._connect_to_signal;
     56    _sc_signal                = signal._sc_signal    ;
     57    _sc_signal_map            = signal._sc_signal_map;
     58    _type_info                = signal._type_info ;
    5259#ifdef VHDL_TESTBENCH
    53     _list_value          = signal._list_value;
     60    _list_value               = signal._list_value;
    5461#endif
    5562    log_printf(FUNC,Behavioural,"Signal (copy)","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_connect.cpp

    r75 r78  
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    19    
    20     //std::cout << "connected : " << get_name() << "\twith " << signal_dest->get_name() << std::endl;
    21    
     19
     20//     log_printf(TRACE,Behavioural,FUNCTION,"Connection between : %s with %s",get_name().c_str(),signal_dest->get_name().c_str());
     21//     log_printf(ALL,Behavioural,FUNCTION," * source");
     22//     log_printf(ALL,Behavioural,FUNCTION,"   * direction : %s",toString(_direction).c_str());
     23//     log_printf(ALL,Behavioural,FUNCTION,"   * sc_signal : %.8x",_sc_signal);
     24//     log_printf(ALL,Behavioural,FUNCTION,"   * type_info : %s",toString(_type_info).c_str());
     25//     log_printf(ALL,Behavioural,FUNCTION," * destination");
     26//     log_printf(ALL,Behavioural,FUNCTION,"   * direction : %s",toString(signal_dest->_direction).c_str());
     27//     log_printf(ALL,Behavioural,FUNCTION,"   * sc_signal : %.8x",signal_dest->_sc_signal);
     28//     log_printf(ALL,Behavioural,FUNCTION,"   * type_info : %s",toString(signal_dest->_type_info).c_str());
     29
    2230    if ((_direction == IN ) and (signal_dest->_direction == IN ))
    2331      switch (_type_info)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp

    r65 r78  
    1717                     bool     signal_dest_is_port)
    1818  {
     19    // signal_dest_is_port == 1 when the signal dest is in a top level interface. (else, signal_dest is type "INTERNAL")
     20   
    1921    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    2022
     
    2325    // Test
    2426    if (signal_src ->_is_allocate == false)
    25       throw (ErrorMorpheo ("<Signal::link> Signal \""+_name+"\", can't map with signal \""+        get_name()+"\", because the first signal is not already allocate."));
     27      throw (ERRORMORPHEO (FUNCTION,"Signal \""+_name+"\", can't map with signal \""+        get_name()+"\", because the first signal is not already allocate."));
    2628    if (signal_dest->_is_allocate == false)
    27       throw (ErrorMorpheo ("<Signal::link> Signal \""+_name+"\", can't map with signal \""+signal_dest->get_name()+"\", because the second signal is not already allocate."));
    28     if (signal_src ->_is_map_as_src  == true)
    29       throw (ErrorMorpheo ("<Signal::mapping> Can't mapping signal \""+_name+"\" with \""+signal_dest->get_name()+"\", because the first signal is already mapped."));
     29      throw (ERRORMORPHEO (FUNCTION,"Signal \""+_name+"\", can't map with signal \""+signal_dest->get_name()+"\", because the second signal is not already allocate."));
    3030
    3131    // List of all case
     
    4343        not (not signal_dest_is_port and (((signal_src->_direction == IN ) and (signal_dest->_direction == INTERNAL)) or
    4444                                          ((signal_src->_direction == OUT) and (signal_dest->_direction == INTERNAL)))))
    45       throw (ErrorMorpheo ("<Signal::link> Signal \""+_name+"\" can't been linked with signal \""+signal_dest->get_name()+"\" : illegal direction ("+toString(signal_src->_direction)+" with "+toString(signal_dest->_direction)+")."));
     45      throw (ERRORMORPHEO (FUNCTION,"Signal \""+_name+"\" can't been linked with signal \""+signal_dest->get_name()+"\" : illegal direction ("+toString(signal_src->_direction)+" with "+toString(signal_dest->_direction)+")."));
     46
     47
     48    // Multi consumer is authorized , no to multi producer!
     49    bool source_have_multi_consumer      = (signal_src ->_connect_to_signal != NULL);
     50//     bool destination_have_multi_producer = (signal_dest->_connect_from_signal != NULL) and (signal_dest_is_port == false);
     51//     if (destination_have_multi_producer)
     52// //       throw (ERRORMORPHEO (FUNCTION,"Signal \""+_name+"\" can't been linked with signal \""+signal_dest->get_name()+"\" : destination have multi producer."));
     53//       log_printf(NONE,Behavioural,FUNCTION,"Signal \"%s\" can't been linked with signal \"%s\" : destination have multi producer.",_name.c_str(),signal_dest->get_name().c_str());
    4654
    4755    // update info source
    48     signal_src ->_connect_to_signal   = signal_dest;
    49     signal_src ->_is_map_as_src       = true;
     56    signal_src ->_connect_to_signal       = signal_dest;
     57    signal_src ->_is_map_as_component_src = true;
     58
     59    // update info destination
     60    if (signal_dest_is_port == true)
     61      signal_dest->_is_map_as_toplevel_dest = true; // because toplevel port can't be a source
     62    else
     63      // signal_dest is a internal signal
     64      if (signal_src->_direction == OUT)
     65        signal_dest->_is_map_as_component_dest = true;
     66      else
     67        signal_dest->_is_map_as_component_src  = true;
    5068   
    51     // update info destination
    52     signal_dest->_connect_from_signal = signal_src;
    53     signal_dest->_is_map_as_dest      = true;
    54 
    5569    // an internal signal and port can't be a source.
    5670    // also, to fill the connect_to_signal's field
    57     if ((signal_src->_direction == OUT) and
    58         (signal_dest->_direction == INTERNAL))
    59       {
    60         signal_dest->_connect_to_signal = signal_src;
    61       }
     71    if (signal_dest->_direction == INTERNAL)
     72      if (signal_src->_direction == OUT)
     73        signal_dest->_connect_from_signal = signal_src;
     74      else
     75        signal_dest->_connect_to_signal   = signal_src;
     76    else
     77      signal_dest->_connect_from_signal   = signal_src;
     78   
     79
    6280
    6381    // vhdl_testbench : to read an output producte by a internal component
     
    6684        (signal_src ->_direction == OUT))
    6785      signal_dest->_sc_signal_map = signal_src ->_sc_signal_map;
    68    
    69     connect (signal_dest);
     86
     87    // A signal can be connect once
     88    if (not source_have_multi_consumer)
     89      connect (signal_dest);
    7090
    7191    log_printf(FUNC,Behavioural,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_test_map.cpp

    r75 r78  
    1414#undef  FUNCTION
    1515#define FUNCTION "Signal::test_map"
    16   bool Signal::test_map (bool top_level)
     16  bool Signal::test_map (uint32_t depth, bool top_level)
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1919
    20     log_printf(INFO,Behavioural,FUNCTION, "     * Signal \"%s\"",_name.c_str());
    21 
    22     bool _return = false;
     20    std::string str = "";
     21    std::string tab = std::string(depth,'\t');
     22//     log_printf(NONE,Behavioural,FUNCTION, "%s* Signal \"%s\"",tab.c_str(),_name.c_str());
     23//     log_printf(NONE,Behavioural,FUNCTION, "%s%d - %d - %d",tab.c_str(),
     24//             _is_map_as_toplevel_dest,
     25//             _is_map_as_component_src,
     26//             _is_map_as_component_dest);
     27    bool _return = true;
    2328
    2429    if (top_level == true)
    2530      {
    26         _return = _is_map_as_dest;
    27              
    2831        switch (_direction)
    2932          {
    3033          case morpheo::behavioural::IN       :
    3134            {
    32               if (_return == false)
    33                 std::cerr << "Signal \"" << _name << "\" is not mapped with an outpout port or a component." << std::endl;
     35              if (_is_map_as_toplevel_dest == false)
     36                {
     37                  _return = false;
     38
     39                  str = "Signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface.";
     40                }
    3441              break;
    3542            }
    3643          case morpheo::behavioural::OUT      :
    3744            {
    38               if (_return == false)
    39                 std::cerr << "Signal \"" << _name << "\" is not mapped with an input port or a component." << std::endl;
     45              if (_is_map_as_toplevel_dest == false)
     46                {
     47                  _return = false;
     48                  str = "Signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface.";
     49                }
    4050              break;
    4151            }
    42             //case morpheo::behavioural::INTERNAL : return "internal" ; break;
    43             //case morpheo::behavioural::INOUT    : return "inout"    ; break;
     52            //case morpheo::behavioural::INTERNAL :
     53            //case morpheo::behavioural::INOUT    :
    4454          default    : break;
    4555          }
     
    4757    else
    4858      {
    49         _return = _is_map_as_src and _is_map_as_dest;
     59        // internal signal :
     60        // Component --- I/O       (as_src)
     61        // Component --- Component (as_src and as_dest)
    5062
    51         if (_return == false)
     63        switch (_direction)
    5264          {
    53             if (_is_map_as_src  == false)
    54               std::cerr << "Signal \"" << _name << "\" is not mapped as source" << std::endl;
    55             if (_is_map_as_dest == false)
    56               std::cerr << "Signal \"" << _name << "\" is not mapped as destination" << std::endl;
     65          case morpheo::behavioural::IN       :
     66            {
     67              if (_is_map_as_component_src == false)
     68                {
     69                  _return = false;
     70                 
     71                  str = "Signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface.";
     72                }
     73              break;
     74            }
     75          case morpheo::behavioural::OUT      :
     76            {
     77              if (_is_map_as_component_src == false)
     78                {
     79                  _return = false;
     80                 
     81                  str = "Signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface.";
     82                }
     83              break;
     84            }
     85          case morpheo::behavioural::INTERNAL :
     86            {
     87              if (_is_map_as_component_src  == false)
     88                {
     89                  _return = false;
     90                 
     91                  str = "Internal signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface.";
     92                }
     93
     94              if (_is_map_as_component_dest == false)
     95                {
     96                  if (_return == false)
     97                    str+="\n";
     98
     99                  _return = false;
     100                 
     101                  str += "Internal signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface.";
     102                }
     103
     104              break;
     105            }
     106            //case morpheo::behavioural::INOUT    :
     107          default    : break;
    57108          }
    58109      }
    59110   
    60111    log_printf(FUNC,Behavioural,FUNCTION,"End");
     112
     113
     114
     115    if (_return == false)
     116      {
     117        log_printf(NONE,Behavioural,FUNCTION, "%s* %s",tab.c_str(),str.c_str());
     118       
     119#ifndef DEBUG
     120        std::cerr << str << std::endl;
     121#endif
     122      }
     123    else
     124      {
     125//      log_printf(NONE,Behavioural,FUNCTION, "%s* Signal \"%s\" is OK.",tab.c_str(),_name.c_str());
     126      }
    61127   
    62128    return _return;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_create_expr.cpp

    r71 r78  
    44namespace morpheo {
    55namespace behavioural {
    6   void        Stat::create_expr     (std::string varname, std::string expr, bool each_cycle)
     6
     7  void Stat::create_expr (std::string varname,
     8                          std::string expr,
     9                          bool each_cycle)
    710  {
    811    if (is_valid_var (varname))
     
    1720    _list_expr->push_back(expression);
    1821  }
     22
     23  void Stat::create_expr_average (std::string varname,
     24                                  std::string expr_sum,
     25                                  std::string expr_deps,
     26                                  std::string unit,
     27                                  std::string description)
     28  {
     29    create_counter(varname,unit,description);
     30    create_expr   (varname, "/ "+expr_sum+" "+expr_deps, false);
     31  }
     32
     33  void Stat::create_expr_average_by_cycle (std::string varname,
     34                                           std::string expr_sum,
     35                                           std::string unit,
     36                                           std::string description)
     37  {
     38    create_expr_average (varname, expr_sum, "cycle", unit, description);
     39  }
     40
     41  void Stat::create_expr_percent (std::string varname,
     42                                  std::string expr_sum,
     43                                  std::string expr_max,
     44                                  std::string description)
     45  {
     46    create_counter(varname,"%",description);
     47    create_expr   (varname, "/ * "+expr_sum+" 100 "+expr_max, false);
     48  }
     49
     50
    1951};
    2052};
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_string2tree.cpp

    r71 r78  
    99  Stat_binary_tree * Stat::string2tree     (std::string expr)
    1010  {
    11     std::cout << "expr : " << expr << std::endl;
    12 
    1311    const std::string delims  (" ");          // délimiteur : " "
    1412    const std::string numbers ("0123456789"); // délimiteur : " "
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Test.cpp

    r59 r78  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
     
    1212namespace behavioural          {
    1313
    14   bool Parameters::is_natural            (double  val )  { return ( (val >= 0) && (floor(val) == ceil(val)));};
    15   bool Parameters::is_positive           (double  val )  { return ( (val >= 1) && (floor(val) == ceil(val)));};
    16   bool Parameters::is_multiple           (uint32_t val1,
    17                                           uint32_t val2) { return is_positive((1.0*val1)/(1.0*val2));};
    18   bool Parameters::is_between_inclusive  (uint32_t val,
    19                                           uint32_t min,
    20                                           uint32_t max)  { return ((val >= min) && (val <= max));};
    21   bool Parameters::is_between_exclusive  (uint32_t val,
    22                                           uint32_t min,
    23                                           uint32_t max)  { return ((val >  min) && (val <  max));};
    24  
     14  bool is_natural            (double  val )  { return ( (val >= 0) && (floor(val) == ceil(val)));};
     15  bool is_positive           (double  val )  { return ( (val >= 1) && (floor(val) == ceil(val)));};
     16  bool is_power2             (uint32_t val)  { return is_natural(::log2(static_cast<double>(val)));};
     17  bool is_multiple           (uint32_t val1,
     18                              uint32_t val2) { return is_positive((1.0*val1)/(1.0*val2));};
     19  bool is_between_inclusive  (uint32_t val,
     20                              uint32_t min,
     21                              uint32_t max)  { return ((val >= min) && (val <= max));};
     22  bool is_between_exclusive  (uint32_t val,
     23                              uint32_t min,
     24                              uint32_t max)  { return ((val >  min) && (val <  max));};
    2525}; // end namespace behavioural         
    2626}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_get_body.cpp

    r71 r78  
    2727    std::string tabulation = indent(depth);
    2828
    29 //     body.insert(0,tabulation);
     29    body.insert(0,tabulation);
    3030    for (size_t pos=body.find('\n',0); pos<body.length()-1; pos=body.find('\n',++pos))
    3131      body.insert(++pos,tabulation);
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h

    r71 r78  
    99#include <sstream>
    1010#include <string>
     11
     12std::string debug_tab            (void);
     13void        debug_function_begin (std::string component, std::string function);
     14void        debug_function_end   (std::string component, std::string function);
    1115
    1216// Debug's Level :
     
    2731
    2832#ifdef DEBUG
    29 //Debug
    30 #  define log_printf(level, component, func, str... )                   \
     33# define log_printf(level, component, func, str... )                    \
    3134  do                                                                    \
    3235    {                                                                   \
     
    3639           ( DEBUG_ ## component == true )) )                           \
    3740        {                                                               \
     41          msg(_("%s"),debug_tab().c_str());                             \
    3842          if (DEBUG >= DEBUG_ALL )                                      \
    3943            {                                                           \
     
    4852                }                                                       \
    4953            }                                                           \
    50           msg(_("<%s> "),func);                                         \
    5154          if (DEBUG >= DEBUG_FUNC)                                      \
    5255            {                                                           \
     56              msg(_("<%s> "),func);                                     \
    5357              msg(_("In file %s, "),__FILE__);                          \
    54               msg(_("at line %d, "),__LINE__);                          \
     58              msg(_("at line %d " ),__LINE__);                          \
     59              msg(_(": "));                                             \
    5560            }                                                           \
    56           msg(_(": "));                                                 \
    5761          msg(str);                                                     \
    5862          msg(_("\n"));                                                 \
     
    6064        }                                                               \
    6165    } while(0)
    62 
    6366#else
    64 // No debug
    65 
    66 #  define log_printf(level, component, func, str... )                                 \
    67 do                                                                                    \
    68 {                                                                                     \
    69 } while(0)
    70 
     67# define log_printf(level, component, func, str... )                    \
     68  do                                                                    \
     69    {                                                                   \
     70    } while(0)
    7171#endif // DEBUG
    72 
    7372#endif // !DEBUG_H
  • trunk/IPs/systemC/processor/Morpheo/Common/include/FromString.h

    r43 r78  
    1717namespace morpheo {
    1818 
    19   template<typename T> inline T   fromString             (const std::string& x)
     19  template<typename T> inline T        fromString             (const std::string& x)
    2020  {
    2121    return static_cast<T>(x.c_str());
    2222  }
    2323 
    24   template<>           inline int fromString<int>        (const std::string& x)
     24  template<>           inline uint32_t fromString<uint32_t>   (const std::string& x)
    2525  {
    26     return atoi(x.c_str());
     26    return static_cast<uint32_t>(atoi(x.c_str()));
     27  }
     28
     29  template<>           inline bool     fromString<bool>       (const std::string& x)
     30  {
     31    return atoi(x.c_str())!=0;
    2732  }
    2833 
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Time.h

    r71 r78  
    3434    uint32_t nb_cycles = static_cast<uint32_t>(sc_simulation_time());
    3535
    36     double average = static_cast<double>(nb_cycles) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec);
     36    double average = static_cast<double>(nb_cycles) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec+1);
    3737   
    38     output_stream << nb_cycles << "\t(" << average << " cycles / seconds )" << std::endl;
     38    output_stream << "Timing : " << nb_cycles << " cycles \t(" << average << " cycles/s)" << std::endl;
    3939
    4040    return output_stream;
  • trunk/IPs/systemC/processor/Morpheo/Common/include/ToString.h

    r71 r78  
    5858  }
    5959
    60 //   template<>           inline std::string toString< int8_t>       (const int8_t& x)
    61 //   {
    62 //     std::ostringstream out("");
    63 //     out << x;
    64 //     return out.str();
    65 //   }
     60  template<>           inline std::string toString< int8_t>       (const int8_t& x)
     61  {
     62    std::ostringstream out("");
     63    out << static_cast< int32_t>(x);
     64    return out.str();
     65  }
    6666
    67 //   template<>           inline std::string toString<uint8_t>       (const uint8_t& x)
    68 //   {
    69 //     std::ostringstream out("");
    70 //     out << x;
    71 //     return out.str();
    72 //   }
     67  template<>           inline std::string toString<uint8_t>       (const uint8_t& x)
     68  {
     69    std::ostringstream out("");
     70    out << static_cast<uint32_t>(x);
     71    return out.str();
     72  }
    7373
    74 //   template<>           inline std::string toString< int16_t>      (const int16_t& x)
    75 //   {
    76 //     std::ostringstream out("");
    77 //     out << x;
    78 //     return out.str();
    79 //   }
     74  template<>           inline std::string toString< int16_t>      (const int16_t& x)
     75  {
     76    std::ostringstream out("");
     77    out << static_cast< int32_t>(x);
     78    return out.str();
     79  }
    8080
    81 //   template<>           inline std::string toString<uint16_t>      (const uint16_t& x)
    82 //   {
    83 //     std::ostringstream out("");
    84 //     out << x;
    85 //     return out.str();
    86 //   }
     81  template<>           inline std::string toString<uint16_t>      (const uint16_t& x)
     82  {
     83    std::ostringstream out("");
     84    out << static_cast<uint32_t>(x);
     85    return out.str();
     86  }
    8787
    88 //   template<>           inline std::string toString< int32_t>      (const int32_t& x)
    89 //   {
    90 //     std::ostringstream out("");
    91 //     out << x;
    92 //     return out.str();
    93 //   }
     88  template<>           inline std::string toString< int32_t>      (const int32_t& x)
     89  {
     90    std::ostringstream out("");
     91    out << x;
     92    return out.str();
     93  }
    9494
    95 //   template<>           inline std::string toString<uint32_t>      (const uint32_t& x)
    96 //   {
    97 //     std::ostringstream out("");
    98 //     out << x;
    99 //     return out.str();
    100 //   }
     95  template<>           inline std::string toString<uint32_t>      (const uint32_t& x)
     96  {
     97    std::ostringstream out("");
     98    out << x;
     99    return out.str();
     100  }
    101101 
    102102}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Types.h

    r43 r78  
    1616
    1717// Definition of type
    18 #if ( defined(SC_CLOCK) || defined(SC_INTERNAL) || defined(SC_SIGNAL) || defined(SC_REGISTER) || defined(SC_IN) || defined(SC_OUT) )
     18//#if ( defined(SC_CLOCK) || defined(SC_INTERNAL) || defined(SC_SIGNAL) || defined(SC_REGISTER) || defined(SC_IN) || defined(SC_OUT) )
     19#if ( defined(SC_CLOCK) || defined(SC_IN) || defined(SC_OUT) )
    1920#  error "A type is already defined"
    2021#endif
     
    2324#  error "Action is already defined"
    2425#endif
    25 #if ( defined(INTERNAL_READ) || defined(INTERNAL_WRITE) )
    26 #  error "Action is already defined"
    27 #endif
    28 #if ( defined(SIGNAL_READ)   || defined(SIGNAL_WRITE) )
    29 #  error "Action is already defined"
    30 #endif
    31 #if ( defined(REGISTER_READ) || defined(REGISTER_WRITE) )
    32 #  error "Action is already defined"
    33 #endif
     26// #if ( defined(INTERNAL_READ) || defined(INTERNAL_WRITE) )
     27// #  error "Action is already defined"
     28// #endif
     29// #if ( defined(SIGNAL_READ)   || defined(SIGNAL_WRITE) )
     30// #  error "Action is already defined"
     31// #endif
     32// #if ( defined(REGISTER_READ) || defined(REGISTER_WRITE) )
     33// #  error "Action is already defined"
     34// #endif
    3435
    3536#define SC_CLOCK                 sc_in_clk       
    36 #define SC_INTERNAL(type)        type
    37 #define SC_REGISTER(type)        sc_signal<type >
    38 #define SC_SIGNAL(type)          sc_signal<type >
     37// #define SC_INTERNAL(type)        type
     38// #define SC_REGISTER(type)        sc_signal<type >
     39// #define SC_SIGNAL(type)          sc_signal<type >
    3940#define SC_IN(type)              sc_in    <type >
    4041#define SC_OUT(type)             sc_out   <type >
     
    4243#define PORT_READ(sig)           sig->read()
    4344#define PORT_WRITE(sig,val)      sig->write(val)
    44 #define INTERNAL_READ(sig)       (*sig)
    45 #define INTERNAL_WRITE(sig,val)  (*sig) = val
    46 #define SIGNAL_READ(sig)         sig->read()
    47 #define SIGNAL_WRITE(sig,val)    sig->write(val)
    48 #define REGISTER_READ(sig)       sig->read()
    49 #define REGISTER_WRITE(sig,val)  sig->write(val)
     45// #define INTERNAL_READ(sig)       (*sig)
     46// #define INTERNAL_WRITE(sig,val)  (*sig) = val
     47// #define SIGNAL_READ(sig)         sig->read()
     48// #define SIGNAL_WRITE(sig,val)    sig->write(val)
     49// #define REGISTER_READ(sig)       sig->read()
     50// #define REGISTER_WRITE(sig,val)  sig->write(val)
    5051
    5152#endif 
  • trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Include/doc-style.sty

    r63 r78  
    33\usepackage{makeidx}
    44\usepackage{palatino}
    5 \usepackage{fancyheadings}
     5%\usepackage{fancyheadings}
    66\usepackage{float}
    77\usepackage{verbatim}
  • trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Include/ppt-style.sty

    r59 r78  
    3939           }
    4040           
    41            \newcommand{\slidetitle}[3]
    42            {
    43              \slide{\frametitle{#1}#2}{#3}
    44            }
     41\newcommand{\slidetitle}[3]
     42           {
     43             \slide{\frametitle{#1}#2}{#3}
     44           }
    4545           
    4646\newcommand{\Contents}
  • trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Info/presentation-internal_seminary_overview.tex

    r57 r78  
    22\documentclass{beamer}
    33\usepackage{beamerthemetree}
    4 
    5 
    6 
    7 
    8 
  • trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Makefile

    r75 r78  
    133133                        done;                                                                                   \
    134134                        declare -i NUM_TYPE;                                                                    \
    135                         $(READ) NUM_TYPE;                                                                       \
     135                        read NUM_TYPE;                                                                          \
    136136                                                                                                                \
    137137                        if $(TEST) "$$NUM_TYPE" -ge "$$CPT"; then                                               \
     
    143143                        $(ECHO) "";                                                                             \
    144144                        $(ECHO) "Give the name of the documents :";                                             \
    145                         $(READ) FILENAME;                                                                       \
     145                        read FILENAME;                                                                          \
    146146                                                                                                                \
    147147                        if $(TEST) -z "$$FILENAME" -o -d "$(DIR_TYPE)/$$FILENAME.type";                         \
    148148                        then                                                                                    \
    149149                                $(ECHO) "Invalid name : string is empty, or filename is already used";          \
    150                                 exit;                                                                   \
     150                                exit;                                                                           \
    151151                        fi;                                                                                     \
    152152                                                                                                                \
     
    194194                                CPT=$$(($$CPT+1));                                                              \
    195195                        done;                                                                                   \
    196                         $(READ) NUM_FILE;                                                                       \
     196                        read NUM_FILE;                                                                          \
    197197                                                                                                                \
    198198                        if $(TEST) "$$NUM_FILE" -ge "$$CPT"; then                                               \
     
    201201                                                                                                                \
    202202                        $(ECHO) "Please reenter the document id to confirm the delete";                         \
    203                         $(READ) NUM_FILE_CONFIRM;                                                               \
     203                        read NUM_FILE_CONFIRM;                                                                  \
    204204                                                                                                                \
    205205                        if $(TEST) "$$NUM_FILE" -eq "0" -o "$$NUM_FILE" -ne "$$NUM_FILE_CONFIRM"; then          \
     
    245245                                CPT=$$(($$CPT+1));                                                              \
    246246                        done;                                                                                   \
    247                         $(READ) NUM_FILE;                                                                       \
     247                        read NUM_FILE;                                                                          \
    248248                                                                                                                \
    249249                        if $(TEST) "$$NUM_FILE" -ge "$$CPT"; then                                               \
     
    261261                                                                                                                \
    262262                        $(ECHO) "Give the new name of the documents :";                                         \
    263                         $(READ) FILENAME_DEST;                                                                  \
     263                        read FILENAME_DEST;                                                                     \
    264264                                                                                                                \
    265265                        if $(TEST) -z "$$FILENAME_DEST" -o -d "$(DIR_TYPE)/$$FILENAME_DEST.type";               \
     
    277277                        $(ECHO) "Rename file      : $(DIR_PACKAGE)/$$FILENAME_SRC.sty";                         \
    278278                        $(MV) $(DIR_PACKAGE)/$$FILENAME_SRC.sty   $(DIR_PACKAGE)/$$FILENAME_DEST.sty;           \
     279                                                                                                                \
     280                        $(ECHO) "Rename file      : $(DIR_PACKAGE)/$$FILENAME_SRC.tex";                         \
     281                        $(MV) $(DIR_PACKAGE)/$$FILENAME_SRC.tex   $(DIR_PACKAGE)/$$FILENAME_DEST.tex;           \
    279282                                                                                                                \
    280283                        $(ECHO) "Rename directory : $(DIR_DOCUMENTS)/$$FILENAME_SRC";                           \
     
    310313                                CPT=$$(($$CPT+1));                                                              \
    311314                        done;                                                                                   \
    312                         $(READ) NUM_FILE;                                                                       \
     315                        read NUM_FILE;                                                                          \
    313316                                                                                                                \
    314317                        if $(TEST) "$$NUM_FILE" -ge "$$CPT"; then                                               \
     
    333336                                CPT=$$(($$CPT+1));                                                              \
    334337                        done;                                                                                   \
    335                         $(READ) NUM_LANG;                                                                       \
     338                        read NUM_LANG;                                                                          \
    336339                                                                                                                \
    337340                        if $(TEST) "$$NUM_LANG" -ge "$$CPT"; then                                               \
     
    359362                            CPT=$$(($$CPT+1));                                                                  \
    360363                        done;                                                                                   \
    361                         $(READ) NUM_FORMAT;                                                                     \
     364                        read NUM_FORMAT;                                                                        \
    362365                                                                                                                \
    363366                        if $(TEST) "$$NUM_FORMAT" -ge "$$CPT"; then                                             \
     
    412415                        @\
    413416                        $(ECHO) "Generate   files     : $*.eps";        \
    414                         $(CD) $(DIR_GRAPH); $(GNUPLOT) $*.p;
     417                        cd $(DIR_GRAPH); $(GNUPLOT) $*.p;
    415418
    416419#--------------------------------------------------------------------------------
  • trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Schema/MORPHEO_micro_architecture-overview.fig

    r57 r78  
    1 #FIG 3.2
     1#FIG 3.2  Produced by xfig version 3.2.5
    22Landscape
    33Center
     
    88-2
    991200 2
    10 6 4770 3690 5490 4140
    11 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    12          5490 4140 4770 4140 4770 3690 5490 3690 5490 4140
    13 4 1 0 50 -1 -1 12 0.0000 4 135 450 5130 3960 decod\001
    14 -6
    15106 4770 3240 5490 3690
    16112 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    1712         5490 3690 4770 3690 4770 3240 5490 3240 5490 3690
    18 4 1 0 50 -1 -1 12 0.0000 4 105 570 5130 3420 context\001
    19 4 1 0 50 -1 -1 12 0.0000 4 105 390 5130 3600 state\001
    20 -6
    21 6 5850 3690 6570 4140
    22 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    23          6570 4140 5850 4140 5850 3690 6570 3690 6570 4140
    24 4 1 0 50 -1 -1 12 0.0000 4 90 555 6210 3960 rename\001
     134 1 0 50 -1 -1 12 0.0000 4 120 645 5130 3420 context\001
     144 1 0 50 -1 -1 12 0.0000 4 120 420 5130 3600 state\001
    2515-6
    26166 8370 3690 9090 4140
    27172 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    2818         9090 4140 8370 4140 8370 3690 9090 3690 9090 4140
    29 4 1 0 50 -1 -1 12 0.0000 4 135 330 8730 3960 read\001
     194 1 0 50 -1 -1 12 0.0000 4 150 390 8730 3960 read\001
    3020-6
    31216 11250 3690 11970 4140
    32222 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    3323         11970 4140 11250 4140 11250 3690 11970 3690 11970 4140
    34 4 1 0 50 -1 -1 12 0.0000 4 135 390 11610 3960 write\001
     244 1 0 50 -1 -1 12 0.0000 4 150 450 11610 3960 write\001
    3525-6
    36266 9810 2475 10530 2925
    37272 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    3828         10530 2925 9810 2925 9810 2475 10530 2475 10530 2925
    39 4 1 0 50 -1 -1 12 0.0000 4 150 300 10170 2835 port\001
    40 4 1 0 50 -1 -1 12 0.0000 4 135 540 10170 2655 dcache\001
    41 -6
    42 6 6570 3015 7290 3465
    43 2 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    44          7290 3465 6570 3465 6570 3015 7290 3015 7290 3465
    45 4 1 0 50 -1 -1 12 0.0000 4 135 555 6930 3285 commit\001
     294 1 0 50 -1 -1 12 0.0000 4 165 345 10170 2835 port\001
     304 1 0 50 -1 -1 12 0.0000 4 150 630 10170 2655 dcache\001
    4631-6
    47326 3825 3060 4635 3510
    48332 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    4934         4590 3510 3870 3510 3870 3060 4590 3060 4590 3510
    50 4 1 0 50 -1 -1 12 0.0000 4 180 675 4230 3330 predictor\001
     354 1 0 50 -1 -1 12 0.0000 4 195 780 4230 3330 predictor\001
    5136-6
    52376 2970 3690 3690 4140
    53382 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    5439         3690 4140 2970 4140 2970 3690 3690 3690 3690 4140
    55 4 1 0 50 -1 -1 12 0.0000 4 135 390 3330 3960 fetch\001
     404 1 0 50 -1 -1 12 0.0000 4 150 435 3330 3960 fetch\001
    5641-6
    57426 1890 3690 2610 4140
    58432 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    5944         2610 4140 1890 4140 1890 3690 2610 3690 2610 4140
    60 4 1 0 50 -1 -1 12 0.0000 4 150 300 2250 4050 port\001
    61 4 1 0 50 -1 -1 12 0.0000 4 135 495 2250 3870 icache\001
     454 1 0 50 -1 -1 12 0.0000 4 165 345 2250 4050 port\001
     464 1 0 50 -1 -1 12 0.0000 4 150 570 2250 3870 icache\001
    6247-6
    63486 1800 4590 5265 5355
     
    68532 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    6954         2160 5310 1800 5310 1800 5130 2160 5130 2160 5310
    70 4 0 0 50 -1 -1 12 0.0000 4 180 555 2340 4770 Groupe\001
    71 4 0 0 50 -1 -1 12 0.0000 4 180 2280 2340 5310 Une occurence dans le groupe\001
    72 4 0 0 50 -1 -1 12 0.0000 4 180 2760 2340 5040 Plusieurs occurences dans le groupe\001
     554 0 0 50 -1 -1 12 0.0000 4 195 660 2340 4770 Groupe\001
     564 0 0 50 -1 -1 12 0.0000 4 195 2610 2340 5310 Une occurence dans le groupe\001
     574 0 0 50 -1 -1 12 0.0000 4 195 3120 2340 5040 Plusieurs occurences dans le groupe\001
     58-6
     596 6570 3015 7290 3465
     602 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     61         7290 3465 6570 3465 6570 3015 7290 3015 7290 3465
     624 1 0 50 -1 -1 12 0.0000 4 150 645 6930 3285 commit\001
     63-6
     646 4770 3690 5490 4140
     652 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     66         5490 4140 4770 4140 4770 3690 5490 3690 5490 4140
     674 1 0 50 -1 0 12 0.0000 4 150 525 5130 3960 decod\001
    7368-6
    74692 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 4
     
    1701652 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    171166         10530 3870 9810 3870 9810 3420 10530 3420 10530 3870
    172 4 1 0 50 -1 -1 12 0.0000 4 180 585 10170 4905 register\001
    173 4 1 0 50 -1 -1 12 1.5708 4 135 465 10935 3915 select\001
    174 4 1 0 50 -1 -1 12 1.5708 4 135 465 9495 3915 select\001
    175 4 0 1 50 -1 -1 12 0.0000 4 135 360 1710 2205 Core\001
    176 4 0 1 50 -1 -1 12 0.0000 4 135 750 2790 2790 Front End\001
    177 4 0 1 50 -1 -1 12 0.0000 4 180 1185 8190 3015 Execution Loop\001
    178 4 0 1 50 -1 -1 12 0.0000 4 180 1575 5760 2520 Out Of Order Engine\001
    179 4 1 0 50 -1 -1 12 1.5708 4 135 465 7875 3600 select\001
    180 4 1 0 50 -1 -1 12 0.0000 4 105 600 10170 4230 execute\001
    181 4 1 0 50 -1 -1 12 0.0000 4 135 600 10170 3690 memory\001
     1672 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     168         6570 4140 5850 4140 5850 3690 6570 3690 6570 4140
     1694 1 0 50 -1 -1 12 0.0000 4 195 660 10170 4905 register\001
     1704 1 0 50 -1 -1 12 1.5708 4 150 510 10935 3915 select\001
     1714 1 0 50 -1 -1 12 1.5708 4 150 510 9495 3915 select\001
     1724 0 1 50 -1 -1 12 0.0000 4 150 435 1710 2205 Core\001
     1734 0 1 50 -1 -1 12 0.0000 4 150 855 2790 2790 Front End\001
     1744 0 1 50 -1 -1 12 0.0000 4 195 1365 8190 3015 Execution Loop\001
     1754 0 1 50 -1 -1 12 0.0000 4 195 1770 5760 2520 Out Of Order Engine\001
     1764 1 0 50 -1 -1 12 1.5708 4 150 510 7875 3600 select\001
     1774 1 0 50 -1 -1 12 0.0000 4 120 690 10170 4230 execute\001
     1784 1 0 50 -1 -1 12 0.0000 4 150 720 10170 3690 memory\001
     1794 1 0 50 -1 0 12 0.0000 4 105 660 6210 3960 rename\001
  • trunk/IPs/systemC/processor/Morpheo/Script/execute.sh

    r2 r78  
    77declare    FILE_CPT=;
    88declare    FILE_CPU=;
    9 declare    LOCK_CPT="$HOME/.lock-cpt";
    10 declare    LOCK_CPU="$HOME/.lock-cpu";
    11    
     9declare    LOCK_CPT="${HOME}/.lock-cpt";
     10declare    LOCK_CPU="${HOME}/.lock-cpu";
     11
    1212#-----[ lock ]----------------------------------------------
    1313function lock ()
  • trunk/IPs/systemC/processor/Morpheo/Script/execute_n.sh

    r2 r78  
    88declare    FILE_CPT;
    99declare    FILE_CPU;
    10 declare    ID="cpu-$HOSTNAME-$$"
     10declare    ID="cpu-${HOSTNAME}-$$"
    1111
    1212#-----[ usage ]---------------------------------------------
    1313function usage ()
    1414{
    15     echo "Usage : $0 file [ nb_process ]";
    16     echo "      * file       : list of command";
    17     echo "      * nb_process : number of process (default (and maximum) is the number of processor)";
     15    echo "Usage     : $0 file [ nb_process ]";
     16    echo "Arguments : ";
     17    echo " * file       : list of command";
     18    echo " * nb_process : number of process (default (and maximum) is the number of processor)";
    1819    echo "";
    19     echo "Note  - This script, for each command, create a directory : Task_X (X is the number of command), and execute the command in this directory.";
    20     echo "      - Two file is generate : \"output\" is the output of the execution, and \"command\" is the command lunch.";
    21     echo "      - A command empty (no command on a line of file1) is a synchronisation with all process"
    22     echo "      - Don't forgot the final end of line (else the last command is not executed";
     20    echo "Note      : ";
     21    echo " * This script, for each command, create a directory : Task_X (X is the number of command), and execute the command in this directory.";
     22    echo " * Two file is generate : \"output\" is the output of the execution, and \"command\" is the command lunch.";
     23    echo " * A command empty (no command on a line of file) is a synchronisation with all process"
     24    echo " * Don't forgot the final end of line (else the last command is not executed";
    2325    echo "";
    2426    exit;
     
    3032    local FILE_CPUINFO=/proc/cpuinfo;
    3133    if test ! -f $FILE_CPUINFO; then
    32         echo "\"$FILE_CPUINFO\" don't exist."
     34        echo "\"${FILE_CPUINFO}\" don't exist."
    3335        usage;
    3436    fi;
    3537
    36     eval "$1=`grep -c \"processor\" $FILE_CPUINFO`";
     38    eval "$1=`grep -c \"processor\" ${FILE_CPUINFO}`";
    3739}
    3840
  • trunk/IPs/systemC/processor/Morpheo/Script/lock.sh

    r2 r78  
    44function usage ()
    55{
    6     echo "Usage   : ${0} file";
    7     echo "lock file, you can see the lock at \"~/.$(basename file).lock\""
     6    echo "Usage     : ${0} file";
     7    echo "Arguments : ";
     8    echo ' * file : you can see the lock at "${MORPHEO_HOME}/lock/$(basename file).lock"';
     9    echo "Notes     :";
     10    echo " * Morpheo's environnement must be positionned.";
     11
    812    exit;
    913}
     
    1822function main ()
    1923{
    20     if test ${#} -ne 1 -o ! -f ${1}; then
     24    LOCK_DIRECTORY="${MORPHEO_HOME}/lock";
     25
     26    if test ${#} -ne 1 -o -z ${MORPHEO_HOME} -o ! -d ${LOCK_DIRECTORY}; then
    2127        usage ${*};
    2228    fi;
    2329
    24     lock "${HOME}/.$(basename ${1}).lock"
     30    lock "${LOCK_DIRECTORY}/$(basename ${1}).lock"
    2531}
    2632
  • trunk/IPs/systemC/processor/Morpheo/Script/log_trace.pl

    r2 r78  
    2020sub usage()
    2121{
    22     print "usage : $0 rob_trace_file nm_file\n";
    23     print "      * rob_trace_file : Trace file generate by simulation\n";
    24     print "      * nm_file        : List of symbol (generate by nm)\n";
     22    print "Usage     : $0 rob_trace_file nm_file\n";
     23    print "Arguments : ";
     24    print " * rob_trace_file : Trace file generate by simulation\n";
     25    print " * nm_file        : List of symbol (generate by nm)\n";
    2526    exit(1);
    2627}
  • trunk/IPs/systemC/processor/Morpheo/Script/range.sh

    r57 r78  
    44function usage ()
    55{
    6     echo "Usage   : $0 min max [step [iter]]";
     6    echo "Usage     : ${0} min max [step [iter]]";
     7    echo "Arguments : ";
    78    echo " * min  : value minimal";
    89    echo " * max  : value maximal";
     
    1516function range ()
    1617{
    17     declare a=$1;
    18     declare b=$2;
    19     declare step=$3;
     18    declare a=${1};
     19    declare b=${2};
     20    declare step=${3};
    2021
    21     while test $a -lt $b; do
    22         echo $a;
    23         a=$(($a $step));
     22    while test ${a} -lt ${b}; do
     23        echo ${a};
     24        a=$((${a} ${step}));
    2425    done
    2526
    26     if test $a -eq $b; then
    27         echo $a;
     27    if test ${a} -eq ${b}; then
     28        echo ${a};
    2829    fi;
    2930}
     
    3233function range_max ()
    3334{
    34     declare a=$1;
    35     declare b=$2;
    36     declare step=$3;
    37     declare iter=$4;
     35    declare a=${1};
     36    declare b=${2};
     37    declare step=${3};
     38    declare iter=${4};
    3839
    39     while test $a -lt $b -a $iter -gt 1; do
    40         a=$(($a $step));
    41         iter=$(($iter-1));
     40    while test ${a} -lt ${b} -a ${iter} -gt 1; do
     41        a=$((${a} ${step}));
     42        iter=$((${iter}-1));
    4243    done;
    4344
    44     if test $a -eq $b; then
    45         echo $a;
     45    if test ${a} -eq ${b}; then
     46        echo ${a};
    4647    fi;
    4748
    48     if test $iter -eq 1; then
    49         echo $a;
     49    if test ${iter} -eq 1; then
     50        echo ${a};
    5051    fi;
    5152}
     
    5556{
    5657    # create operande
    57     case $# in
    58         2) range $* "+1";;
    59         3) range $*     ;;
    60         4) range_max $* ;;
    61         *) usage $*
     58    case ${#} in
     59        2) range ${*} "+1";;
     60        3) range ${*}     ;;
     61        4) range_max ${*} ;;
     62        *) usage ${*}
    6263    esac
    6364}
    6465
    6566#-----[ Corps ]---------------------------------------------
    66 main $*
     67main ${*}
  • trunk/IPs/systemC/processor/Morpheo/Script/unlock.sh

    r2 r78  
    44function usage ()
    55{
    6     echo "Usage   : ${0} file";
    7     echo "unlock file, you can see the lock at \"~/.$(basename file).lock\""
     6    echo "Usage     : ${0} file";
     7    echo "Arguments : ";
     8    echo ' * file : you can see the lock at "${MORPHEO_HOME}/lock/$(basename file).lock"';
     9    echo "Notes     :";
     10    echo " * Morpheo's environnement must be positionned.";
     11
    812    exit;
    913}
     
    1822function main ()
    1923{
    20     if test ${#} -ne 1 -o ! -f ${1}; then
     24    LOCK_DIRECTORY="${MORPHEO_HOME}/lock";
     25
     26    if test ${#} -ne 1 -o -z ${MORPHEO_HOME} -o ! -d ${LOCK_DIRECTORY}; then
    2127        usage ${*};
    2228    fi;
    2329
    24     unlock "${HOME}/.$(basename ${1}).lock"
     30    unlock "${LOCK_DIRECTORY}/$(basename ${1}).lock"
    2531}
    2632
  • trunk/IPs/systemC/processor/Morpheo/Script/xilinx_extract_info.sh

    r71 r78  
    22
    33for i in *.fpga.log; do
    4 
    54    echo "===== $i";
    65    grep "Number of Slice Registers" $i;
Note: See TracChangeset for help on using the changeset viewer.