Ignore:
Timestamp:
Jun 26, 2009, 10:43:23 AM (15 years ago)
Author:
rosiere
Message:

1) Correct bug in link two signal
2) Fix error detected with valgrind
3) modif distexe script

Location:
trunk/IPs/systemC/processor/Morpheo
Files:
128 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Instance.cpp

    r112 r128  
    144144        DELETE1(_param->_size_load_queue                        ,_param->_nb_load_store_unit);
    145145        DELETE1(_param->_size_store_queue                       ,_param->_nb_load_store_unit);
     146        DELETE1(_param->_write_queue_scheme                     ,_param->_nb_write_bloc);
    146147        DELETE1(_param->_nb_bypass_write                        ,_param->_nb_write_bloc);
    147148        DELETE1(_param->_size_execute_queue                     ,_param->_nb_write_bloc);
     
    150151        DELETE1(_param->_size_reservation_station               ,_param->_nb_read_bloc);
    151152        DELETE1(_param->_size_read_queue                        ,_param->_nb_read_bloc);
    152 //         DELETE1(_param->_size_read_counter                      ,_param->_nb_rename_bloc);
     153//      DELETE1(_param->_size_read_counter                      ,_param->_nb_rename_bloc);
    153154        DELETE1(_param->_nb_rename_unit_bank                    ,_param->_nb_rename_bloc);
    154155        DELETE1(_param->_nb_reg_free                            ,_param->_nb_rename_bloc);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Parameter_definition_test.cpp

    r88 r128  
    5656   
    5757    delete tree;
    58    
     58    delete operand;
     59
    5960    log_end(Configuration,FUNCTION);
    6061  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/config-1_front_end-1_ooo_engine-1_execute_loop.cfg

    r88 r128  
    11114       4       +1      # ooo_engine_nb_inst_branch_complete    [0]          [nb_ooo_engine]
    12124       4       +1      # nb_inst_insert                        [0]          [nb_ooo_engine] 
     134       4       +1      # nb_inst_reexecute                     [0]          [nb_ooo_engine] 
    13144       4       +1      # nb_inst_issue                         [0]          [nb_ooo_engine] 
    14154       4       +1      # nb_inst_execute                       [0]          [nb_ooo_engine] 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/config-4_front_end-1_ooo_engine-1_execute_loop.cfg

    r88 r128  
    20204       4       +1      # ooo_engine_nb_inst_branch_complete    [0]          [nb_ooo_engine]
    21213       3       +1      # nb_inst_insert                        [0]          [nb_ooo_engine] 
     223       3       +1      # nb_inst_reexecute                     [0]          [nb_ooo_engine] 
    22233       3       +1      # nb_inst_issue                         [0]          [nb_ooo_engine] 
    23244       4       +1      # nb_inst_execute                       [0]          [nb_ooo_engine] 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/config-4_front_end-3_ooo_engine-1_execute_loop.cfg

    r88 r128  
    28281       1       +1      # nb_inst_insert                        [1]          [nb_ooo_engine] 
    29292       2       +1      # nb_inst_insert                        [2]          [nb_ooo_engine] 
     303       3       +1      # nb_inst_reexecute                     [0]          [nb_ooo_engine] 
     311       1       +1      # nb_inst_reexecute                     [1]          [nb_ooo_engine] 
     322       2       +1      # nb_inst_reexecute                     [2]          [nb_ooo_engine] 
    30333       3       +1      # nb_inst_issue                         [0]          [nb_ooo_engine] 
    31341       1       +1      # nb_inst_issue                         [1]          [nb_ooo_engine] 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/config-4_front_end-3_ooo_engine-2_execute_loop.cfg

    r88 r128  
    29291       1       +1      # nb_inst_insert                        [1]          [nb_ooo_engine] 
    30302       2       +1      # nb_inst_insert                        [2]          [nb_ooo_engine] 
     313       3       +1      # nb_inst_reexecute                     [0]          [nb_ooo_engine] 
     321       1       +1      # nb_inst_reexecute                     [1]          [nb_ooo_engine] 
     332       2       +1      # nb_inst_reexecute                     [2]          [nb_ooo_engine] 
    31343       3       +1      # nb_inst_issue                         [0]          [nb_ooo_engine] 
    32351       1       +1      # nb_inst_issue                         [1]          [nb_ooo_engine] 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/config-min.cfg

    r117 r128  
    11111       1       +1      # ooo_engine_nb_inst_branch_complete    [0]                  [nb_ooo_engine]
    12121       1       +1      # nb_inst_insert                        [0]                  [nb_ooo_engine] 
     131       1       +1      # nb_inst_reexecute                     [0]                  [nb_ooo_engine] 
    13141       1       +1      # nb_inst_issue                         [0]                  [nb_ooo_engine] 
    14151       1       +1      # nb_inst_execute                       [0][0]               [nb_ooo_engine][ooo_engine_nb_execute_loop]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/src/main.cpp

    r117 r128  
    2525  err (_(" * ooo_engine_nb_inst_branch_complete    [nb_ooo_engine]                                            (uint32_t         )\n"));
    2626  err (_(" * nb_inst_insert                        [nb_ooo_engine]                                            (uint32_t         )\n"));
     27  err (_(" * nb_inst_reexecute                     [nb_ooo_engine]                                            (uint32_t         )\n"));
    2728//err (_(" * nb_inst_issue_queue                   [nb_ooo_engine]                                            (uint32_t         )\n"));
    2829  err (_(" * nb_inst_issue_slot                    [nb_ooo_engine]                                            (uint32_t         )\n"));
    2930  err (_(" * nb_inst_execute                       [nb_ooo_engine][ooo_engine_nb_execute_loop]                (uint32_t         )\n"));
     31//err (_(" * issue_queue_in_order                  [nb_ooo_engine]                                            (bool             )\n"));
    3032  err (_(" * nb_read_unit                          [nb_execute_loop]                                          (uint32_t         )\n"));
    3133  err (_(" * nb_write_unit                         [nb_execute_loop]                                          (uint32_t         )\n"));
     
    8688  uint32_t              * ooo_engine_nb_inst_branch_complete   ;//[nb_ooo_engine]
    8789  uint32_t              * nb_inst_insert                       ;//[nb_ooo_engine]
     90  uint32_t              * nb_inst_reexecute                    ;//[nb_ooo_engine]
    8891  uint32_t              * nb_inst_issue_slot                   ;//[nb_ooo_engine]
    8992  uint32_t             ** nb_inst_execute                      ;//[nb_ooo_engine][ooo_engine_nb_execute_loop]
     93  bool                  * issue_queue_in_order                 ;//[nb_ooo_engine]
    9094  uint32_t              * nb_read_unit                         ;//[nb_execute_loop]
    9195  uint32_t              * nb_write_unit                        ;//[nb_execute_loop]
     
    121125  nb_params = static_cast<int> (2+NB_PARAMS+
    122126                                3*nb_front_end+
    123                                 5*nb_ooo_engine+
     127                                6*nb_ooo_engine+
    124128                                3*nb_execute_loop
    125129                                );
     
    134138  SELFTEST1(ooo_engine_nb_inst_branch_complete   ,uint32_t         ,argv,x,nb_ooo_engine);
    135139  SELFTEST1(nb_inst_insert                       ,uint32_t         ,argv,x,nb_ooo_engine);
     140  SELFTEST1(nb_inst_reexecute                    ,uint32_t         ,argv,x,nb_ooo_engine);
    136141  SELFTEST1(nb_inst_issue_slot                   ,uint32_t         ,argv,x,nb_ooo_engine);
    137142
     
    149154  nb_params = static_cast<int> (2+NB_PARAMS+
    150155                                3*nb_front_end+
    151                                 5*nb_ooo_engine+
     156                                6*nb_ooo_engine+
    152157                                3*nb_execute_loop+
    153158                                1*sum_ooo_engine_nb_execute_loop
     
    157162
    158163  SELFTEST2(nb_inst_execute                      ,uint32_t         ,argv,x,nb_ooo_engine,ooo_engine_nb_execute_loop[it1]);
     164
     165  ALLOC1   (issue_queue_in_order                 ,bool                    ,nb_ooo_engine);
     166  for (uint32_t i=0; i<nb_ooo_engine; ++i)
     167    issue_queue_in_order [i] = true;
     168
    159169  SELFTEST1(nb_read_unit                         ,uint32_t         ,argv,x,nb_execute_loop);
    160170  SELFTEST1(nb_write_unit                        ,uint32_t         ,argv,x,nb_execute_loop);
     
    179189  nb_params = static_cast<int> (2+NB_PARAMS+
    180190                                3*nb_front_end+
    181                                 5*nb_ooo_engine+
     191                                6*nb_ooo_engine+
    182192                                3*nb_execute_loop+
    183193                                sum_nb_inst_issue*sum_nb_read_unit+
     
    239249         ooo_engine_nb_inst_branch_complete   ,//[nb_ooo_engine]
    240250         nb_inst_insert                       ,//[nb_ooo_engine]
     251         nb_inst_reexecute                    ,//[nb_ooo_engine]
    241252         nb_inst_issue_slot                   ,//[nb_ooo_engine]
    242253         nb_inst_issue_slot                   ,//[nb_ooo_engine]
    243254         nb_inst_execute                      ,//[nb_ooo_engine][ooo_engine_nb_execute_loop]
     255         issue_queue_in_order                 ,//[nb_ooo_engine]
    244256         nb_read_unit                         ,//[nb_execute_loop]
    245257         nb_write_unit                        ,//[nb_execute_loop]
     
    265277     
    266278      test (name,param);
     279
     280      delete param;
    267281    }
    268282  catch (morpheo::ErrorMorpheo & error)
     
    285299    }
    286300
    287   DELETE2(translate_execute_loop_num_ooo_engine,nb_execute_loop,execute_loop_nb_ooo_engine[it1]);
    288   DELETE2(translate_ooo_engine_num_execute_loop,nb_ooo_engine,ooo_engine_nb_execute_loop[it1]);
    289   DELETE2(translate_ooo_engine_num_front_end   ,nb_ooo_engine,ooo_engine_nb_front_end[it1]);
    290   DELETE3(table_issue_type                                                           ,nb_execute_loop,nb_read_unit[it1],MAX_TYPE);
    291   DELETE4(table_dispatch                       ,nb_ooo_engine,nb_inst_issue_slot[it1],nb_execute_loop,nb_read_unit[it2]);
     301//DELETE0(size_special_register                );
     302//DELETE0(size_general_register                );
     303//DELETE0(size_special_data                    );
     304//DELETE0(size_general_data                    );
     305//DELETE0(size_store_queue_ptr                 );
     306//DELETE0(size_load_queue_ptr                  );
     307//DELETE0(size_rob_ptr                         );
     308//DELETE0(size_depth                           );
    292309  DELETE1(nb_write_unit                        ,nb_execute_loop);
    293310  DELETE1(nb_read_unit                         ,nb_execute_loop);
     311  DELETE1(issue_queue_in_order                 ,nb_ooo_engine);
    294312  DELETE2(nb_inst_execute                      ,nb_ooo_engine,ooo_engine_nb_execute_loop[it1]);
    295313  DELETE1(nb_inst_issue_slot                   ,nb_ooo_engine);
     314  DELETE1(nb_inst_reexecute                    ,nb_ooo_engine);
     315  DELETE1(nb_inst_insert                       ,nb_ooo_engine);
    296316  DELETE1(ooo_engine_nb_inst_branch_complete   ,nb_ooo_engine);
    297317  DELETE1(front_end_nb_inst_branch_complete    ,nb_front_end);
     
    300320  DELETE1(ooo_engine_nb_execute_loop           ,nb_ooo_engine);
    301321  DELETE1(ooo_engine_nb_front_end              ,nb_ooo_engine);
     322//DELETE0(nb_execute_loop                      );
     323//DELETE0(nb_ooo_engine                        );
    302324  DELETE1(nb_context                           ,nb_front_end);
     325//DELETE0(nb_front_end                         );
    303326
    304327  return (_return);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/src/test.cpp

    r117 r128  
    1919  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
    2020#endif
     21
     22  _model.set_model(NAME_Core_Glue,MODEL_SYSTEMC,true);
    2123
    2224  Tusage_t _usage = USE_ALL;
     
    5052
    5153  sc_signal<Tcontext_t        >  *** out_RENAME_FRONT_END_ID                       ;
     54
    5255  sc_signal<Tcontrol_t        >  *** out_BRANCH_COMPLETE_FRONT_END_VAL             ;
    5356  sc_signal<Tcontrol_t        >  ***  in_BRANCH_COMPLETE_FRONT_END_ACK             ;
     
    5760  sc_signal<Tcontrol_t        >  *** out_BRANCH_COMPLETE_FRONT_END_NO_SEQUENCE     ;
    5861  sc_signal<Tcontrol_t        >  ***  in_BRANCH_COMPLETE_FRONT_END_MISS_PREDICTION ;
     62
    5963  sc_signal<Tcontrol_t        >  ***  in_BRANCH_COMPLETE_OOO_ENGINE_VAL            ;
    6064  sc_signal<Tcontrol_t        >  *** out_BRANCH_COMPLETE_OOO_ENGINE_ACK            ;
     
    6569  sc_signal<Tcontrol_t        >  ***  in_BRANCH_COMPLETE_OOO_ENGINE_NO_SEQUENCE    ;
    6670  sc_signal<Tcontrol_t        >  *** out_BRANCH_COMPLETE_OOO_ENGINE_MISS_PREDICTION;
     71
    6772  sc_signal<Tcontrol_t        >   ** out_COMMIT_EVENT_FRONT_END_VAL                ;
    6873  sc_signal<Tcontrol_t        >   **  in_COMMIT_EVENT_FRONT_END_ACK                ;
     
    7681  sc_signal<Tcontrol_t        >   ** out_COMMIT_EVENT_FRONT_END_ADDRESS_EEAR_VAL   ;
    7782  sc_signal<Tgeneral_data_t   >   ** out_COMMIT_EVENT_FRONT_END_ADDRESS_EEAR       ;
     83
    7884  sc_signal<Tcontrol_t        >   **  in_COMMIT_EVENT_OOO_ENGINE_VAL               ;
    7985  sc_signal<Tcontrol_t        >   ** out_COMMIT_EVENT_OOO_ENGINE_ACK               ;
     
    8894  sc_signal<Tcontrol_t        >   **  in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR_VAL  ;
    8995  sc_signal<Tgeneral_data_t   >   **  in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR      ;
     96
    9097  sc_signal<Tcontrol_t        >  ***  in_ISSUE_OOO_ENGINE_VAL                      ;
    9198  sc_signal<Tcontrol_t        >  *** out_ISSUE_OOO_ENGINE_ACK                      ;
     
    96103  sc_signal<Toperation_t      >  ***  in_ISSUE_OOO_ENGINE_OPERATION                ;
    97104  sc_signal<Tlsq_ptr_t        >  ***  in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE    ;
     105  sc_signal<Tlsq_ptr_t        >  ***  in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ     ;
     106  sc_signal<Tcontrol_t        >  ***  in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY        ;
    98107  sc_signal<Tlsq_ptr_t        >  ***  in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE     ;
    99108  sc_signal<Tcontrol_t        >  ***  in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT             ;
     
    109118  sc_signal<Tcontrol_t        >  ***  in_ISSUE_OOO_ENGINE_WRITE_RE                 ;
    110119  sc_signal<Tspecial_address_t>  ***  in_ISSUE_OOO_ENGINE_NUM_REG_RE               ;
     120
    111121  sc_signal<Tcontrol_t        >  *** out_ISSUE_EXECUTE_LOOP_VAL                    ;
    112122  sc_signal<Tcontrol_t        >  ***  in_ISSUE_EXECUTE_LOOP_ACK                    ;
     
    118128  sc_signal<Ttype_t           >  *** out_ISSUE_EXECUTE_LOOP_TYPE                   ;
    119129  sc_signal<Tlsq_ptr_t        >  *** out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE  ;
     130  sc_signal<Tlsq_ptr_t        >  *** out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_READ   ;
     131  sc_signal<Tcontrol_t        >  *** out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_EMPTY      ;
    120132  sc_signal<Tlsq_ptr_t        >  *** out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE   ;
    121133  sc_signal<Tcontrol_t        >  *** out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT           ;
     
    131143  sc_signal<Tcontrol_t        >  *** out_ISSUE_EXECUTE_LOOP_WRITE_RE               ;
    132144  sc_signal<Tspecial_address_t>  *** out_ISSUE_EXECUTE_LOOP_NUM_REG_RE             ;
     145
    133146  sc_signal<Tcontrol_t        > **** out_EXECUTE_OOO_ENGINE_VAL                    ;
    134147  sc_signal<Tcontrol_t        > ****  in_EXECUTE_OOO_ENGINE_ACK                    ;
     
    143156  sc_signal<Taddress_t        > **** out_EXECUTE_OOO_ENGINE_ADDRESS                ;
    144157  sc_signal<Tgeneral_data_t   > **** out_EXECUTE_OOO_ENGINE_DATA                   ;
     158
    145159  sc_signal<Tcontrol_t        >  ***  in_EXECUTE_EXECUTE_LOOP_VAL                  ;
    146160  sc_signal<Tcontrol_t        >  *** out_EXECUTE_EXECUTE_LOOP_ACK                  ;
     
    156170  sc_signal<Taddress_t        >  ***  in_EXECUTE_EXECUTE_LOOP_ADDRESS              ;
    157171  sc_signal<Tgeneral_data_t   >  ***  in_EXECUTE_EXECUTE_LOOP_DATA                 ;
     172
    158173  sc_signal<Tcontrol_t        >  ***  in_INSERT_OOO_ENGINE_VAL                     ;
    159174  sc_signal<Tcontrol_t        >  *** out_INSERT_OOO_ENGINE_ACK                     ;
     
    216231  ALLOC2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_OPERATION                ," in_ISSUE_OOO_ENGINE_OPERATION                ",Toperation_t      ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
    217232  ALLOC2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE    ," in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE    ",Tlsq_ptr_t        ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
     233  ALLOC2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ     ," in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ     ",Tlsq_ptr_t        ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
     234  ALLOC2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY        ," in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY        ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
    218235  ALLOC2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE     ," in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE     ",Tlsq_ptr_t        ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
    219236  ALLOC2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT             ," in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT             ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
     
    238255  ALLOC2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_TYPE                   ,"out_ISSUE_EXECUTE_LOOP_TYPE                   ",Ttype_t           ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
    239256  ALLOC2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE  ,"out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE  ",Tlsq_ptr_t        ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
     257  ALLOC2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_READ   ,"out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_READ   ",Tlsq_ptr_t        ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
     258  ALLOC2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_EMPTY      ,"out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_EMPTY      ",Tcontrol_t        ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
    240259  ALLOC2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE   ,"out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE   ",Tlsq_ptr_t        ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
    241260  ALLOC2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT           ,"out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT           ",Tcontrol_t        ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
     
    358377  INSTANCE2_SC_SIGNAL(_Core_Glue, in_ISSUE_OOO_ENGINE_TYPE                     ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
    359378  INSTANCE2_SC_SIGNAL(_Core_Glue, in_ISSUE_OOO_ENGINE_OPERATION                ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
    360   INSTANCE2_SC_SIGNAL(_Core_Glue, in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE    ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
     379  INSTANCE2_SC_SIGNAL(_Core_Glue, in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE    ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
     380  INSTANCE2_SC_SIGNAL(_Core_Glue, in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ     ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
     381  INSTANCE2_SC_SIGNAL(_Core_Glue, in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY        ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
    361382  if (_param->_have_port_load_queue_ptr)
    362383  INSTANCE2_SC_SIGNAL(_Core_Glue, in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE     ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
     
    386407  INSTANCE2_SC_SIGNAL(_Core_Glue,out_ISSUE_EXECUTE_LOOP_TYPE                   ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
    387408  INSTANCE2_SC_SIGNAL(_Core_Glue,out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE  ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
     409  INSTANCE2_SC_SIGNAL(_Core_Glue,out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_READ   ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
     410  INSTANCE2_SC_SIGNAL(_Core_Glue,out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_EMPTY      ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
    388411  if (_param->_have_port_load_queue_ptr)
    389412  INSTANCE2_SC_SIGNAL(_Core_Glue,out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE   ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
     
    469492  in_NRESET->write(1); 
    470493
     494#ifdef SELFTEST
    471495  LABEL("Test RENAME_FRONT_END_ID");
    472496  if (_param->_have_port_front_end_id)
     
    612636            in_ISSUE_OOO_ENGINE_OPERATION             [i][j]->write(range<Ttype_t        >(rand(),_param->_size_type               ));
    613637            in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE [i][j]->write(range<Tlsq_ptr_t     >(rand(),_param->_size_store_queue_ptr    ));
     638            in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ  [i][j]->write(range<Tlsq_ptr_t     >(rand(),_param->_size_store_queue_ptr    ));
     639            in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY     [i][j]->write(rand()%2);
    614640            in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE  [i][j]->write(range<Tlsq_ptr_t     >(rand(),_param->_size_load_queue_ptr     ));
    615641            in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT          [i][j]->write(rand()%2);
     
    751777              TEST(Tlsq_ptr_t        ,out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE  [i][j]->read(),
    752778                                       in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE    [x][y]->read());
     779              TEST(Tlsq_ptr_t        ,out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_READ   [i][j]->read(),
     780                                       in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ     [x][y]->read());
     781              TEST(Tlsq_ptr_t        ,out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_EMPTY      [i][j]->read(),
     782                                       in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY        [x][y]->read());
    753783              TEST(Tlsq_ptr_t        ,out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE   [i][j]->read(),
    754784                                       in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE     [x][y]->read());
     
    781811      SC_START(1);
    782812    }
     813#else
     814  SC_START(5);
     815#endif
    783816
    784817  /********************************************************
     
    841874  DELETE2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_OPERATION                ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
    842875  DELETE2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE    ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
     876  DELETE2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ     ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
     877  DELETE2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY        ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
    843878  DELETE2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE     ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
    844879  DELETE2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT             ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]);
     
    863898  DELETE2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_TYPE                   ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
    864899  DELETE2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE  ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
     900  DELETE2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_READ   ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
     901  DELETE2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_EMPTY      ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
    865902  DELETE2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE   ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
    866903  DELETE2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT           ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_allocation.cpp

    r122 r128  
    1010#include "Common/include/Max.h"
    1111
    12 namespace morpheo                    {
     12namespace morpheo {
    1313namespace behavioural {
    1414namespace core {
    1515namespace core_glue {
    16 
    17 
    1816
    1917#undef  FUNCTION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/SelfTest/src/main.cpp

    r88 r128  
    1515  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
    1616  err (_("list_params is :\n"));
     17//err (_(" * nb_thread                                                                 (uint32_t         )\n"));
    1718  err (_(" * nb_execute_loop                                                           (uint32_t         )\n"));
    1819  err (_(" * nb_load_store_unit [nb_execute_loop]                                      (uint32_t         )\n"));
     
    158159     
    159160      test (name,param);
     161
     162      delete param;
    160163    }
    161164  catch (morpheo::ErrorMorpheo & error)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/SelfTest/src/test.cpp

    r88 r128  
    5454  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    5555  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     56
     57  sc_signal<Tcontrol_t        >   ** out_DCACHE_REQ_VAL         ;
     58  sc_signal<Tcontrol_t        >   **  in_DCACHE_REQ_ACK         ;
     59  sc_signal<Tcontext_t        >   ** out_DCACHE_REQ_THREAD_ID   ;
     60  sc_signal<Tpacket_t         >   ** out_DCACHE_REQ_PACKET_ID   ;
     61  sc_signal<Tdcache_address_t >   ** out_DCACHE_REQ_ADDRESS     ;
     62  sc_signal<Tdcache_data_t    >   ** out_DCACHE_REQ_WDATA       ;
     63  sc_signal<Tdcache_type_t    >   ** out_DCACHE_REQ_TYPE        ;
     64
     65  sc_signal<Tcontrol_t        >   **  in_DCACHE_RSP_VAL         ;
     66  sc_signal<Tcontrol_t        >   ** out_DCACHE_RSP_ACK         ;
     67  sc_signal<Tcontext_t        >   **  in_DCACHE_RSP_THREAD_ID   ;
     68  sc_signal<Tpacket_t         >   **  in_DCACHE_RSP_PACKET_ID   ;
     69  sc_signal<Tdcache_data_t    >   **  in_DCACHE_RSP_RDATA       ;
     70  sc_signal<Tdcache_error_t   >   **  in_DCACHE_RSP_ERROR       ;
     71
     72  sc_signal<Tcontrol_t        > ****  in_LSQ_REQ_VAL            ;
     73  sc_signal<Tcontrol_t        > **** out_LSQ_REQ_ACK            ;
     74  sc_signal<Tcontext_t        > ****  in_LSQ_REQ_THREAD_ID      ;
     75  sc_signal<Tpacket_t         > ****  in_LSQ_REQ_PACKET_ID      ;
     76  sc_signal<Tdcache_address_t > ****  in_LSQ_REQ_ADDRESS        ;
     77  sc_signal<Tdcache_data_t    > ****  in_LSQ_REQ_WDATA          ;
     78  sc_signal<Tdcache_type_t    > ****  in_LSQ_REQ_TYPE           ;
     79
     80  sc_signal<Tcontrol_t        > **** out_LSQ_RSP_VAL            ;
     81  sc_signal<Tcontrol_t        > ****  in_LSQ_RSP_ACK            ;
     82  sc_signal<Tcontext_t        > **** out_LSQ_RSP_THREAD_ID      ;
     83  sc_signal<Tpacket_t         > **** out_LSQ_RSP_PACKET_ID      ;
     84  sc_signal<Tdcache_data_t    > **** out_LSQ_RSP_RDATA          ;
     85  sc_signal<Tdcache_error_t   > **** out_LSQ_RSP_ERROR          ;
    5686
    5787  ALLOC1_SC_SIGNAL(out_DCACHE_REQ_VAL         ,"out_DCACHE_REQ_VAL      ",Tcontrol_t        ,_param->_nb_dcache_port);
     
    183213  in_NRESET->write(1); 
    184214
     215#ifdef SELFTEST
    185216  LABEL("Loop of Test");
    186217
     
    280311      SC_START(1);
    281312    }
     313#else
     314  SC_START(5);
     315#endif
    282316
    283317  /********************************************************
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/src/Dcache_Access_genMealy_req.cpp

    r123 r128  
    2020  {
    2121    log_begin(Dcache_Access,FUNCTION);
     22    log_function(Dcache_Access,FUNCTION,_name.c_str());
    2223
    2324    if (PORT_READ(in_NRESET))
     
    5354              {
    5455                uint32_t   num_port       = _param->_table_routing[num_execute_loop][num_load_store_unit][num_cache_access];
     56
     57                log_printf(TRACE,Dcache_Access,FUNCTION,"  * LSQ_REQ [%d][%d][%d] <-> DCACHE_REQ [%d]",num_execute_loop,num_load_store_unit,num_cache_access,num_port);
     58
    5559                Tcontrol_t dcache_req_ack = PORT_READ(in_DCACHE_REQ_ACK [num_port]);
    5660
    57                 log_printf(TRACE,Dcache_Access,FUNCTION,"  * num_port      : %d",num_port);
    58                
    5961#ifdef STATISTICS
    6062                if (dcache_req_ack)
     
    6769                if (not dcache_req_val [num_port])
    6870                  {
     71                    log_printf(TRACE,Dcache_Access,FUNCTION,"  * is valid !!!");
     72
    6973                    dcache_req_val  [num_port] = 1;
    7074                    lsq_req_ack [num_execute_loop][num_load_store_unit][num_cache_access] = dcache_req_ack;
    7175                   
    72                     log_printf(TRACE,Dcache_Access,FUNCTION,"    * kane - dcache");
    73 
    7476                    if (_param->_have_port_dcache_thread_id)
    7577                      {
     
    7981                    log_printf(TRACE,Dcache_Access,FUNCTION,"    * num_thread  : %d",num_thread );
    8082
     83#ifdef DEBUG_TEST
     84                    if (num_thread >= _param->_nb_thread)
     85                      throw ERRORMORPHEO(FUNCTION,toString(_("Invalid thread number : %d\n"),num_thread));
     86#endif
    8187
    8288                    PORT_WRITE(out_DCACHE_REQ_THREAD_ID [num_port], num_thread);
     
    8894                    if (_param->_have_port_dcache_packet_id)
    8995                      {
    90                     Tpacket_t packet_id = (_param->_have_port_lsq_packet_id [num_execute_loop][num_load_store_unit])?PORT_READ(in_LSQ_REQ_PACKET_ID [num_execute_loop][num_load_store_unit][num_cache_access]):0;
    91                     PORT_WRITE(out_DCACHE_REQ_PACKET_ID [num_port], ((num_cache_access    << _param->_shift_num_cache_access   )+
    92                                                                      packet_id));
     96                    Tpacket_t packet_id = ((num_cache_access << _param->_shift_num_cache_access)+
     97                                           ((_param->_have_port_lsq_packet_id [num_execute_loop][num_load_store_unit])?PORT_READ(in_LSQ_REQ_PACKET_ID [num_execute_loop][num_load_store_unit][num_cache_access]):0));
     98
     99                    log_printf(TRACE,Dcache_Access,FUNCTION,"    * packet_id   : %d",packet_id);
     100
     101                    PORT_WRITE(out_DCACHE_REQ_PACKET_ID [num_port], packet_id);
    93102                      }
    94103                    PORT_WRITE(out_DCACHE_REQ_ADDRESS   [num_port], PORT_READ(in_LSQ_REQ_ADDRESS   [num_execute_loop][num_load_store_unit][num_cache_access]));
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/src/Dcache_Access_genMealy_rsp.cpp

    r123 r128  
    2020  {
    2121    log_begin(Dcache_Access,FUNCTION);
     22    log_function(Dcache_Access,FUNCTION,_name.c_str());
    2223
    2324    if (PORT_READ(in_NRESET))
     
    4647            Tpacket_t  lsq_packet_id       =  packet_id                                        & _param->_mask_num_lsq_packet;
    4748
    48 //          log_printf(TRACE,Dcache_Access,FUNCTION,"thread_id          : %d",thread_id);
    49 //          log_printf(TRACE,Dcache_Access,FUNCTION,"execute_loop_id    : %d",execute_loop_id);
    50 //          log_printf(TRACE,Dcache_Access,FUNCTION,"load_store_unit_id : %d",load_store_unit_id);
    51 //          log_printf(TRACE,Dcache_Access,FUNCTION,"cache_access_id    : %d",cache_access_id);
     49            log_printf(TRACE,Dcache_Access,FUNCTION,"  * DCACHE_RSP [%d] <-> LSQ_RSP [%d][%d][%d]",i,execute_loop_id,load_store_unit_id,cache_access_id);
     50
     51            log_printf(TRACE,Dcache_Access,FUNCTION,"    * thread_id            : %d",thread_id);
     52            log_printf(TRACE,Dcache_Access,FUNCTION,"      * execute_loop_id    : %d",execute_loop_id);
     53            log_printf(TRACE,Dcache_Access,FUNCTION,"      * load_store_unit_id : %d",load_store_unit_id);
     54            log_printf(TRACE,Dcache_Access,FUNCTION,"      * context_id         : %d",context_id);
     55            log_printf(TRACE,Dcache_Access,FUNCTION,"    * packet_id            : %d",thread_id);
     56            log_printf(TRACE,Dcache_Access,FUNCTION,"      * cache_access_id    : %d",cache_access_id);
     57            log_printf(TRACE,Dcache_Access,FUNCTION,"      * lsq_packet_id      : %d",lsq_packet_id);
    5258           
    5359#ifdef DEBUG_TEST
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/src/Parameters.cpp

    r88 r128  
    5555    _translate_load_store_unit_to_thread = translate_load_store_unit_to_thread;
    5656
     57//     log_printf(TRACE,Dcache_Access,FUNCTION,"  * table_routing");
     58//     for (uint32_t i=0; i<_nb_execute_loop; i++)
     59//       for (uint32_t j=0; j<_nb_load_store_unit [i]; ++j)
     60//      for (uint32_t k=0; k<_nb_cache_access [i][j]; ++k)
     61//           log_printf(TRACE,Dcache_Access,FUNCTION,"    [%d][%d][%d] %d",i,j,k,_table_routing [i][j][k]);
     62
     63//     log_printf(TRACE,Dcache_Access,FUNCTION,"  * translate_load_store_unit_to_thread");
     64//     for (uint32_t i=0; i<_nb_execute_loop; i++)
     65//       for (uint32_t j=0; j<_nb_load_store_unit [i]; j++)
     66//         for (uint32_t k=0; k<_nb_context[i]; k++)
     67//           log_printf(TRACE,Dcache_Access,FUNCTION,"    [%d][%d][%d] %d",i,j,k,_translate_load_store_unit_to_thread [i][j][k]);
     68
    5769    test();
    5870
     
    93105    _translate_thread_to_context         = new uint32_t [nb_thread];
    94106
     107    log_printf(TRACE,Dcache_Access,FUNCTION,"  * translate_load_store_unit_to_thread");
     108
    95109    for (uint32_t i=0; i<_nb_execute_loop; ++i)
    96110      for (uint32_t j=0; j<_nb_load_store_unit [i]; ++j)
     
    99113            uint32_t num_thread = _translate_load_store_unit_to_thread [i][j][k];
    100114           
     115            log_printf(TRACE,Dcache_Access,FUNCTION,"    [%d][%d][%d] %d",i,j,k,_translate_load_store_unit_to_thread [i][j][k]);
     116
     117            if (num_thread < _nb_thread)
     118              {
    101119            _translate_thread_to_execute_loop    [num_thread] = i;
    102120            _translate_thread_to_load_store_unit [num_thread] = j;
    103121            _translate_thread_to_context         [num_thread] = k;
     122              }
     123            else
     124              {
     125            _translate_thread_to_execute_loop    [num_thread] = _nb_execute_loop;
     126            _translate_thread_to_load_store_unit [num_thread] = _nb_load_store_unit [i];
     127            _translate_thread_to_context         [num_thread] = _nb_context [i];
     128              }
    104129          }
    105130
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/src/Parameters_msg_error.cpp

    r88 r128  
    4949          {
    5050            uint32_t num_thread = _translate_load_store_unit_to_thread [i][j][k];
    51             if (num_thread >= _nb_thread)
    52               test.error(toString(_("Context [%d][%d][%d] is linked with an invalid thread id.\n"),i,j,k));
    53             else
    54               if (thread_link [num_thread] == true)
    55                 test.error(toString(_("Context [%d][%d][%d] is linked with an already used thread id.\n"),i,j,k));
    56               else
    57                 thread_link [num_thread] = true;
     51
     52            if (num_thread != _nb_thread)
     53              thread_link [num_thread] = true;
     54
     55//             if (num_thread >= _nb_thread)
     56//               test.error(toString(_("Context [%d][%d][%d] is linked with an invalid thread id.\n"),i,j,k));
     57//             else
     58//               if (thread_link [num_thread] == true)
     59//                 test.error(toString(_("Context [%d][%d][%d] is linked with an already used thread id.\n"),i,j,k));
     60//               else
     61//                 thread_link [num_thread] = true;
    5862          }
    5963
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Icache_Access/SelfTest/src/main.cpp

    r88 r128  
    121121     
    122122      test (name,param);
     123
     124      delete param;
    123125    }
    124126  catch (morpheo::ErrorMorpheo & error)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Icache_Access/SelfTest/src/test.cpp

    r112 r128  
    5353  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    5454  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     55
     56  sc_signal<Tcontrol_t           >   ** out_ICACHE_REQ_VAL         ;
     57  sc_signal<Tcontrol_t           >   **  in_ICACHE_REQ_ACK         ;
     58  sc_signal<Tcontext_t           >   ** out_ICACHE_REQ_THREAD_ID   ;
     59  sc_signal<Tpacket_t            >   ** out_ICACHE_REQ_PACKET_ID   ;
     60  sc_signal<Ticache_address_t    >   ** out_ICACHE_REQ_ADDRESS     ;
     61  sc_signal<Ticache_type_t       >   ** out_ICACHE_REQ_TYPE        ;
     62  sc_signal<Tcontrol_t           >   **  in_ICACHE_RSP_VAL         ;
     63  sc_signal<Tcontrol_t           >   ** out_ICACHE_RSP_ACK         ;
     64  sc_signal<Tcontext_t           >   **  in_ICACHE_RSP_THREAD_ID   ;
     65  sc_signal<Tpacket_t            >   **  in_ICACHE_RSP_PACKET_ID   ;
     66  sc_signal<Ticache_instruction_t>  ***  in_ICACHE_RSP_INSTRUCTION ;
     67  sc_signal<Ticache_error_t      >   **  in_ICACHE_RSP_ERROR       ;
     68  sc_signal<Tcontrol_t           >  ***  in_CONTEXT_REQ_VAL        ;
     69  sc_signal<Tcontrol_t           >  *** out_CONTEXT_REQ_ACK        ;
     70//sc_signal<Tcontext_t           >  ***  in_CONTEXT_REQ_THREAD_ID  ;
     71  sc_signal<Tpacket_t            >  ***  in_CONTEXT_REQ_PACKET_ID  ;
     72  sc_signal<Ticache_address_t    >  ***  in_CONTEXT_REQ_ADDRESS    ;
     73  sc_signal<Ticache_type_t       >  ***  in_CONTEXT_REQ_TYPE       ;
     74  sc_signal<Tcontrol_t           >  *** out_CONTEXT_RSP_VAL        ;
     75  sc_signal<Tcontrol_t           >  ***  in_CONTEXT_RSP_ACK        ;
     76//sc_signal<Tcontext_t           >  *** out_CONTEXT_RSP_THREAD_ID  ;
     77  sc_signal<Tpacket_t            >  *** out_CONTEXT_RSP_PACKET_ID  ;
     78  sc_signal<Ticache_instruction_t> **** out_CONTEXT_RSP_INSTRUCTION;
     79  sc_signal<Ticache_error_t      >  *** out_CONTEXT_RSP_ERROR      ;
    5580
    5681  ALLOC1_SC_SIGNAL(out_ICACHE_REQ_VAL         ,"out_ICACHE_REQ_VAL         ",Tcontrol_t           ,_param->_nb_icache_port);
     
    165190  in_NRESET->write(1); 
    166191
     192#ifdef SELFTEST
    167193  LABEL("Loop of Test");
    168194
     
    259285      SC_START(1);
    260286    }
     287#else
     288  SC_START(5);
     289#endif
    261290
    262291  /********************************************************
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Types.h

    r116 r128  
    109109      for (uint32_t i=0; i<NB_GROUP; i++)
    110110        {
    111           _spr               [i] = NULL;
     111          _spr [i] = NULL;
    112112        }
    113113    }
     
    117117      for (uint32_t x=0; x<NB_GROUP; x++)
    118118        if (_spr[x] != NULL)
    119           delete _spr[x];
    120       delete _spr;
    121       delete _spr_access_mode;
     119          delete [] _spr[x];
     120      delete [] _spr;
     121      delete    _spr_access_mode;
    122122    }
    123123
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_deallocation.cpp

    r122 r128  
    3232        DELETE0_SIGNAL( in_EXECUTE_IN_VAL                   ,1);
    3333        DELETE0_SIGNAL(out_EXECUTE_IN_ACK                   ,1);
    34         DELETE0_SIGNAL( in_EXECUTE_IN_CONTEXT_ID            , _param->_size_context_id   );
    35         DELETE0_SIGNAL( in_EXECUTE_IN_FRONT_END_ID          , _param->_size_front_end_id );
    36         DELETE0_SIGNAL( in_EXECUTE_IN_OOO_ENGINE_ID         , _param->_size_ooo_engine_id);
    37         DELETE0_SIGNAL( in_EXECUTE_IN_PACKET_ID             , _param->_size_rob_ptr    );
    38         DELETE0_SIGNAL( in_EXECUTE_IN_OPERATION             , _param->_size_operation    );
    39         DELETE0_SIGNAL( in_EXECUTE_IN_TYPE                  , _param->_size_type         );
     34        DELETE0_SIGNAL( in_EXECUTE_IN_CONTEXT_ID            ,_param->_size_context_id   );
     35        DELETE0_SIGNAL( in_EXECUTE_IN_FRONT_END_ID          ,_param->_size_front_end_id );
     36        DELETE0_SIGNAL( in_EXECUTE_IN_OOO_ENGINE_ID         ,_param->_size_ooo_engine_id);
     37        DELETE0_SIGNAL( in_EXECUTE_IN_PACKET_ID             ,_param->_size_rob_ptr      );
     38        DELETE0_SIGNAL( in_EXECUTE_IN_OPERATION             ,_param->_size_operation    );
     39        DELETE0_SIGNAL( in_EXECUTE_IN_TYPE                  ,_param->_size_type         );
    4040        DELETE0_SIGNAL( in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE ,_param->_size_store_queue_ptr);
    4141        DELETE0_SIGNAL( in_EXECUTE_IN_STORE_QUEUE_PTR_READ  ,_param->_size_store_queue_ptr);
    42         DELETE0_SIGNAL( in_EXECUTE_IN_STORE_QUEUE_EMPTY     , 1);
     42        DELETE0_SIGNAL( in_EXECUTE_IN_STORE_QUEUE_EMPTY     ,1);
    4343        DELETE0_SIGNAL( in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE  ,_param->_size_load_queue_ptr);
    44         DELETE0_SIGNAL( in_EXECUTE_IN_HAS_IMMEDIAT          , 1);
    45         DELETE0_SIGNAL( in_EXECUTE_IN_IMMEDIAT              , _param->_size_general_data);
    46         DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RA               , _param->_size_general_data);
    47         DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RB               , _param->_size_general_data);
    48         DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RC               , _param->_size_special_data);
    49         DELETE0_SIGNAL( in_EXECUTE_IN_WRITE_RD              , 1);
    50         DELETE0_SIGNAL( in_EXECUTE_IN_NUM_REG_RD            , _param->_size_general_register);
    51         DELETE0_SIGNAL( in_EXECUTE_IN_WRITE_RE              , 1);
    52         DELETE0_SIGNAL( in_EXECUTE_IN_NUM_REG_RE            , _param->_size_special_register);
     44        DELETE0_SIGNAL( in_EXECUTE_IN_HAS_IMMEDIAT          ,1);
     45        DELETE0_SIGNAL( in_EXECUTE_IN_IMMEDIAT              ,_param->_size_general_data);
     46        DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RA               ,_param->_size_general_data);
     47        DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RB               ,_param->_size_general_data);
     48        DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RC               ,_param->_size_special_data);
     49        DELETE0_SIGNAL( in_EXECUTE_IN_WRITE_RD              ,1);
     50        DELETE0_SIGNAL( in_EXECUTE_IN_NUM_REG_RD            ,_param->_size_general_register);
     51        DELETE0_SIGNAL( in_EXECUTE_IN_WRITE_RE              ,1);
     52        DELETE0_SIGNAL( in_EXECUTE_IN_NUM_REG_RE            ,_param->_size_special_register);
    5353
    5454        DELETE0_SIGNAL(out_EXECUTE_OUT_VAL            ,1);
     
    7272        // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    7373       
     74        for (uint32_t i=0; i<_param->_nb_type; i++)
     75        delete [] _function_execute [i];
     76        delete [] _function_execute;
     77
    7478        for (uint32_t i=0; i<_param->_nb_context; i++)
    75           for (uint32_t j=0; j<_param->_nb_front_end; j++)
    76             for (uint32_t k=0; k<_param->_nb_ooo_engine; k++)
    77               delete _execute_register [i][j][k];
     79          {
     80            for (uint32_t j=0; j<_param->_nb_front_end; j++)
     81              {
     82                for (uint32_t k=0; k<_param->_nb_ooo_engine; k++)
     83                delete    _execute_register [i][j][k];
     84                delete [] _execute_register [i][j];
     85              }
     86            delete [] _execute_register [i];
     87          }
     88        delete [] _execute_register;
    7889
    79         DELETE3(_execute_register,_param->_nb_context,_param->_nb_front_end,_param->_nb_ooo_engine);
    80         DELETE0(_execute_param);
     90        delete    _execute_param;
     91        delete    _execute_operation_out;
    8192        if (_param->_have_pipeline_in)
    82         DELETE0(_execute_operation_in);
    83         DELETE0(_execute_operation_out);
    84         DELETE2(_function_execute,_param->_nb_type,_param->_nb_operation);
     93        delete    _execute_operation_in;
    8594      }
    8695
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_transition.cpp

    r118 r128  
    132132            execute_operation->_num_reg_re    = PORT_READ(in_EXECUTE_IN_NUM_REG_RE  );
    133133            execute_operation->_data_re       = 0; // no necessaray
     134            execute_operation->_exception     = 0; // no necessaray
     135            execute_operation->_no_sequence   = 0; // no necessaray
     136            execute_operation->_address       = 0; // no necessaray
    134137
    135138            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * context_id    : %d",execute_operation->_context_id   );
  • 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

    r124 r128  
    122122
    123123#if defined(DEBUG) and defined(DEBUG_Load_store_unit) and (DEBUG_Load_store_unit == true)
    124     for (uint32_t i=0; i<_param->_nb_thread; ++i)
    125       if (_param->_num_thread_valid [i])
    126         {
    127           memory_log_file [i].close();
    128         }
     124    {
     125      for (uint32_t i=0; i<_param->_nb_thread; ++i)
     126        if (_param->_num_thread_valid [i])
     127          {
     128            memory_log_file [i].close();
     129          }
     130      delete [] memory_log_file;
     131    }
    129132#endif
    130133
  • 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

    r124 r128  
    239239        _speculative_access_queue_control->clear();
    240240
    241         reg_STORE_QUEUE_PTR_READ = 0;
     241        reg_STORE_QUEUE_PTR_READ       = 0;
    242242        reg_LOAD_QUEUE_CHECK_PRIORITY  = 0;
    243243
    244244        for (uint32_t i=0; i< _param->_size_store_queue             ; i++)
    245245          {
    246           reg_STORE_QUEUE_NB_CHECK  [i] = 0;
    247           _store_queue              [i]._state = STORE_QUEUE_EMPTY;
     246            reg_STORE_QUEUE_NB_CHECK  [i] = 0;
     247            _store_queue              [i]._state                 = STORE_QUEUE_EMPTY;
     248            _store_queue              [i]._context_id            = 0; // not necessary
     249            _store_queue              [i]._front_end_id          = 0; // not necessary
     250            _store_queue              [i]._ooo_engine_id         = 0; // not necessary
     251            _store_queue              [i]._packet_id             = 0; // not necessary
     252            _store_queue              [i]._operation             = 0; // not necessary
     253            _store_queue              [i]._load_queue_ptr_write  = 0; // not necessary
     254            _store_queue              [i]._address               = 0; // not necessary
     255            _store_queue              [i]._wdata                 = 0; // not necessary
     256//          _store_queue              [i]._write_rd              = 0; // not necessary
     257//          _store_queue              [i]._num_reg_rd            = 0; // not necessary
     258            _store_queue              [i]._exception             = 0; // not necessary
     259            _store_queue              [i]._send_commit           = 0; // not necessary
    248260          }
    249261
    250262        for (uint32_t i=0; i< _param->_size_load_queue              ; i++)
    251           _load_queue               [i]._state = LOAD_QUEUE_EMPTY;
     263          {
     264            _load_queue               [i]._state                 = LOAD_QUEUE_EMPTY;
     265            _load_queue               [i]._context_id            = 0; // not necessary
     266            _load_queue               [i]._front_end_id          = 0; // not necessary
     267            _load_queue               [i]._ooo_engine_id         = 0; // not necessary
     268            _load_queue               [i]._packet_id             = 0; // not necessary
     269            _load_queue               [i]._operation             = 0; // not necessary
     270            _load_queue               [i]._store_queue_ptr_write = 0; // not necessary
     271            _load_queue               [i]._store_queue_ptr_read  = 0; // not necessary
     272            _load_queue               [i]._store_queue_empty     = 0; // not necessary
     273            _load_queue               [i]._address               = 0; // not necessary
     274            _load_queue               [i]._check_hit_byte        = 0; // not necessary
     275            _load_queue               [i]._check_hit             = 0; // not necessary
     276            _load_queue               [i]._shift                 = 0; // not necessary
     277            _load_queue               [i]._is_load_signed        = 0; // not necessary
     278            _load_queue               [i]._access_size           = 0; // not necessary
     279            _load_queue               [i]._rdata                 = 0; // not necessary
     280            _load_queue               [i]._write_rd              = 0; // not necessary
     281            _load_queue               [i]._num_reg_rd            = 0; // not necessary
     282            _load_queue               [i]._exception             = 0; // not necessary
     283          }
    252284
    253285        for (uint32_t i=0; i< _param->_size_speculative_access_queue; i++)
    254           _speculative_access_queue [i]._state = SPECULATIVE_ACCESS_QUEUE_EMPTY;
     286          {
     287            _speculative_access_queue [i]._state                 = SPECULATIVE_ACCESS_QUEUE_EMPTY;
     288            _speculative_access_queue [i]._context_id            = 0; // not necessary
     289            _speculative_access_queue [i]._front_end_id          = 0; // not necessary
     290            _speculative_access_queue [i]._ooo_engine_id         = 0; // not necessary
     291            _speculative_access_queue [i]._packet_id             = 0; // not necessary
     292            _speculative_access_queue [i]._operation             = 0; // not necessary
     293            _speculative_access_queue [i]._load_queue_ptr_write  = 0; // not necessary
     294            _speculative_access_queue [i]._store_queue_ptr_write = 0; // not necessary
     295            _speculative_access_queue [i]._store_queue_ptr_read  = 0; // not necessary
     296            _speculative_access_queue [i]._store_queue_empty     = 0; // not necessary
     297            _speculative_access_queue [i]._address               = 0; // not necessary
     298            _speculative_access_queue [i]._write_rd              = 0; // not necessary
     299            _speculative_access_queue [i]._num_reg_rd            = 0; // not necessary
     300            _speculative_access_queue [i]._exception             = 0; // not necessary
     301          }
    255302      }
    256303    else
     
    10001047            bool         have_exception = (exception != EXCEPTION_MEMORY_NONE);
    10011048            bool         need_check= false;
    1002             Tlsq_ptr_t        store_queue_ptr_write = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_ptr_write;
    1003             Tlsq_ptr_t        store_queue_ptr_read  = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_ptr_read ;
    1004             Tcontrol_t        store_queue_empty     = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_empty    ;
     1049            Tlsq_ptr_t   store_queue_ptr_write = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_ptr_write;
     1050            Tlsq_ptr_t   store_queue_ptr_read  = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_ptr_read ;
     1051            Tcontrol_t   store_queue_empty     = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_empty    ;
    10051052           
    10061053            if (have_exception)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_deallocation.cpp

    r122 r128  
    6262        DELETE0_SIGNAL(out_READ_QUEUE_OUT_OPERATION            ,_param->_size_operation        );
    6363        DELETE0_SIGNAL(out_READ_QUEUE_OUT_TYPE                 ,_param->_size_type             );
    64         DELETE0_SIGNAL(out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE, _param->_size_store_queue_ptr );
     64        DELETE0_SIGNAL(out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE,_param->_size_store_queue_ptr  );
     65        DELETE0_SIGNAL(out_READ_QUEUE_OUT_STORE_QUEUE_PTR_READ ,_param->_size_store_queue_ptr  );
     66        DELETE0_SIGNAL(out_READ_QUEUE_OUT_STORE_QUEUE_EMPTY    ,1                              );
    6567        DELETE0_SIGNAL(out_READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE , _param->_size_load_queue_ptr  );
    6668        DELETE0_SIGNAL(out_READ_QUEUE_OUT_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_transition.cpp

    r123 r128  
    4242
    4343        // Init, else error in registerfile
    44         _queue_head->_ooo_engine_id = 0;
    45         // not necessary
    46         _queue_head->_read_ra_val = false;
    47         _queue_head->_read_rb_val = false;
    48         _queue_head->_read_rc_val = false;
    49 
    50         _queue_head->_data_ra_val = false;
    51         _queue_head->_data_rb_val = false;
    52         _queue_head->_data_rc_val = false;
    53 
    54         _queue_head->_num_reg_ra  = 0;
    55         _queue_head->_num_reg_rb  = 0;
    56         _queue_head->_num_reg_rc  = 0;
     44        _queue_head->_context_id           = 0;// not necessary
     45        _queue_head->_front_end_id         = 0;// not necessary
     46        _queue_head->_ooo_engine_id        = 0;// not necessary
     47
     48        _queue_head->_rob_id                = 0;// not necessary
     49        _queue_head->_operation             = 0;// not necessary
     50        _queue_head->_type                  = 0;// not necessary
     51        _queue_head->_store_queue_ptr_write = 0;// not necessary
     52        _queue_head->_store_queue_ptr_read  = 0;// not necessary
     53        _queue_head->_store_queue_empty     = 0;// not necessary
     54        _queue_head->_load_queue_ptr_write  = 0;// not necessary
     55        _queue_head->_has_immediat          = 0;// not necessary
     56        _queue_head->_immediat              = 0;// not necessary
     57
     58        _queue_head->_read_ra               = 0;// not necessary
     59        _queue_head->_read_rb               = 0;// not necessary
     60        _queue_head->_read_rc               = 0;// not necessary
     61        _queue_head->_write_rd              = 0;// not necessary
     62        _queue_head->_write_re              = 0;// not necessary
     63
     64        _queue_head->_read_ra_val          = false;
     65        _queue_head->_read_rb_val          = false;
     66        _queue_head->_read_rc_val          = false;
     67
     68        _queue_head->_data_ra_val          = false;
     69        _queue_head->_data_rb_val          = false;
     70        _queue_head->_data_rc_val          = false;
     71
     72        _queue_head->_num_reg_ra           = 0;// not necessary
     73        _queue_head->_num_reg_rb           = 0;// not necessary
     74        _queue_head->_num_reg_rc           = 0;// not necessary
     75        _queue_head->_num_reg_rd           = 0;// not necessary
     76        _queue_head->_num_reg_re           = 0;// not necessary
    5777      }
    5878    else
     
    7696            Tread_queue_entry_t * entry = new Tread_queue_entry_t;
    7797
    78             if(_param->_have_port_context_id   )
    79             entry->_context_id   = PORT_READ(in_READ_QUEUE_IN_CONTEXT_ID  );
    80             if(_param->_have_port_front_end_id )
    81             entry->_front_end_id = PORT_READ(in_READ_QUEUE_IN_FRONT_END_ID);
    82             if(_param->_have_port_ooo_engine_id)
    83             entry->_ooo_engine_id= PORT_READ(in_READ_QUEUE_IN_OOO_ENGINE_ID);
    84             if(_param->_have_port_rob_ptr      )
    85             entry->_rob_id       = PORT_READ(in_READ_QUEUE_IN_ROB_ID      );
    86             entry->_operation    = PORT_READ(in_READ_QUEUE_IN_OPERATION   );
    87             entry->_type         = PORT_READ(in_READ_QUEUE_IN_TYPE        );
     98            entry->_context_id            = (_param->_have_port_context_id    )?PORT_READ(in_READ_QUEUE_IN_CONTEXT_ID   ):0;
     99            entry->_front_end_id          = (_param->_have_port_front_end_id  )?PORT_READ(in_READ_QUEUE_IN_FRONT_END_ID ):0;
     100            entry->_ooo_engine_id         = (_param->_have_port_ooo_engine_id )?PORT_READ(in_READ_QUEUE_IN_OOO_ENGINE_ID):0;
     101            entry->_rob_id                = (_param->_have_port_rob_ptr       )?PORT_READ(in_READ_QUEUE_IN_ROB_ID       ):0;
     102            entry->_operation             = PORT_READ(in_READ_QUEUE_IN_OPERATION   );
     103            entry->_type                  = PORT_READ(in_READ_QUEUE_IN_TYPE        );
    88104            entry->_store_queue_ptr_write = PORT_READ(in_READ_QUEUE_IN_STORE_QUEUE_PTR_WRITE);
    89105            entry->_store_queue_ptr_read  = PORT_READ(in_READ_QUEUE_IN_STORE_QUEUE_PTR_READ );
    90106            entry->_store_queue_empty     = PORT_READ(in_READ_QUEUE_IN_STORE_QUEUE_EMPTY    );
    91             if (_param->_have_port_load_queue_ptr)
    92             entry->_load_queue_ptr_write  = PORT_READ(in_READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE );
    93             entry->_has_immediat = PORT_READ(in_READ_QUEUE_IN_HAS_IMMEDIAT);
    94             entry->_immediat     = PORT_READ(in_READ_QUEUE_IN_IMMEDIAT    );
    95             entry->_read_ra      = PORT_READ(in_READ_QUEUE_IN_READ_RA     );
    96             entry->_num_reg_ra   = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RA  );
    97             entry->_read_rb      = PORT_READ(in_READ_QUEUE_IN_READ_RB     );
    98             entry->_num_reg_rb   = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RB  );
    99             entry->_read_rc      = PORT_READ(in_READ_QUEUE_IN_READ_RC     );
    100             entry->_num_reg_rc   = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RC  );
    101             entry->_write_rd     = PORT_READ(in_READ_QUEUE_IN_WRITE_RD    );
    102             entry->_num_reg_rd   = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RD  );
    103             entry->_write_re     = PORT_READ(in_READ_QUEUE_IN_WRITE_RE    );
    104             entry->_num_reg_re   = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RE  );
     107            entry->_load_queue_ptr_write  = (_param->_have_port_load_queue_ptr)?PORT_READ(in_READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE ):0;
     108            entry->_has_immediat          = PORT_READ(in_READ_QUEUE_IN_HAS_IMMEDIAT);
     109            entry->_immediat              = PORT_READ(in_READ_QUEUE_IN_IMMEDIAT    );
     110            entry->_read_ra               = PORT_READ(in_READ_QUEUE_IN_READ_RA     );
     111            entry->_num_reg_ra            = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RA  );
     112            entry->_read_rb               = PORT_READ(in_READ_QUEUE_IN_READ_RB     );
     113            entry->_num_reg_rb            = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RB  );
     114            entry->_read_rc               = PORT_READ(in_READ_QUEUE_IN_READ_RC     );
     115            entry->_num_reg_rc            = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RC  );
     116            entry->_write_rd              = PORT_READ(in_READ_QUEUE_IN_WRITE_RD    );
     117            entry->_num_reg_rd            = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RD  );
     118            entry->_write_re              = PORT_READ(in_READ_QUEUE_IN_WRITE_RE    );
     119            entry->_num_reg_re            = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RE  );
    105120
    106121            log_printf(TRACE,Read_queue,FUNCTION,"    * push (id : %d-%d)",entry->_context_id, entry->_rob_id);
     
    122137            // Pop the entry
    123138            log_printf(TRACE,Read_queue,FUNCTION,"    * pop  (id : %d-%d)",_queue->front()->_context_id, _queue->front()->_rob_id);
     139            delete _queue->front();
    124140            _queue->pop_front();
    125141
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_transition.cpp

    r122 r128  
    112112        _queue_control->clear();
    113113#endif
     114
     115        for (uint32_t i=0; i<_param->_size_queue; i++)
     116          {
     117            _queue[i]._context_id            = 0; // not necessary
     118            _queue[i]._front_end_id          = 0; // not necessary
     119            _queue[i]._ooo_engine_id         = 0; // not necessary
     120            _queue[i]._rob_id                = 0; // not necessary
     121            _queue[i]._operation             = 0; // not necessary
     122            _queue[i]._type                  = 0; // not necessary
     123            _queue[i]._store_queue_ptr_write = 0; // not necessary
     124            _queue[i]._store_queue_ptr_read  = 0; // not necessary
     125            _queue[i]._store_queue_empty     = 0; // not necessary
     126            _queue[i]._load_queue_ptr_write  = 0; // not necessary
     127            _queue[i]._has_immediat          = 0; // not necessary
     128            _queue[i]._immediat              = 0; // not necessary
     129//          _queue[i]._read_ra               = 0; // not necessary
     130            _queue[i]._num_reg_ra            = 0; // not necessary
     131            _queue[i]._data_ra_val           = 0; // not necessary
     132            _queue[i]._data_ra               = 0; // not necessary
     133//          _queue[i]._read_rb               = 0; // not necessary
     134            _queue[i]._num_reg_rb            = 0; // not necessary
     135            _queue[i]._data_rb_val           = 0; // not necessary
     136            _queue[i]._data_rb               = 0; // not necessary
     137//          _queue[i]._read_rc               = 0; // not necessary
     138            _queue[i]._num_reg_rc            = 0; // not necessary
     139            _queue[i]._data_rc_val           = 0; // not necessary
     140            _queue[i]._data_rc               = 0; // not necessary
     141            _queue[i]._write_rd              = 0; // not necessary
     142            _queue[i]._num_reg_rd            = 0; // not necessary
     143            _queue[i]._write_re              = 0; // not necessary
     144            _queue[i]._num_reg_re            = 0; // not necessary
     145          }
    114146      }
    115147    else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Read_unit_deallocation.cpp

    r112 r128  
    3838        DELETE0_SIGNAL( in_READ_UNIT_IN_TYPE                 ,_param->_size_type         );
    3939        DELETE0_SIGNAL( in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE,_param->_size_store_queue_ptr);
     40        DELETE0_SIGNAL( in_READ_UNIT_IN_STORE_QUEUE_PTR_READ ,_param->_size_store_queue_ptr);
     41        DELETE0_SIGNAL( in_READ_UNIT_IN_STORE_QUEUE_EMPTY    ,1);
    4042        DELETE0_SIGNAL( in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,_param->_size_load_queue_ptr);
    4143        DELETE0_SIGNAL( in_READ_UNIT_IN_HAS_IMMEDIAT         ,1);
     
    6163        DELETE1_SIGNAL(out_READ_UNIT_OUT_TYPE                 ,_param->_nb_inst_retire,_param->_size_type            );
    6264        DELETE1_SIGNAL(out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_retire,_param->_size_store_queue_ptr);
     65        DELETE1_SIGNAL(out_READ_UNIT_OUT_STORE_QUEUE_PTR_READ ,_param->_nb_inst_retire,_param->_size_store_queue_ptr);
     66        DELETE1_SIGNAL(out_READ_UNIT_OUT_STORE_QUEUE_EMPTY    ,_param->_nb_inst_retire,1);
    6367        DELETE1_SIGNAL(out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_retire,_param->_size_load_queue_ptr);
    6468        DELETE1_SIGNAL(out_READ_UNIT_OUT_HAS_IMMEDIAT         ,_param->_nb_inst_retire,1                             );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_deallocation.cpp

    r113 r128  
    9191    delete _queue;
    9292
     93#ifdef VHDL
     94     if (usage_is_set(_usage,USE_VHDL))
     95       {
     96         delete _component_queue;
     97         delete _param_queue;
     98       }
     99#endif
     100
    93101    delete _component;
    94     delete _component_queue;
    95     delete _param_queue;
    96102
    97103    log_printf(FUNC,Write_queue,FUNCTION,"End");
     
    104110}; // end namespace multi_execute_loop
    105111}; // end namespace core
    106 
    107112}; // end namespace behavioural
    108113}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_transition.cpp

    r101 r128  
    1818namespace write_unit {
    1919namespace write_queue {
    20 
    2120
    2221#undef  FUNCTION
     
    114113                     (*it)->_no_sequence  ,
    115114                     (*it)->_address      );
     115
     116//           log_printf(TRACE,Write_queue,FUNCTION,"    * context_id   : %d",  (*it)->_context_id   );
     117//           log_printf(TRACE,Write_queue,FUNCTION,"    * front_end_id : %d",  (*it)->_front_end_id );
     118//           log_printf(TRACE,Write_queue,FUNCTION,"    * ooo_engine_id: %d",  (*it)->_ooo_engine_id);
     119//           log_printf(TRACE,Write_queue,FUNCTION,"    * packet_id    : %d",  (*it)->_packet_id    );
     120//           log_printf(TRACE,Write_queue,FUNCTION,"    * write_rd     : %d",  (*it)->_write_rd     );
     121//           log_printf(TRACE,Write_queue,FUNCTION,"    * num_reg_rd   : %d",  (*it)->_num_reg_rd   );
     122//           log_printf(TRACE,Write_queue,FUNCTION,"    * data_rd      : %d",  (*it)->_data_rd      );
     123//           log_printf(TRACE,Write_queue,FUNCTION,"    * write_re     : %d",  (*it)->_write_re     );
     124//           log_printf(TRACE,Write_queue,FUNCTION,"    * num_reg_re   : %d",  (*it)->_num_reg_re   );
     125//           log_printf(TRACE,Write_queue,FUNCTION,"    * data_re      : %d",  (*it)->_data_re      );
     126//           log_printf(TRACE,Write_queue,FUNCTION,"    * exception    : %d",  (*it)->_exception    );
     127//           log_printf(TRACE,Write_queue,FUNCTION,"    * no_sequence  : %d",  (*it)->_no_sequence  );
     128//           log_printf(TRACE,Write_queue,FUNCTION,"    * address      : %d",  (*it)->_address      );
     129
    116130          i++;
    117131        }
  • 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

    r115 r128  
    3838         DELETE2_SIGNAL( in_READ_UNIT_OUT_TYPE                   , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_type             );
    3939         DELETE2_SIGNAL( in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE  , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_store_queue_ptr  );
     40         DELETE2_SIGNAL( in_READ_UNIT_OUT_STORE_QUEUE_PTR_READ   , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_store_queue_ptr  );
     41         DELETE2_SIGNAL( in_READ_UNIT_OUT_STORE_QUEUE_EMPTY      , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],1                              );
    4042         DELETE2_SIGNAL( in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE   , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_load_queue_ptr   );
    4143         DELETE2_SIGNAL( in_READ_UNIT_OUT_HAS_IMMEDIAT           , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],1                              );
     
    6365         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_NUM_REG_RE           , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_special_register );
    6466         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE, _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_store_queue_ptr  );
     67         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_READ , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_store_queue_ptr  );
     68         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_STORE_QUEUE_EMPTY    , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],1                              );
    6569         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_load_queue_ptr   );
    6670         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_IMMEDIAT             , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_general_data     );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h

    r88 r128  
    6161  public    : SC_CLOCK                      *  in_CLOCK  ;
    6262  public    : SC_IN (Tcontrol_t)            *  in_NRESET ;
    63   public    : SC_OUT(Tcontrol_t        )    * out_CONST_0;
    64   public    : SC_OUT(Tcontrol_t        )    * out_CONST_1;
     63//public    : SC_OUT(Tcontrol_t        )    * out_CONST_0;
     64//public    : SC_OUT(Tcontrol_t        )    * out_CONST_1;
    6565
    6666    // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    7777  public    : SC_OUT(Tcontrol_t        )  *** out_GPR_READ_STATUS_VAL       ;
    7878  public    : SC_IN (Tcontrol_t        )  ***  in_GPR_READ_STATUS_ACK       ;
    79   public    : SC_IN (Tcontrol_t        )  ***  in_GPR_READ_STATUS_DATA_VAL  ;
     79  public    : SC_IN (Tgeneral_data_t   )  ***  in_GPR_READ_STATUS_DATA_VAL  ; // type for compatibility with the registerFile
    8080
    8181    // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    9292  public    : SC_OUT(Tcontrol_t        )  *** out_SPR_READ_STATUS_VAL       ;
    9393  public    : SC_IN (Tcontrol_t        )  ***  in_SPR_READ_STATUS_ACK       ;
    94   public    : SC_IN (Tcontrol_t        )  ***  in_SPR_READ_STATUS_DATA_VAL  ;
     94  public    : SC_IN (Tspecial_data_t   )  ***  in_SPR_READ_STATUS_DATA_VAL  ; // type for compatibility with the registerFile
    9595
    9696    // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    104104  public    : SC_OUT(Tcontrol_t        )  *** out_GPR_WRITE_STATUS_VAL      ;
    105105  public    : SC_IN (Tcontrol_t        )  ***  in_GPR_WRITE_STATUS_ACK      ;
     106  public    : SC_OUT(Tgeneral_data_t   )  *** out_GPR_WRITE_STATUS_DATA     ; // type for compatibility with the registerFile
    106107   
    107108    // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    115116  public    : SC_OUT(Tcontrol_t        )  *** out_SPR_WRITE_STATUS_VAL      ;
    116117  public    : SC_IN (Tcontrol_t        )  ***  in_SPR_WRITE_STATUS_ACK      ;
     118  public    : SC_OUT(Tspecial_data_t   )  *** out_SPR_WRITE_STATUS_DATA     ; // type for compatibility with the registerFile
    117119
    118120    // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    124126  public    : SC_OUT(Tcontrol_t        )  *** out_INSERT_ROB_GPR_STATUS_VAL            ;
    125127  public    : SC_IN (Tcontrol_t        )  ***  in_INSERT_ROB_GPR_STATUS_ACK            ;
     128  public    : SC_OUT(Tgeneral_data_t   )  *** out_INSERT_ROB_GPR_STATUS_DATA           ; // type for compatibility with the registerFile
    126129
    127130  public    : SC_OUT(Tcontrol_t        )  *** out_INSERT_ROB_SPR_STATUS_VAL            ;
    128131  public    : SC_IN (Tcontrol_t        )  ***  in_INSERT_ROB_SPR_STATUS_ACK            ;
     132  public    : SC_OUT(Tspecial_data_t   )  *** out_INSERT_ROB_SPR_STATUS_DATA           ; // type for compatibility with the registerFile
    129133
    130134//     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue.cpp

    r123 r128  
    7171      {
    7272    // Constant
    73 
    74     PORT_WRITE(out_CONST_0 ,0);
    75     PORT_WRITE(out_CONST_1 ,1);
     73//     PORT_WRITE(out_CONST_0 ,0);
     74//     PORT_WRITE(out_CONST_1 ,1);
     75        for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i)
     76          {
     77            for (uint32_t j=0; j<_param->_nb_gpr_write; ++j)
     78              PORT_WRITE(out_GPR_WRITE_STATUS_DATA [i][j],1);
     79            for (uint32_t j=0; j<_param->_nb_spr_write; ++j)
     80              PORT_WRITE(out_SPR_WRITE_STATUS_DATA [i][j],1);
     81
     82            for (uint32_t j=0; j<_param->_nb_inst_insert_rob[i]; ++j)
     83              {
     84                PORT_WRITE(out_INSERT_ROB_GPR_STATUS_DATA [i][j],0);
     85                PORT_WRITE(out_INSERT_ROB_SPR_STATUS_DATA [i][j],0);
     86              }
     87          }
    7688
    7789    log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - transition");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_allocation.cpp

    r112 r128  
    4848     in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_NO);
    4949     in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_NO);
    50     out_CONST_0      = interface->set_signal_out <Tcontrol_t> ("const_0",1);
    51     out_CONST_1      = interface->set_signal_out <Tcontrol_t> ("const_1",1);
     50//     out_CONST_0      = interface->set_signal_out <Tcontrol_t> ("const_0",1);
     51//     out_CONST_1      = interface->set_signal_out <Tcontrol_t> ("const_1",1);
    5252
    5353    // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    7979      ALLOC2_VALACK_OUT(out_GPR_READ_STATUS_VAL      ,VAL);
    8080      ALLOC2_VALACK_IN ( in_GPR_READ_STATUS_ACK      ,ACK);
    81       ALLOC2_SIGNAL_IN ( in_GPR_READ_STATUS_DATA_VAL,"data_val",Tcontrol_t,1);
     81      ALLOC2_SIGNAL_IN ( in_GPR_READ_STATUS_DATA_VAL,"data_val",Tgeneral_data_t,1);
    8282
    8383      ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_gpr_read);
     
    112112      ALLOC2_VALACK_OUT(out_SPR_READ_STATUS_VAL      ,VAL);
    113113      ALLOC2_VALACK_IN ( in_SPR_READ_STATUS_ACK      ,ACK);
    114       ALLOC2_SIGNAL_IN ( in_SPR_READ_STATUS_DATA_VAL,"data_val",Tcontrol_t,1);
     114      ALLOC2_SIGNAL_IN ( in_SPR_READ_STATUS_DATA_VAL,"data_val",Tspecial_data_t,1);
    115115     
    116116      ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_spr_read);
     
    140140      ALLOC2_INTERFACE_BEGIN("gpr_write_status",IN,NORTH,_("Interface to write generalist register - from/to status"),_param->_nb_ooo_engine,_param->_nb_gpr_write);
    141141     
    142       ALLOC2_VALACK_OUT(out_GPR_WRITE_STATUS_VAL,VAL);
    143       ALLOC2_VALACK_IN ( in_GPR_WRITE_STATUS_ACK,ACK);
     142      ALLOC2_VALACK_OUT(out_GPR_WRITE_STATUS_VAL ,VAL);
     143      ALLOC2_VALACK_IN ( in_GPR_WRITE_STATUS_ACK ,ACK);
     144      ALLOC2_SIGNAL_OUT(out_GPR_WRITE_STATUS_DATA,"data",Tgeneral_data_t,1);
    144145
    145146      ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_gpr_write);
     
    171172      ALLOC2_VALACK_OUT(out_SPR_WRITE_STATUS_VAL,VAL);
    172173      ALLOC2_VALACK_IN ( in_SPR_WRITE_STATUS_ACK,ACK);
     174      ALLOC2_SIGNAL_OUT(out_SPR_WRITE_STATUS_DATA,"data",Tspecial_data_t,1);
    173175
    174176      ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_spr_write);
     
    190192      ALLOC2_INTERFACE_BEGIN("insert_rob_gpr_status",IN,WEST,_("Interface to update status (insert)"),_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
    191193     
    192       _ALLOC2_VALACK_OUT(out_INSERT_ROB_GPR_STATUS_VAL,VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
    193       _ALLOC2_VALACK_IN ( in_INSERT_ROB_GPR_STATUS_ACK,ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
     194      _ALLOC2_VALACK_OUT(out_INSERT_ROB_GPR_STATUS_VAL ,VAL                   ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
     195      _ALLOC2_VALACK_IN ( in_INSERT_ROB_GPR_STATUS_ACK ,ACK                   ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
     196      _ALLOC2_SIGNAL_OUT(out_INSERT_ROB_GPR_STATUS_DATA,"data",Tgeneral_data_t,1,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
    194197
    195198      ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
     
    199202      ALLOC2_INTERFACE_BEGIN("insert_rob_spr_status",IN,WEST,_("Interface to update status (insert)"),_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
    200203     
    201       _ALLOC2_VALACK_OUT(out_INSERT_ROB_SPR_STATUS_VAL,VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
    202       _ALLOC2_VALACK_IN ( in_INSERT_ROB_SPR_STATUS_ACK,ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
     204      _ALLOC2_VALACK_OUT(out_INSERT_ROB_SPR_STATUS_VAL ,VAL                   ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
     205      _ALLOC2_VALACK_IN ( in_INSERT_ROB_SPR_STATUS_ACK ,ACK                   ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
     206      _ALLOC2_SIGNAL_OUT(out_INSERT_ROB_SPR_STATUS_DATA,"data",Tspecial_data_t,1,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
    203207
    204208      ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_deallocation.cpp

    r112 r128  
    2424    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
    2525
    26     if (usage_is_set(_usage,USE_VHDL))
     26//     if (usage_is_set(_usage,USE_VHDL))
    2727      {
    2828//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     
    3030//#endif
    3131    delete  in_NRESET;
    32     delete out_CONST_0;
    33     delete out_CONST_1;
     32//     delete out_CONST_0;
     33//     delete out_CONST_1;
    3434
    3535    DELETE1_SIGNAL( in_GPR_READ_VAL           ,_param->_nb_gpr_read,1  );
     
    6969    DELETE2_SIGNAL( in_GPR_WRITE_REGISTERFILE_ACK,_param->_nb_ooo_engine,_param->_nb_gpr_write,1  );
    7070
    71     DELETE2_SIGNAL(out_GPR_WRITE_STATUS_VAL,_param->_nb_ooo_engine,_param->_nb_gpr_write,1  );
    72     DELETE2_SIGNAL( in_GPR_WRITE_STATUS_ACK,_param->_nb_ooo_engine,_param->_nb_gpr_write,1  );
     71    DELETE2_SIGNAL(out_GPR_WRITE_STATUS_VAL      ,_param->_nb_ooo_engine,_param->_nb_gpr_write,1  );
     72    DELETE2_SIGNAL( in_GPR_WRITE_STATUS_ACK      ,_param->_nb_ooo_engine,_param->_nb_gpr_write,1  );
     73    DELETE2_SIGNAL(out_GPR_WRITE_STATUS_DATA     ,_param->_nb_ooo_engine,_param->_nb_gpr_write,1  );
    7374
    74     DELETE1_SIGNAL( in_SPR_WRITE_VAL          ,_param->_nb_spr_write,1  );
    75     DELETE1_SIGNAL(out_SPR_WRITE_ACK          ,_param->_nb_spr_write,1  );
    76     DELETE1_SIGNAL( in_SPR_WRITE_OOO_ENGINE_ID,_param->_nb_spr_write,_param->_size_ooo_engine_id);
     75    DELETE1_SIGNAL( in_SPR_WRITE_VAL             ,_param->_nb_spr_write,1  );
     76    DELETE1_SIGNAL(out_SPR_WRITE_ACK             ,_param->_nb_spr_write,1  );
     77    DELETE1_SIGNAL( in_SPR_WRITE_OOO_ENGINE_ID   ,_param->_nb_spr_write,_param->_size_ooo_engine_id);
    7778
    7879    DELETE2_SIGNAL(out_SPR_WRITE_REGISTERFILE_VAL,_param->_nb_ooo_engine,_param->_nb_spr_write,1  );
    7980    DELETE2_SIGNAL( in_SPR_WRITE_REGISTERFILE_ACK,_param->_nb_ooo_engine,_param->_nb_spr_write,1  );
    8081
    81     DELETE2_SIGNAL(out_SPR_WRITE_STATUS_VAL,_param->_nb_ooo_engine,_param->_nb_spr_write,1  );
    82     DELETE2_SIGNAL( in_SPR_WRITE_STATUS_ACK,_param->_nb_ooo_engine,_param->_nb_spr_write,1  );
     82    DELETE2_SIGNAL(out_SPR_WRITE_STATUS_VAL      ,_param->_nb_ooo_engine,_param->_nb_spr_write,1  );
     83    DELETE2_SIGNAL( in_SPR_WRITE_STATUS_ACK      ,_param->_nb_ooo_engine,_param->_nb_spr_write,1  );
     84    DELETE2_SIGNAL(out_SPR_WRITE_STATUS_DATA     ,_param->_nb_ooo_engine,_param->_nb_spr_write,1  );
    8385
    84     DELETE2_SIGNAL( in_INSERT_ROB_VAL   ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    85     DELETE2_SIGNAL(out_INSERT_ROB_ACK   ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    86     DELETE2_SIGNAL( in_INSERT_ROB_RD_USE,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    87     DELETE2_SIGNAL( in_INSERT_ROB_RE_USE,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     86    DELETE2_SIGNAL( in_INSERT_ROB_VAL            ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     87    DELETE2_SIGNAL(out_INSERT_ROB_ACK            ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     88    DELETE2_SIGNAL( in_INSERT_ROB_RD_USE         ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     89    DELETE2_SIGNAL( in_INSERT_ROB_RE_USE         ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    8890
    89     DELETE2_SIGNAL(out_INSERT_ROB_GPR_STATUS_VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    90     DELETE2_SIGNAL( in_INSERT_ROB_GPR_STATUS_ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     91    DELETE2_SIGNAL(out_INSERT_ROB_GPR_STATUS_VAL ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     92    DELETE2_SIGNAL( in_INSERT_ROB_GPR_STATUS_ACK ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     93    DELETE2_SIGNAL(out_INSERT_ROB_GPR_STATUS_DATA,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    9194
    92     DELETE2_SIGNAL(out_INSERT_ROB_SPR_STATUS_VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    93     DELETE2_SIGNAL( in_INSERT_ROB_SPR_STATUS_ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     95    DELETE2_SIGNAL(out_INSERT_ROB_SPR_STATUS_VAL ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     96    DELETE2_SIGNAL( in_INSERT_ROB_SPR_STATUS_ACK ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
     97    DELETE2_SIGNAL(out_INSERT_ROB_SPR_STATUS_DATA,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
    9498      }
    9599    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_gpr_write_status.cpp

    r123 r128  
    3838              {
    3939                Tcontrol_t id = (i == ooo_engine_id)?1:0;
     40
     41                log_printf(TRACE,Register_unit_Glue,FUNCTION,"  * GPR_WRITE_STATUS_VAL [%d (%d)][%d] : %d (%d and %d)",i, ooo_engine_id,j,id and status_val, id, status_val);
     42
    4043                PORT_WRITE(out_GPR_WRITE_STATUS_VAL       [i][j], (id and status_val));
    4144              }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_insert.cpp

    r123 r128  
    4646                                       gpr_status_ack);
    4747
    48           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"  * insert_rob [%d][%d]",i,j);
    49           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * val            (r) : %d",val           );
    50           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * ack            (w) : %d",ack           );
    51           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * gpr_use (rd)   (r) : %d",gpr_use       );
    52           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * gpr_status_val (w) : %d",gpr_status_val);
    53           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * gpr_status_ack (r) : %d",gpr_status_ack);
    54           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * spr_use (re)   (r) : %d",spr_use       );
    55           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * spr_status_val (w) : %d",spr_status_val);
    56           log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * spr_status_ack (r) : %d",spr_status_ack);
     48          log_printf(TRACE,Register_unit_Glue,FUNCTION,"  * insert_rob [%d][%d]",i,j);
     49          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * val            (r) : %d",val           );
     50          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * ack            (w) : %d",ack           );
     51          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * gpr_use (rd)   (r) : %d",gpr_use       );
     52          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * gpr_status_val (w) : %d",gpr_status_val);
     53          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * gpr_status_ack (r) : %d",gpr_status_ack);
     54          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * spr_use (re)   (r) : %d",spr_use       );
     55          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * spr_status_val (w) : %d",spr_status_val);
     56          log_printf(TRACE,Register_unit_Glue,FUNCTION,"    * spr_status_ack (r) : %d",spr_status_ack);
    5757
    5858          PORT_WRITE(out_INSERT_ROB_ACK            [i][j], ack           );
    5959          PORT_WRITE(out_INSERT_ROB_GPR_STATUS_VAL [i][j], gpr_status_val);
    6060          PORT_WRITE(out_INSERT_ROB_SPR_STATUS_VAL [i][j], spr_status_val);
    61 
    6261        }
    6362      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_spr_read.cpp

    r123 r128  
     1
    12#ifdef SYSTEMC
    23//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/src/test.cpp

    r88 r128  
    2121  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50);
    2222#endif
     23
     24  _model.set_model(NAME_Register_unit            ,MODEL_SYSTEMC, true);
     25  _model.set_model(NAME_RegisterFile             ,MODEL_SYSTEMC, true);
     26  _model.set_model(NAME_RegisterFile_Monolithic  ,MODEL_SYSTEMC, true);
     27  _model.set_model(NAME_RegisterFile_Multi_Banked,MODEL_SYSTEMC, true);
     28  _model.set_model(NAME_Register_unit_Glue       ,MODEL_SYSTEMC, true);
    2329
    2430  Tusage_t _usage = USE_ALL;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp

    r112 r128  
    292292     
    293293    // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    294     std::string name_component;
     294    std::string src,dest;
    295295   
    296296    for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    297297      {
    298         name_component = _name+"_gpr_"+toString(i);
     298        src = _name+"_gpr_"+toString(i);
    299299       
    300         log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str());
     300        log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str());
    301301       
    302 #ifdef POSITION
    303         _component->interface_map (name_component,"",
    304                                    _name         ,"");
    305 #endif
    306        
    307         _component->port_map(name_component,"in_CLOCK"   , _name, "in_CLOCK");
    308         _component->port_map(name_component,"in_NRESET"  , _name, "in_NRESET");
     302        {
     303          dest = _name;
     304#ifdef POSITION
     305          _component->interface_map (src ,"",
     306                                     dest,"");
     307#endif
     308          PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     309          PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     310        }
    309311
    310312        for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
    311313          {
    312             _component->port_map(name_component,
    313                                  "in_READ_"+toString(j)+"_VAL",
    314                                  _name+"_glue",
    315                                  "out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
    316             _component->port_map(name_component,
    317                                  "out_READ_"+toString(j)+"_ACK",
    318                                  _name+"_glue",
    319                                  "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
    320             _component->port_map(name_component,
    321                                  "out_READ_"+toString(j)+"_DATA",
    322                                  _name+"_glue",
    323                                  "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA");
    324             _component->port_map(name_component,
    325                                  "in_READ_"+toString(j)+"_ADDRESS",
    326                                  _name,
    327                                  "in_GPR_READ_"+toString(j)+"_NUM_REG");
     314            dest = _name+"_glue";
     315           
     316#ifdef POSITION
     317            _component->interface_map (src ,    "read_"+toString(j),
     318                                       dest,"gpr_read_registerfile_"+toString(i)+"_"+toString(j));
     319#endif
     320
     321            COMPONENT_MAP(_component,src , "in_READ_"                                 +toString(j)+"_VAL",
     322                                     dest,"out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
     323            COMPONENT_MAP(_component,src ,"out_READ_"                                 +toString(j)+"_ACK",
     324                                     dest, "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
     325            COMPONENT_MAP(_component,src ,"out_READ_"                                 +toString(j)+"_DATA",
     326                                     dest, "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA");
     327
     328            dest = _name;
     329
     330            PORT_MAP     (_component,src , "in_READ_"    +toString(j)+"_ADDRESS",
     331                                     dest, "in_GPR_READ_"+toString(j)+"_NUM_REG");
    328332          }
     333
    329334        for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
    330335          {
    331             _component->port_map(name_component,
    332                                  "in_WRITE_"+toString(j)+"_VAL",
    333                                  _name+"_glue",
    334                                  "out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
    335             _component->port_map(name_component,
    336                                  "out_WRITE_"+toString(j)+"_ACK",
    337                                  _name+"_glue",
    338                                  "in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
    339             _component->port_map(name_component,
    340                                  "in_WRITE_"+toString(j)+"_ADDRESS",
    341                                  _name,
    342                                  "in_GPR_WRITE_"+toString(j)+"_NUM_REG"
    343                                  );
    344             _component->port_map(name_component,
    345                                  "in_WRITE_"+toString(j)+"_DATA",
    346                                  _name,
    347                                  "in_GPR_WRITE_"+toString(j)+"_DATA");
     336            dest = _name+"_glue";
     337           
     338#ifdef POSITION
     339            _component->interface_map (src ,    "write_"+toString(j),
     340                                       dest,"gpr_write_registerfile_"+toString(i)+"_"+toString(j));
     341#endif
     342
     343            COMPONENT_MAP(_component,src , "in_WRITE_"                                 +toString(j)+"_VAL",
     344                                     dest,"out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
     345            COMPONENT_MAP(_component,src ,"out_WRITE_"                                 +toString(j)+"_ACK",
     346                                     dest, "in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
     347
     348            dest = _name;
     349
     350            PORT_MAP     (_component,src , "in_WRITE_"    +toString(j)+"_ADDRESS",
     351                                     dest, "in_GPR_WRITE_"+toString(j)+"_NUM_REG");
     352            PORT_MAP     (_component,src , "in_WRITE_"    +toString(j)+"_DATA",
     353                                     dest, "in_GPR_WRITE_"+toString(j)+"_DATA");
    348354          }
    349355
     
    353359      for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    354360        {
    355           name_component = _name+"_gpr_status_"+toString(i);
     361          src = _name+"_gpr_status_"+toString(i);
    356362         
    357           log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str());
    358          
    359 #ifdef POSITION
    360           _component->interface_map (name_component,"",
    361                                      _name         ,"");
    362 #endif
    363          
    364           _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK");
    365           _component->port_map(name_component,"in_NRESET", _name, "in_NRESET");
    366          
     363          log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str());
     364
     365          {
     366            dest = _name;
     367#ifdef POSITION
     368            _component->interface_map (src ,"",
     369                                       dest,"");
     370#endif
     371            PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     372            PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     373          }
     374         
    367375          for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
    368376            {
    369               _component->port_map(name_component,
    370                                    "in_READ_"+toString(j)+"_VAL" ,
    371                                    _name+"_glue",
    372                                    "out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"        );
    373               _component->port_map(name_component,
    374                                    "out_READ_"+toString(j)+"_ACK",
    375                                    _name+"_glue",
    376                                    "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" );
    377               _component->port_map(name_component,
    378                                    "out_READ_"+toString(j)+"_DATA",
    379                                    _name+"_glue",
    380                                    "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"   );
    381               _component->port_map(name_component,
    382                                    "in_READ_"+toString(j)+"_ADDRESS",
    383                                    _name,
    384                                    "in_GPR_READ_"+toString(j)+"_NUM_REG");
     377              dest = _name+"_glue";
     378             
     379#ifdef POSITION
     380              _component->interface_map (src ,    "read_"+toString(j),
     381                                         dest,"gpr_read_status_"+toString(i)+"_"+toString(j));
     382#endif
     383
     384              COMPONENT_MAP(_component,src , "in_READ_"                           +toString(j)+"_VAL",
     385                                       dest,"out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
     386              COMPONENT_MAP(_component,src ,"out_READ_"                           +toString(j)+"_ACK",
     387                                       dest, "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK");
     388              COMPONENT_MAP(_component,src ,"out_READ_"                           +toString(j)+"_DATA",
     389                                       dest, "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL");
     390
     391              dest = _name;
     392             
     393              PORT_MAP     (_component,src , "in_READ_"    +toString(j)+"_ADDRESS",
     394                                       dest, "in_GPR_READ_"+toString(j)+"_NUM_REG");
    385395            }
    386396
     
    388398          for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
    389399            {
    390               _component->port_map(name_component,
    391                                    "in_WRITE_"+toString(x)+"_VAL" ,
    392                                    _name+"_glue",
    393                                    "out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
    394               _component->port_map(name_component,
    395                                    "out_WRITE_"+toString(x)+"_ACK",
    396                                    _name+"_glue",
    397                                    "in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" );
    398               _component->port_map(name_component,
    399                                    "in_WRITE_"+toString(x)+"_DATA" ,
    400                                    _name+"_glue",
    401                                    "out_CONST_1");
    402 
    403               _component->port_map(_name+"_glue",
    404                                    "out_CONST_1",
    405                                    name_component,
    406                                    "in_WRITE_"+toString(x)+"_DATA" );
    407 
    408 
    409               _component->port_map(name_component,
    410                                    "in_WRITE_"+toString(x++)+"_ADDRESS",
    411                                    _name,
    412                                    "in_GPR_WRITE_"+toString(j)+"_NUM_REG");
     400              dest = _name+"_glue";
     401             
     402#ifdef POSITION
     403              _component->interface_map (src ,    "write_"+toString(j),
     404                                         dest,"gpr_write_status_"+toString(i)+"_"+toString(j));
     405#endif
     406
     407              COMPONENT_MAP(_component,src , "in_WRITE_"                           +toString(x)+"_VAL",
     408                                       dest,"out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
     409              COMPONENT_MAP(_component,src ,"out_WRITE_"                           +toString(x)+"_ACK",
     410                                       dest, "in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK");
     411              COMPONENT_MAP(_component,src , "in_WRITE_"                           +toString(x)+"_DATA",
     412                                       dest,"out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_DATA");
     413//                                     dest,"out_CONST_1");
     414             
     415              dest = _name;
     416             
     417              PORT_MAP     (_component,src , "in_WRITE_"    +toString(x)+"_ADDRESS",
     418                                       dest, "in_GPR_WRITE_"+toString(j)+"_NUM_REG");
     419
     420              x++;
    413421            }
    414422         
    415423          for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++)
    416424            {
    417               _component->port_map(name_component,
    418                                    "in_WRITE_"+toString(x)+"_VAL" ,
    419                                    _name+"_glue",
    420                                    "out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
    421               _component->port_map(name_component,
    422                                    "out_WRITE_"+toString(x)+"_ACK",
    423                                    _name+"_glue",
    424                                    "in_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" );
    425 
    426               _component->port_map(name_component,
    427                                    "in_WRITE_"+toString(x)+"_DATA",
    428                                     _name+"_glue",
    429                                    "out_CONST_0"
    430                                    );
    431               _component->port_map( _name+"_glue",
    432                                     "out_CONST_0",
    433                                     name_component,
    434                                    "in_WRITE_"+toString(x)+"_DATA");
    435 
    436               _component->port_map(name_component,
    437                                    "in_WRITE_"+toString(x++)+"_ADDRESS",
    438                                    _name,
    439                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG");
    440 
     425              dest = _name+"_glue";
     426             
     427#ifdef POSITION
     428              _component->interface_map (src ,    "write_"+toString(j),
     429                                         dest,"insert_rob_gpr_status_"+toString(i)+"_"+toString(j));
     430#endif
     431
     432              COMPONENT_MAP(_component,src , "in_WRITE_"                                +toString(x)+"_VAL",
     433                                       dest,"out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
     434              COMPONENT_MAP(_component,src ,"out_WRITE_"                                +toString(x)+"_ACK",
     435                                       dest, "in_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK");
     436              COMPONENT_MAP(_component,src , "in_WRITE_"                                +toString(x)+"_DATA",
     437                                       dest,"out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA");
     438//                                     dest,"out_CONST_0");
     439             
     440              dest = _name;
     441             
     442              PORT_MAP     (_component,src , "in_WRITE_"                     +toString(x)+"_ADDRESS",
     443                                       dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG");
     444
     445              x++;
    441446            }
    442 
    443 //        for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)
    444 //          {
    445 //            _component->port_map(name_component,
    446 //                                 "in_WRITE_"+toString(x)+"_VAL" ,
    447 //                                 _name+"_glue",
    448 //                                 "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL");
    449 //            _component->port_map(name_component,
    450 //                                 "out_WRITE_"+toString(x)+"_ACK",
    451 //                                 _name+"_glue",
    452 //                                 "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" );
    453 
    454 //            _component->port_map(name_component,
    455 //                                 "in_WRITE_"+toString(x)+"_DATA" ,
    456 //                                 _name+"_glue",
    457 //                                 "out_CONST_0");
    458 //            _component->port_map(_name+"_glue",
    459 //                                 "out_CONST_0",
    460 //                                 name_component,
    461 //                                 "in_WRITE_"+toString(x)+"_DATA" );
    462 
    463 //            _component->port_map(name_component,
    464 //                                 "in_WRITE_"+toString(x++)+"_ADDRESS",
    465 //                                 _name,
    466 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG");
    467              
    468 //            _component->port_map(name_component,
    469 //                                 "in_WRITE_"+toString(x)+"_VAL" ,
    470 //                                 _name+"_glue",
    471 //                                 "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL");
    472 //            _component->port_map(name_component,
    473 //                                 "out_WRITE_"+toString(x)+"_ACK",
    474 //                                 _name+"_glue",
    475 //                                 "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" );
    476 
    477 //            _component->port_map(name_component,
    478 //                                 "in_WRITE_"+toString(x)+"_DATA" ,
    479 //                                 _name+"_glue",
    480 //                                 "out_CONST_1"
    481 //                                 );
    482 //            _component->port_map(_name+"_glue",
    483 //                                 "out_CONST_1",
    484 //                                 name_component,
    485 //                                 "in_WRITE_"+toString(x)+"_DATA"
    486 //                                 );
    487 
    488 //            _component->port_map(name_component,
    489 //                                 "in_WRITE_"+toString(x++)+"_ADDRESS",
    490 //                                 _name,
    491 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG");
    492 //          }
    493447
    494448        }
     
    497451    for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    498452      {
    499         name_component = _name+"_spr_"+toString(i);
     453        src = _name+"_spr_"+toString(i);
    500454       
    501         log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str());
     455        log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str());
    502456       
    503 #ifdef POSITION
    504         _component->interface_map (name_component,"",
    505                                    _name         ,"");
    506 #endif
    507        
    508         _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK");
    509         _component->port_map(name_component,"in_NRESET", _name, "in_NRESET");
     457        {
     458          dest = _name;
     459#ifdef POSITION
     460          _component->interface_map (src ,"",
     461                                     dest,"");
     462#endif
     463          PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     464          PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     465        }
    510466
    511467        for (uint32_t j=0; j<_param->_nb_spr_read; j++)
    512468          {
    513             _component->port_map(name_component,
    514                                  "in_READ_"+toString(j)+"_VAL",
    515                                  _name+"_glue",
    516                                  "out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
    517             _component->port_map(name_component,
    518                                  "out_READ_"+toString(j)+"_ACK",
    519                                  _name+"_glue",
    520                                  "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
    521             _component->port_map(name_component,
    522                                  "out_READ_"+toString(j)+"_DATA",
    523                                  _name+"_glue",
    524                                  "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA");
    525             _component->port_map(name_component,
    526                                  "in_READ_"+toString(j)+"_ADDRESS",
    527                                  _name,
    528                                  "in_SPR_READ_"+toString(j)+"_NUM_REG");
     469            dest = _name+"_glue";
     470           
     471#ifdef POSITION
     472            _component->interface_map (src ,    "read_"+toString(j),
     473                                       dest,"spr_read_registerfile_"+toString(i)+"_"+toString(j));
     474#endif
     475
     476            COMPONENT_MAP(_component,src , "in_READ_"                                 +toString(j)+"_VAL",
     477                                     dest,"out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
     478            COMPONENT_MAP(_component,src ,"out_READ_"                                 +toString(j)+"_ACK",
     479                                     dest, "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
     480            COMPONENT_MAP(_component,src ,"out_READ_"                                 +toString(j)+"_DATA",
     481                                     dest, "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA");
     482
     483            dest = _name;
     484
     485            PORT_MAP     (_component,src , "in_READ_"    +toString(j)+"_ADDRESS",
     486                                     dest, "in_SPR_READ_"+toString(j)+"_NUM_REG");
    529487          }
     488
    530489        for (uint32_t j=0; j<_param->_nb_spr_write; j++)
    531490          {
    532             _component->port_map(name_component,
    533                                  "in_WRITE_"+toString(j)+"_VAL",
    534                                  _name+"_glue",
    535                                  "out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
    536             _component->port_map(name_component,
    537                                  "out_WRITE_"+toString(j)+"_ACK",
    538                                  _name+"_glue",
    539                                  "in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
    540             _component->port_map(name_component,
    541                                  "in_WRITE_"+toString(j)+"_ADDRESS",
    542                                  _name,
    543                                  "in_SPR_WRITE_"+toString(j)+"_NUM_REG"
    544                                  );
    545             _component->port_map(name_component,
    546                                  "in_WRITE_"+toString(j)+"_DATA",
    547                                  _name,
    548                                  "in_SPR_WRITE_"+toString(j)+"_DATA");
     491            dest = _name+"_glue";
     492           
     493#ifdef POSITION
     494            _component->interface_map (src ,    "write_"+toString(j),
     495                                       dest,"spr_write_registerfile_"+toString(i)+"_"+toString(j));
     496#endif
     497
     498            COMPONENT_MAP(_component,src , "in_WRITE_"                                 +toString(j)+"_VAL",
     499                                     dest,"out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL");
     500            COMPONENT_MAP(_component,src ,"out_WRITE_"                                 +toString(j)+"_ACK",
     501                                     dest, "in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK");
     502
     503            dest = _name;
     504
     505            PORT_MAP     (_component,src , "in_WRITE_"    +toString(j)+"_ADDRESS",
     506                                     dest, "in_SPR_WRITE_"+toString(j)+"_NUM_REG");
     507            PORT_MAP     (_component,src , "in_WRITE_"    +toString(j)+"_DATA",
     508                                     dest, "in_SPR_WRITE_"+toString(j)+"_DATA");
    549509          }
    550510
     
    554514      for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    555515        {
    556           name_component = _name+"_spr_status_"+toString(i);
     516          src = _name+"_spr_status_"+toString(i);
    557517         
    558           log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str());   
     518          log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str());       
    559519 
    560 #ifdef POSITION
    561           _component->interface_map (name_component,"",
    562                                      _name         ,"");
    563 #endif
    564          
    565           _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK");
    566           _component->port_map(name_component,"in_NRESET", _name, "in_NRESET");
    567          
     520          {
     521            dest = _name;
     522#ifdef POSITION
     523            _component->interface_map (src ,"",
     524                                       dest,"");
     525#endif
     526            PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     527            PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     528          }
     529
    568530          for (uint32_t j=0; j<_param->_nb_spr_read; j++)
    569531            {
    570               _component->port_map(name_component,
    571                                    "in_READ_"+toString(j)+"_VAL" ,
    572                                    _name+"_glue",
    573                                    "out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"        );
    574               _component->port_map(name_component,
    575                                    "out_READ_"+toString(j)+"_ACK",
    576                                    _name+"_glue",
    577                                    "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" );
    578               _component->port_map(name_component,
    579                                    "out_READ_"+toString(j)+"_DATA",
    580                                    _name+"_glue",
    581                                    "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"   );
    582               _component->port_map(name_component,
    583                                    "in_READ_"+toString(j)+"_ADDRESS",
    584                                    _name,
    585                                    "in_SPR_READ_"+toString(j)+"_NUM_REG");
     532              dest = _name+"_glue";
     533             
     534#ifdef POSITION
     535              _component->interface_map (src ,    "read_"+toString(j),
     536                                         dest,"spr_read_status_"+toString(i)+"_"+toString(j));
     537#endif
     538
     539              COMPONENT_MAP(_component,src , "in_READ_"                           +toString(j)+"_VAL",
     540                                       dest,"out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
     541              COMPONENT_MAP(_component,src ,"out_READ_"                           +toString(j)+"_ACK",
     542                                       dest, "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK");
     543              COMPONENT_MAP(_component,src ,"out_READ_"                           +toString(j)+"_DATA",
     544                                       dest, "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL");
     545
     546              dest = _name;
     547             
     548              PORT_MAP     (_component,src , "in_READ_"    +toString(j)+"_ADDRESS",
     549                                       dest, "in_SPR_READ_"+toString(j)+"_NUM_REG");
    586550            }
    587551
     
    589553          for (uint32_t j=0; j<_param->_nb_spr_write; j++)
    590554            {
    591               _component->port_map(name_component,
    592                                    "in_WRITE_"+toString(x)+"_VAL" ,
    593                                    _name+"_glue",
    594                                    "out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
    595               _component->port_map(name_component,
    596                                    "out_WRITE_"+toString(x)+"_ACK",
    597                                    _name+"_glue",
    598                                    "in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" );
    599               _component->port_map(name_component,
    600                                    "in_WRITE_"+toString(x)+"_DATA" ,
    601                                    _name+"_glue",
    602                                    "out_CONST_1");
    603               _component->port_map(_name+"_glue",
    604                                    "out_CONST_1",
    605                                    name_component,
    606                                    "in_WRITE_"+toString(x)+"_DATA"
    607                                    );
    608 
    609               _component->port_map(name_component,
    610                                    "in_WRITE_"+toString(x++)+"_ADDRESS",
    611                                    _name,
    612                                    "in_SPR_WRITE_"+toString(j)+"_NUM_REG");
     555              dest = _name+"_glue";
     556             
     557#ifdef POSITION
     558              _component->interface_map (src ,    "write_"+toString(j),
     559                                         dest,"spr_write_status_"+toString(i)+"_"+toString(j));
     560#endif
     561
     562              COMPONENT_MAP(_component,src , "in_WRITE_"                           +toString(x)+"_VAL",
     563                                       dest,"out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
     564              COMPONENT_MAP(_component,src ,"out_WRITE_"                           +toString(x)+"_ACK",
     565                                       dest, "in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK");
     566              COMPONENT_MAP(_component,src , "in_WRITE_"                           +toString(x)+"_DATA",
     567                                       dest,"out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_DATA");
     568//                                     dest,"out_CONST_1");
     569             
     570              dest = _name;
     571             
     572              PORT_MAP     (_component,src , "in_WRITE_"    +toString(x)+"_ADDRESS",
     573                                       dest, "in_SPR_WRITE_"+toString(j)+"_NUM_REG");
     574
     575              x++;
    613576            }
    614577         
    615578          for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++)
    616579            {
    617               _component->port_map(name_component,
    618                                    "in_WRITE_"+toString(x)+"_VAL" ,
    619                                    _name+"_glue",
    620                                    "out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
    621               _component->port_map(name_component,
    622                                    "out_WRITE_"+toString(x)+"_ACK",
    623                                    _name+"_glue",
    624                                    "in_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" );
    625 
    626               _component->port_map(name_component,
    627                                    "in_WRITE_"+toString(x)+"_DATA",
    628                                     _name+"_glue",
    629                                    "out_CONST_0"
    630                                    );
    631               _component->port_map( _name+"_glue",
    632                                     "out_CONST_0",
    633                                    name_component,
    634                                    "in_WRITE_"+toString(x)+"_DATA"
    635                                    );
    636 
    637               _component->port_map(name_component,
    638                                    "in_WRITE_"+toString(x++)+"_ADDRESS",
    639                                    _name,
    640                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG");
    641 
     580              dest = _name+"_glue";
     581             
     582#ifdef POSITION
     583              _component->interface_map (src ,    "write_"+toString(j),
     584                                         dest,"insert_rob_spr_status_"+toString(i)+"_"+toString(j));
     585#endif
     586
     587              COMPONENT_MAP(_component,src , "in_WRITE_"                                +toString(x)+"_VAL",
     588                                       dest,"out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL");
     589              COMPONENT_MAP(_component,src ,"out_WRITE_"                                +toString(x)+"_ACK",
     590                                       dest, "in_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK");
     591              COMPONENT_MAP(_component,src , "in_WRITE_"                                +toString(x)+"_DATA",
     592                                       dest,"out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA");
     593//                                     dest,"out_CONST_0");
     594             
     595              dest = _name;
     596             
     597              PORT_MAP     (_component,src , "in_WRITE_"                     +toString(x)+"_ADDRESS",
     598                                       dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG");
     599
     600              x++;
    642601            }
    643602
    644 //        for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)
    645 //          {
    646 //            _component->port_map(name_component,
    647 //                                 "in_WRITE_"+toString(x)+"_VAL" ,
    648 //                                 _name+"_glue",
    649 //                                 "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL");
    650 //            _component->port_map(name_component,
    651 //                                 "out_WRITE_"+toString(x)+"_ACK",
    652 //                                 _name+"_glue",
    653 //                                 "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" );
    654 
    655 //            _component->port_map(name_component,
    656 //                                 "in_WRITE_"+toString(x)+"_DATA" ,
    657 //                                 _name+"_glue",
    658 //                                 "out_CONST_0");
    659 //            _component->port_map(_name+"_glue",
    660 //                                 "out_CONST_0",
    661 //                                 name_component,
    662 //                                 "in_WRITE_"+toString(x)+"_DATA"
    663 //                                 );
    664 
    665 //            _component->port_map(name_component,
    666 //                                 "in_WRITE_"+toString(x++)+"_ADDRESS",
    667 //                                 _name,
    668 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG");
    669              
    670 //            _component->port_map(name_component,
    671 //                                 "in_WRITE_"+toString(x)+"_VAL" ,
    672 //                                 _name+"_glue",
    673 //                                 "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL");
    674 //            _component->port_map(name_component,
    675 //                                 "out_WRITE_"+toString(x)+"_ACK",
    676 //                                 _name+"_glue",
    677 //                                 "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" );
    678 
    679 //            _component->port_map(name_component,
    680 //                                 "in_WRITE_"+toString(x)+"_DATA" ,
    681 //                                 _name+"_glue",
    682 //                                 "out_CONST_1"
    683 //                                 );
    684 //            _component->port_map(_name+"_glue",
    685 //                                 "out_CONST_1",
    686 //                                 name_component,
    687 //                                 "in_WRITE_"+toString(x)+"_DATA"
    688 //                                 );
    689 
    690 //            _component->port_map(name_component,
    691 //                                 "in_WRITE_"+toString(x++)+"_ADDRESS",
    692 //                                 _name,
    693 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG");
    694 //          }
    695603
    696604        }
     
    698606
    699607    {
    700       name_component = _name+"_glue";
     608      src = _name+"_glue";
    701609     
    702       log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str()); 
     610      log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); 
    703611   
    704 #ifdef POSITION
    705       _component->interface_map (name_component,"",
    706                                  _name         ,"");
    707 #endif
    708    
    709       _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK" );
    710       _component->port_map(name_component,"in_NRESET", _name, "in_NRESET");
    711 //       _component->port_map(name_component,"out_CONST_0",_name,"out_CONST_0");
    712 //       _component->port_map(name_component,"out_CONST_1",_name,"out_CONST_1");
     612        {
     613          dest = _name;
     614#ifdef POSITION
     615          _component->interface_map (src ,"",
     616                                     dest,"");
     617#endif
     618          PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     619          PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     620        }
    713621
    714622      for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
    715623        {
    716           _component->port_map(name_component,
    717                                "in_GPR_READ_"+toString(j)+"_VAL",
    718                                _name,
    719                                "in_GPR_READ_"+toString(j)+"_VAL");
    720           _component->port_map(name_component,
    721                                "out_GPR_READ_"+toString(j)+"_ACK",
    722                                _name,
    723                                "out_GPR_READ_"+toString(j)+"_ACK"           );
     624          dest = _name;
     625             
     626#ifdef POSITION
     627          _component->interface_map (src ,"gpr_read_"+toString(j),
     628                                     dest,"gpr_read_"+toString(j));
     629#endif
     630
     631          PORT_MAP(_component,src , "in_GPR_READ_"+toString(j)+"_VAL",
     632                              dest, "in_GPR_READ_"+toString(j)+"_VAL");
     633          PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_ACK",
     634                              dest,"out_GPR_READ_"+toString(j)+"_ACK");
    724635          if (_param->_have_port_ooo_engine_id == true)
    725             _component->port_map(name_component,
    726                                  "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID" ,
    727                                  _name,
    728                                  "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID");
    729           _component->port_map(name_component,
    730                                "out_GPR_READ_"+toString(j)+"_DATA"          ,
    731                                _name,
    732                                "out_GPR_READ_"+toString(j)+"_DATA");
    733           _component->port_map(name_component,
    734                                "out_GPR_READ_"+toString(j)+"_DATA_VAL"      ,
    735                                _name,
    736                                "out_GPR_READ_"+toString(j)+"_DATA_VAL");
    737 
    738           for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    739             {
    740               _component->port_map(name_component ,
    741                                    "out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL",
    742                                    _name+"_gpr_"+toString(i),
    743                                    "in_READ_"+toString(j)+"_VAL"  );
    744               _component->port_map(name_component,
    745                                    "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"  ,
    746                                    _name+"_gpr_"+toString(i),
    747                                    "out_READ_"+toString(j)+"_ACK" );
    748               _component->port_map(name_component,
    749                                    "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA" ,
    750                                    _name+"_gpr_"+toString(i),
    751                                    "out_READ_"+toString(j)+"_DATA");
    752               _component->port_map(name_component,
    753                                    "out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"        ,
    754                                    _name+"_gpr_status_"+toString(i),
    755                                    "in_READ_"+toString(j)+"_VAL" );
    756               _component->port_map(name_component,
    757                                    "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ,
    758                                    _name+"_gpr_status_"+toString(i),
    759                                    "out_READ_"+toString(j)+"_ACK");
    760               _component->port_map(name_component,
    761                                    "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"   ,
    762                                    _name+"_gpr_status_"+toString(i),
    763                                    "out_READ_"+toString(j)+"_DATA");
    764             }
     636          PORT_MAP(_component,src , "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID",
     637                              dest, "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID");
     638          PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_DATA",
     639                              dest,"out_GPR_READ_"+toString(j)+"_DATA");
     640          PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_DATA_VAL",
     641                              dest,"out_GPR_READ_"+toString(j)+"_DATA_VAL");
     642
     643          // out_GPR_READ_REGISTERFILE_VAL   - gpr. in_READ_VAL
     644          //  in_GPR_READ_REGISTERFILE_ACK   - gpr.out_READ_ACK
     645          //  in_GPR_READ_REGISTERFILE_DATA  - gpr.out_READ_DATA
     646         
     647          // out_GPR_READ_STATUS_VAL         - gpr. in_READ_VAL
     648          //  in_GPR_READ_STATUS_ACK         - gpr.out_READ_ACK
     649          //  in_GPR_READ_STATUS_DATA_VAL    - gpr.out_READ_DATA
    765650        }
    766651
    767652      for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
    768653        {
    769           _component->port_map(name_component,
    770                                "in_GPR_WRITE_"+toString(j)+"_VAL",
    771                                _name,
    772                                "in_GPR_WRITE_"+toString(j)+"_VAL"           );
    773           _component->port_map(name_component,
    774                                "out_GPR_WRITE_"+toString(j)+"_ACK",
    775                                _name,
    776                                "out_GPR_WRITE_"+toString(j)+"_ACK"           );
     654          dest = _name;
     655
     656#ifdef POSITION
     657          _component->interface_map (src ,"gpr_write_"+toString(j),
     658                                     dest,"gpr_write_"+toString(j));
     659#endif
     660
     661          PORT_MAP(_component,src , "in_GPR_WRITE_"+toString(j)+"_VAL",
     662                              dest, "in_GPR_WRITE_"+toString(j)+"_VAL");
     663          PORT_MAP(_component,src ,"out_GPR_WRITE_"+toString(j)+"_ACK",
     664                              dest,"out_GPR_WRITE_"+toString(j)+"_ACK");
    777665          if (_param->_have_port_ooo_engine_id == true)
    778             _component->port_map(name_component,
    779                                  "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID",
    780                                  _name,
    781                                  "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID" );
    782          
    783           for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     666          PORT_MAP(_component,src , "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID",
     667                              dest, "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID");
     668
     669          // out_GPR_WRITE_REGISTERFILE_VAL - gpr. in_WRITE_VAL
     670          //  in_GPR_WRITE_REGISTERFILE_ACK - gpr.out_WRITE_ACK
     671          // out_GPR_WRITE_STATUS_VAL       - gpr. in_WRITE_VAL
     672          //  in_GPR_WRITE_STATUS_ACK       - gpr.out_WRITE_ACK
     673          // out_GPR_WRITE_STATUS_DATA      - gpr. in_WRITE_DATA
     674        }
     675
     676      for (uint32_t j=0; j<_param->_nb_spr_read; j++)
     677        {
     678          dest = _name;
     679             
     680#ifdef POSITION
     681          _component->interface_map (src ,"spr_read_"+toString(j),
     682                                     dest,"spr_read_"+toString(j));
     683#endif
     684
     685          PORT_MAP(_component,src , "in_SPR_READ_"+toString(j)+"_VAL",
     686                              dest, "in_SPR_READ_"+toString(j)+"_VAL");
     687          PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_ACK",
     688                              dest,"out_SPR_READ_"+toString(j)+"_ACK");
     689          if (_param->_have_port_ooo_engine_id == true)
     690          PORT_MAP(_component,src , "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID",
     691                              dest, "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID");
     692          PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_DATA",
     693                              dest,"out_SPR_READ_"+toString(j)+"_DATA");
     694          PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_DATA_VAL",
     695                              dest,"out_SPR_READ_"+toString(j)+"_DATA_VAL");
     696
     697          // out_SPR_READ_REGISTERFILE_VAL   - spr. in_READ_VAL
     698          //  in_SPR_READ_REGISTERFILE_ACK   - spr.out_READ_ACK
     699          //  in_SPR_READ_REGISTERFILE_DATA  - spr.out_READ_DATA
     700         
     701          // out_SPR_READ_STATUS_VAL         - spr. in_READ_VAL
     702          //  in_SPR_READ_STATUS_ACK         - spr.out_READ_ACK
     703          //  in_SPR_READ_STATUS_DATA_VAL    - spr.out_READ_DATA
     704        }
     705
     706      for (uint32_t j=0; j<_param->_nb_spr_write; j++)
     707        {
     708          dest = _name;
     709
     710#ifdef POSITION
     711          _component->interface_map (src ,"spr_write_"+toString(j),
     712                                     dest,"spr_write_"+toString(j));
     713#endif
     714
     715          PORT_MAP(_component,src , "in_SPR_WRITE_"+toString(j)+"_VAL",
     716                              dest, "in_SPR_WRITE_"+toString(j)+"_VAL");
     717          PORT_MAP(_component,src ,"out_SPR_WRITE_"+toString(j)+"_ACK",
     718                              dest,"out_SPR_WRITE_"+toString(j)+"_ACK");
     719          if (_param->_have_port_ooo_engine_id == true)
     720          PORT_MAP(_component,src , "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID",
     721                              dest, "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID");
     722
     723          // out_SPR_WRITE_REGISTERFILE_VAL - spr. in_WRITE_VAL
     724          //  in_SPR_WRITE_REGISTERFILE_ACK - spr.out_WRITE_ACK
     725          // out_SPR_WRITE_STATUS_VAL       - spr. in_WRITE_VAL
     726          //  in_SPR_WRITE_STATUS_ACK       - spr.out_WRITE_ACK
     727          // out_SPR_WRITE_STATUS_DATA      - spr. in_WRITE_DATA
     728        }
     729
     730      for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     731        {
     732          uint32_t x     =_param->_nb_inst_insert_rob [i];
     733
     734          for (uint32_t j=0; j<x; j++)
    784735            {
    785               _component->port_map(name_component,
    786                                    "out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"  ,
    787                                    _name+"_gpr_"+toString(i),
    788                                    "in_WRITE_"+toString(j)+"_VAL" );
    789               _component->port_map(name_component,
    790                                    "in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"  ,
    791                                    _name+"_gpr_"+toString(i),
    792                                    "out_WRITE_"+toString(j)+"_ACK" );
    793               _component->port_map(name_component,
    794                                    "out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"        ,
    795                                    _name+"_gpr_status_"+toString(i),
    796                                    "in_WRITE_"+toString(j)+"_VAL" );
    797               _component->port_map(name_component,
    798                                    "in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"        ,
    799                                    _name+"_gpr_status_"+toString(i),
    800                                    "out_WRITE_"+toString(j)+"_ACK" );
     736              dest = _name;
     737
     738#ifdef POSITION
     739              _component->interface_map (src ,"insert_rob_"+toString(i)+"_"+toString(j),
     740                                         dest,"insert_rob_"+toString(i)+"_"+toString(j));
     741#endif
     742
     743              PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL",
     744                                  dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL");
     745              PORT_MAP(_component,src ,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK",
     746                                  dest,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK");
     747              PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE",
     748                                  dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE");
     749              PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE",
     750                                  dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE");
     751             
     752              // out_INSERT_ROB_GPR_STATUS_VAL - gpr_status.  in_WRITE_VAL
     753              //  in_INSERT_ROB_GPR_STATUS_ACK - gpr_status. out_WRITE_ACK
     754              // out_INSERT_ROB_GPR_STATUS_DATA- gpr_status.  in_WRITE_DATA
     755              // out_INSERT_ROB_SPR_STATUS_VAL - spr_status.  in_WRITE_VAL
     756              //  in_INSERT_ROB_SPR_STATUS_ACK - spr_status. out_WRITE_ACK
     757              //  in_INSERT_ROB_SPR_STATUS_DATA- spr_status. out_WRITE_DATA
    801758            }
    802759        }
    803760     
    804       for (uint32_t j=0; j<_param->_nb_spr_read; j++)
    805         {
    806           _component->port_map(name_component,
    807                                "in_SPR_READ_"+toString(j)+"_VAL",
    808                                _name,
    809                                "in_SPR_READ_"+toString(j)+"_VAL");
    810           _component->port_map(name_component,
    811                                "out_SPR_READ_"+toString(j)+"_ACK",
    812                                _name,
    813                                "out_SPR_READ_"+toString(j)+"_ACK"           );
    814           if (_param->_have_port_ooo_engine_id == true)
    815             _component->port_map(name_component,
    816                                  "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID" ,
    817                                  _name,
    818                                  "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID");
    819           _component->port_map(name_component,
    820                                "out_SPR_READ_"+toString(j)+"_DATA"          ,
    821                                _name,
    822                                "out_SPR_READ_"+toString(j)+"_DATA");
    823           _component->port_map(name_component,
    824                                "out_SPR_READ_"+toString(j)+"_DATA_VAL"      ,
    825                                _name,
    826                                "out_SPR_READ_"+toString(j)+"_DATA_VAL");
    827 
    828           for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    829             {
    830               _component->port_map(name_component ,
    831                                    "out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL",
    832                                    _name+"_spr_"+toString(i),
    833                                    "in_READ_"+toString(j)+"_VAL"  );
    834               _component->port_map(name_component,
    835                                    "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"  ,
    836                                    _name+"_spr_"+toString(i),
    837                                    "out_READ_"+toString(j)+"_ACK" );
    838               _component->port_map(name_component,
    839                                    "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA" ,
    840                                    _name+"_spr_"+toString(i),
    841                                    "out_READ_"+toString(j)+"_DATA");
    842               _component->port_map(name_component,
    843                                    "out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"        ,
    844                                    _name+"_spr_status_"+toString(i),
    845                                    "in_READ_"+toString(j)+"_VAL" );
    846               _component->port_map(name_component,
    847                                    "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ,
    848                                    _name+"_spr_status_"+toString(i),
    849                                    "out_READ_"+toString(j)+"_ACK");
    850               _component->port_map(name_component,
    851                                    "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"   ,
    852                                    _name+"_spr_status_"+toString(i),
    853                                    "out_READ_"+toString(j)+"_DATA");
    854             }
    855         }
    856 
    857       for (uint32_t j=0; j<_param->_nb_spr_write; j++)
    858         {
    859           _component->port_map(name_component,
    860                                "in_SPR_WRITE_"+toString(j)+"_VAL",
    861                                _name,
    862                                "in_SPR_WRITE_"+toString(j)+"_VAL"           );
    863           _component->port_map(name_component,
    864                                "out_SPR_WRITE_"+toString(j)+"_ACK",
    865                                _name,
    866                                "out_SPR_WRITE_"+toString(j)+"_ACK"           );
    867           if (_param->_have_port_ooo_engine_id == true)
    868             _component->port_map(name_component,
    869                                  "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID",
    870                                  _name,
    871                                  "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID" );
    872          
    873           for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    874             {
    875               _component->port_map(name_component,
    876                                    "out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"  ,
    877                                    _name+"_spr_"+toString(i),
    878                                    "in_WRITE_"+toString(j)+"_VAL" );
    879               _component->port_map(name_component,
    880                                    "in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"  ,
    881                                    _name+"_spr_"+toString(i),
    882                                    "out_WRITE_"+toString(j)+"_ACK" );
    883               _component->port_map(name_component,
    884                                    "out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"        ,
    885                                    _name+"_spr_status_"+toString(i),
    886                                    "in_WRITE_"+toString(j)+"_VAL" );
    887               _component->port_map(name_component,
    888                                    "in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"        ,
    889                                    _name+"_spr_status_"+toString(i),
    890                                    "out_WRITE_"+toString(j)+"_ACK" );
    891             }
    892         }
    893 
    894       for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    895         {
    896           uint32_t x     =_param->_nb_inst_insert_rob [i];
    897           uint32_t gpr_j = _param->_nb_gpr_write;
    898           uint32_t spr_j = _param->_nb_spr_write;
    899 
    900           for (uint32_t j=0; j<x; j++)
    901             {
    902               _component->port_map(name_component,
    903                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL",
    904                                    _name,
    905                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL");
    906               _component->port_map(name_component,
    907                                    "out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK",
    908                                    _name,
    909                                    "out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK");
    910               _component->port_map(name_component,
    911                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE",
    912                                    _name,
    913                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE");
    914               _component->port_map(name_component,
    915                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE",
    916                                    _name,
    917                                    "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE");
    918               _component->port_map(name_component,
    919                                    "out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL",
    920                                    _name+"_gpr_status_"+toString(i),
    921                                    "in_WRITE_"+toString(gpr_j)+"_VAL");
    922               _component->port_map(name_component,
    923                                    "in_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK",
    924                                    _name+"_gpr_status_"+toString(i),
    925                                    "out_WRITE_"+toString(gpr_j++)+"_ACK");
    926               _component->port_map(name_component,
    927                                    "out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL",
    928                                    _name+"_spr_status_"+toString(i),
    929                                    "in_WRITE_"+toString(spr_j)+"_VAL");
    930               _component->port_map(name_component,
    931                                    "in_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK",
    932                                    _name+"_spr_status_"+toString(i),
    933                                    "out_WRITE_"+toString(spr_j++)+"_ACK");
    934             }
    935         }
    936 
    937 //       for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    938 //      {
    939 //        uint32_t x     =_param->_nb_inst_retire_rob [i];
    940 //        uint32_t gpr_j = _param->_nb_gpr_write + _param->_nb_inst_insert_rob [i];
    941 //        uint32_t spr_j = _param->_nb_spr_write + _param->_nb_inst_insert_rob [i];
    942 
    943 //        for (uint32_t j=0; j<x; j++)
    944 //          {
    945 //            _component->port_map(name_component,
    946 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL",
    947 //                                 _name,
    948 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL");
    949 //            _component->port_map(name_component,
    950 //                                 "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK",
    951 //                                 _name,
    952 //                                 "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK");
    953 //            _component->port_map(name_component,
    954 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE",
    955 //                                 _name,
    956 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE");
    957 //            _component->port_map(name_component,
    958 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE",
    959 //                                 _name,
    960 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE");
    961 //            _component->port_map(name_component,
    962 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE",
    963 //                                 _name,
    964 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE");
    965 //            _component->port_map(name_component,
    966 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE",
    967 //                                 _name,
    968 //                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE");
    969            
    970 //            _component->port_map(name_component,
    971 //                                 "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL",
    972 //                                 _name+"_gpr_status_"+toString(i),
    973 //                                 "in_WRITE_"+toString(gpr_j)+"_VAL");
    974 //            _component->port_map(name_component,
    975 //                                 "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK",
    976 //                                 _name+"_gpr_status_"+toString(i),
    977 //                                 "out_WRITE_"+toString(gpr_j++)+"_ACK");
    978 //            _component->port_map(name_component,
    979 //                                 "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL",
    980 //                                 _name+"_gpr_status_"+toString(i),
    981 //                                 "in_WRITE_"+toString(gpr_j)+"_VAL");
    982 //            _component->port_map(name_component,
    983 //                                 "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK",
    984 //                                 _name+"_gpr_status_"+toString(i),
    985 //                                 "out_WRITE_"+toString(gpr_j++)+"_ACK");
    986 //            _component->port_map(name_component,
    987 //                                 "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL",
    988 //                                 _name+"_spr_status_"+toString(i),
    989 //                                 "in_WRITE_"+toString(spr_j)+"_VAL");
    990 //            _component->port_map(name_component,
    991 //                                 "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK",
    992 //                                 _name+"_spr_status_"+toString(i),
    993 //                                 "out_WRITE_"+toString(spr_j++)+"_ACK");
    994 //            _component->port_map(name_component,
    995 //                                 "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL",
    996 //                                 _name+"_spr_status_"+toString(i),
    997 //                                 "in_WRITE_"+toString(spr_j)+"_VAL");
    998 //            _component->port_map(name_component,
    999 //                                 "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK",
    1000 //                                 _name+"_spr_status_"+toString(i),
    1001 //                                 "out_WRITE_"+toString(spr_j++)+"_ACK");
    1002 //          }
    1003 //      }
    1004761    }// glue
    1005762
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_deallocation.cpp

    r112 r128  
    7474
    7575    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    76 
     76    for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     77      {
     78    delete    component_gpr        [i];
     79    delete    component_gpr_status [i];
     80    delete    component_spr        [i];
     81    delete    component_spr_status [i];
     82      }
    7783    delete [] component_gpr       ;
    7884    delete [] component_gpr_status;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/src/main.cpp

    r115 r128  
    77
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/include/test.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011#define NB_PARAMS 18
     
    309310  morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void) = &(morpheo::behavioural::custom::default_get_custom_information);
    310311
     312  bool * num_thread_valid;
     313  ALLOC1(num_thread_valid              ,bool, nb_thread);
     314  for (uint32_t i=0; i<nb_thread; ++i)
     315    num_thread_valid [i] = true;
     316
    311317  try
    312318    {
     
    367373         is_load_store_unit                            , //[nb_execute_unit]
    368374         translate_num_execute_unit                    , //[nb_execute_unit]
     375         num_thread_valid                              , //[nb_thread]
    369376         true // is_toplevel
    370377         );
    371378     
    372379      test (name,param);
     380
     381      delete param;
    373382    }
    374383  catch (morpheo::ErrorMorpheo & error)
     
    383392    }
    384393
     394  for (uint32_t i=0; i< nb_functionnal_unit; i++)
     395    {
     396  for (uint32_t j=0; j< MAX_TYPE; j++)
     397  delete [] timing [i][j];
     398  delete [] timing [i];
     399    }
     400  delete [] timing;
     401
     402  DELETE1(translate_num_execute_unit    ,_nb_execute_unit);
     403  DELETE1(is_load_store_unit            ,_nb_execute_unit);
     404
     405  for (uint32_t i=0; i<nb_execute_unit; i++)
     406  delete    read_unit_to_execution_unit_table_thread [i];
     407  delete [] read_unit_to_execution_unit_table_thread;
     408
     409  for (uint32_t i=0; i<nb_read_unit; i++)
     410    {
     411  for (uint32_t j=0; j<nb_execute_unit; j++)
     412  delete [] read_unit_to_execution_unit_table_routing [i][j];
     413  delete [] read_unit_to_execution_unit_table_routing [i];
     414   }
     415  delete [] read_unit_to_execution_unit_table_routing;
     416
     417  for (uint32_t i=0; i<nb_write_unit; i++)
     418  delete    execution_unit_to_write_unit_table_thread [i];
     419  delete [] execution_unit_to_write_unit_table_thread;
     420
     421  for (uint32_t i=0; i<nb_execute_unit; i++)
     422    {
     423      uint32_t nb_execute_unit_port = (i<nb_load_store_unit)?nb_inst_memory[i]:nb_inst_functionnal_unit[i-nb_load_store_unit];
     424  for (uint32_t j=0; j<nb_execute_unit_port; j++)
     425  delete [] execution_unit_to_write_unit_table_routing [i][j];
     426  delete [] execution_unit_to_write_unit_table_routing [i];
     427   }
     428  delete [] execution_unit_to_write_unit_table_routing;
     429
     430  DELETE1(nb_inst_retire_rob            ,_nb_ooo_engine);
     431  DELETE1(nb_inst_insert_rob            ,_nb_ooo_engine);
     432  DELETE1(nb_special_register           ,_nb_ooo_engine);
     433  DELETE1(nb_general_register           ,_nb_ooo_engine);
     434  DELETE1(write_queue_scheme            ,_nb_write_unit);
     435  DELETE1(nb_bypass_write               ,_nb_write_unit);
     436  DELETE1(size_execute_queue            ,_nb_write_unit);
     437  DELETE1(size_write_queue              ,_nb_write_unit);
     438  DELETE1(nb_inst_memory                ,_nb_load_store_unit);
     439  DELETE1(nb_cache_port                 ,_nb_load_store_unit);
     440  DELETE1(nb_bypass_memory              ,_nb_load_store_unit);
     441  DELETE1(speculative_load              ,_nb_load_store_unit);
     442  DELETE1(nb_port_check                 ,_nb_load_store_unit);
     443  DELETE1(size_speculative_access_queue ,_nb_load_store_unit);
     444  DELETE1(size_load_queue               ,_nb_load_store_unit);
     445  DELETE1(size_store_queue              ,_nb_load_store_unit);
     446  DELETE1(nb_inst_functionnal_unit      ,_nb_functionnal_unit);
     447  DELETE1(nb_inst_retire                ,_nb_read_unit);
     448  DELETE1(size_reservation_station      ,_nb_read_unit);
     449  DELETE1(size_read_queue               ,_nb_read_unit);
     450  DELETE1(num_thread_valid              , nb_thread);
     451
    385452  return (EXIT_SUCCESS);
    386453}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/src/test.cpp

    r97 r128  
    5050  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    5151  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     52
     53  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_IN_VAL                  ;
     54  sc_signal<Tcontrol_t        >  ** out_EXECUTE_LOOP_IN_ACK                  ;
     55  sc_signal<Tcontext_t        >  **  in_EXECUTE_LOOP_IN_CONTEXT_ID           ;
     56  sc_signal<Tcontext_t        >  **  in_EXECUTE_LOOP_IN_FRONT_END_ID         ;
     57  sc_signal<Tcontext_t        >  **  in_EXECUTE_LOOP_IN_OOO_ENGINE_ID        ;
     58  sc_signal<Tpacket_t         >  **  in_EXECUTE_LOOP_IN_PACKET_ID            ;
     59  sc_signal<Toperation_t      >  **  in_EXECUTE_LOOP_IN_OPERATION            ;
     60  sc_signal<Ttype_t           >  **  in_EXECUTE_LOOP_IN_TYPE                 ;
     61  sc_signal<Tlsq_ptr_t        >  **  in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_WRITE;
     62  sc_signal<Tlsq_ptr_t        >  **  in_EXECUTE_LOOP_IN_LOAD_QUEUE_PTR_WRITE ;
     63  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_IN_HAS_IMMEDIAT         ;
     64  sc_signal<Tgeneral_data_t   >  **  in_EXECUTE_LOOP_IN_IMMEDIAT             ;
     65  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_IN_READ_RA              ;
     66  sc_signal<Tgeneral_address_t>  **  in_EXECUTE_LOOP_IN_NUM_REG_RA           ;
     67  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_IN_READ_RB              ;
     68  sc_signal<Tgeneral_address_t>  **  in_EXECUTE_LOOP_IN_NUM_REG_RB           ;
     69  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_IN_READ_RC              ;
     70  sc_signal<Tspecial_address_t>  **  in_EXECUTE_LOOP_IN_NUM_REG_RC           ;
     71  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_IN_WRITE_RD             ;
     72  sc_signal<Tgeneral_address_t>  **  in_EXECUTE_LOOP_IN_NUM_REG_RD           ;
     73  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_IN_WRITE_RE             ;
     74  sc_signal<Tspecial_address_t>  **  in_EXECUTE_LOOP_IN_NUM_REG_RE           ;
     75  sc_signal<Tcontrol_t        >  ** out_EXECUTE_LOOP_OUT_VAL                 ;
     76  sc_signal<Tcontrol_t        >  **  in_EXECUTE_LOOP_OUT_ACK                 ;
     77  sc_signal<Tcontext_t        >  ** out_EXECUTE_LOOP_OUT_CONTEXT_ID          ;
     78  sc_signal<Tcontext_t        >  ** out_EXECUTE_LOOP_OUT_FRONT_END_ID        ;
     79  sc_signal<Tcontext_t        >  ** out_EXECUTE_LOOP_OUT_OOO_ENGINE_ID       ;
     80  sc_signal<Tpacket_t         >  ** out_EXECUTE_LOOP_OUT_PACKET_ID           ;
     81//sc_signal<Toperation_t      >  ** out_EXECUTE_LOOP_OUT_OPERATION           ;
     82//sc_signal<Ttype_t           >  ** out_EXECUTE_LOOP_OUT_TYPE                ;
     83  sc_signal<Tspecial_data_t   >  ** out_EXECUTE_LOOP_OUT_FLAGS               ;
     84  sc_signal<Texception_t      >  ** out_EXECUTE_LOOP_OUT_EXCEPTION           ;
     85  sc_signal<Tcontrol_t        >  ** out_EXECUTE_LOOP_OUT_NO_SEQUENCE         ;
     86  sc_signal<Taddress_t        >  ** out_EXECUTE_LOOP_OUT_ADDRESS             ;
     87  sc_signal<Tgeneral_data_t   >  ** out_EXECUTE_LOOP_OUT_DATA                ;
     88  sc_signal<Tcontrol_t        > *** out_DCACHE_REQ_VAL                       ;
     89  sc_signal<Tcontrol_t        > ***  in_DCACHE_REQ_ACK                       ;
     90  sc_signal<Tcontext_t        > *** out_DCACHE_REQ_CONTEXT_ID                ;
     91  sc_signal<Tpacket_t         > *** out_DCACHE_REQ_PACKET_ID                 ;
     92  sc_signal<Tdcache_address_t > *** out_DCACHE_REQ_ADDRESS                   ;
     93  sc_signal<Tdcache_type_t    > *** out_DCACHE_REQ_TYPE                      ;
     94  sc_signal<Tdcache_data_t    > *** out_DCACHE_REQ_WDATA                     ;
     95  sc_signal<Tcontrol_t        > ***  in_DCACHE_RSP_VAL                       ;
     96  sc_signal<Tcontrol_t        > *** out_DCACHE_RSP_ACK                       ;
     97  sc_signal<Tcontext_t        > ***  in_DCACHE_RSP_CONTEXT_ID                ;
     98  sc_signal<Tpacket_t         > ***  in_DCACHE_RSP_PACKET_ID                 ;
     99  sc_signal<Tdcache_data_t    > ***  in_DCACHE_RSP_RDATA                     ;
     100  sc_signal<Tdcache_error_t   > ***  in_DCACHE_RSP_ERROR                     ;
     101  sc_signal<Tcontrol_t        > ***  in_INSERT_ROB_VAL                       ;
     102  sc_signal<Tcontrol_t        > *** out_INSERT_ROB_ACK                       ;
     103  sc_signal<Tcontrol_t        > ***  in_INSERT_ROB_RD_USE                    ;
     104  sc_signal<Tgeneral_address_t> ***  in_INSERT_ROB_RD_NUM_REG                ;
     105  sc_signal<Tcontrol_t        > ***  in_INSERT_ROB_RE_USE                    ;
     106  sc_signal<Tspecial_address_t> ***  in_INSERT_ROB_RE_NUM_REG                ;
     107//sc_signal<Tcontrol_t        > ***  in_RETIRE_ROB_VAL                       ;
     108//sc_signal<Tcontrol_t        > *** out_RETIRE_ROB_ACK                       ;
     109//sc_signal<Tcontrol_t        > ***  in_RETIRE_ROB_RD_OLD_USE                ;
     110//sc_signal<Tgeneral_address_t> ***  in_RETIRE_ROB_RD_OLD_NUM_REG            ;
     111//sc_signal<Tcontrol_t        > ***  in_RETIRE_ROB_RD_NEW_USE                ;
     112//sc_signal<Tgeneral_address_t> ***  in_RETIRE_ROB_RD_NEW_NUM_REG            ;
     113//sc_signal<Tcontrol_t        > ***  in_RETIRE_ROB_RE_OLD_USE                ;
     114//sc_signal<Tspecial_address_t> ***  in_RETIRE_ROB_RE_OLD_NUM_REG            ;
     115//sc_signal<Tcontrol_t        > ***  in_RETIRE_ROB_RE_NEW_USE                ;
     116//sc_signal<Tspecial_address_t> ***  in_RETIRE_ROB_RE_NEW_NUM_REG            ;
    52117 
    53118  ALLOC1_SC_SIGNAL( in_EXECUTE_LOOP_IN_VAL                  ," in_EXECUTE_LOOP_IN_VAL                  ",Tcontrol_t        ,_param->_nb_read_unit);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Parameters.cpp

    r124 r128  
    77
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Parameters.h"
     9#include "Behavioural/include/Allocation.h"
    910#include "Common/include/Max.h"
    1011
     
    139140    _nb_execute_unit                            = _nb_functionnal_unit + _nb_load_store_unit;
    140141
    141     _nb_execute_unit_port                       = new uint32_t [_nb_execute_unit];
    142    
    143     _read_unit_to_execution_unit_table_execute_type = new bool * [_nb_execute_unit];
     142    ALLOC1(_nb_execute_unit_port                          ,uint32_t,_nb_execute_unit);
     143    ALLOC2(_read_unit_to_execution_unit_table_execute_type,bool    ,_nb_execute_unit,_nb_type);
     144
    144145    for (uint32_t i=0; i<_nb_execute_unit; i++)
    145       {
    146         _read_unit_to_execution_unit_table_execute_type [i] = new bool [_nb_type];
    147         for (uint32_t j=0; j<_nb_type; j++)
    148           _read_unit_to_execution_unit_table_execute_type [i][j] = false;
    149       }
     146      for (uint32_t j=0; j<_nb_type; j++)
     147        _read_unit_to_execution_unit_table_execute_type [i][j] = false;
    150148
    151149    // Fill execute_type
     
    203201    uint32_t _max_nb_inst_memory = max<uint32_t>(_nb_inst_memory,_nb_load_store_unit);
    204202
    205     _set_read_unit_source_register_write = new std::set<uint32_t> [_nb_read_unit];
    206     _set_read_unit_source_bypass_write   = new std::set<uint32_t> [_nb_read_unit];
    207     _set_read_unit_source_bypass_memory  = new std::set<uint32_t> [_nb_read_unit];
    208    
    209     _read_unit_nb_register_write          = new uint32_t [_nb_read_unit];
    210     _read_unit_nb_bypass_write            = new uint32_t [_nb_read_unit];
    211     _read_unit_nb_bypass_memory           = new uint32_t [_nb_read_unit];
    212 
    213     _link_read_unit_with_load_store_unit  = new bool ** [nb_read_unit];
    214     _link_read_unit_with_write_unit       = new bool *  [nb_read_unit];
    215     _link_read_unit_with_thread           = new bool *  [nb_read_unit];
     203    ALLOC1(_set_read_unit_source_register_write  ,std::set<uint32_t>,_nb_read_unit);
     204    ALLOC1(_set_read_unit_source_bypass_write    ,std::set<uint32_t>,_nb_read_unit);
     205    ALLOC1(_set_read_unit_source_bypass_memory   ,std::set<uint32_t>,_nb_read_unit);
     206
     207    ALLOC1(_read_unit_nb_register_write          ,uint32_t          ,_nb_read_unit);
     208    ALLOC1(_read_unit_nb_bypass_write            ,uint32_t          ,_nb_read_unit);
     209    ALLOC1(_read_unit_nb_bypass_memory           ,uint32_t          ,_nb_read_unit);
     210
     211    ALLOC3(_link_read_unit_with_load_store_unit  ,bool              ,_nb_read_unit,_nb_execute_unit,_max_nb_inst_memory);
     212    ALLOC2(_link_read_unit_with_write_unit       ,bool              ,_nb_read_unit,_nb_write_unit  );
     213    ALLOC2(_link_read_unit_with_thread           ,bool              ,_nb_read_unit,_nb_thread      );
    216214
    217215    for (uint32_t i=0; i<_nb_read_unit; i++)
     
    221219        _read_unit_nb_bypass_memory  [i] = 0;
    222220
    223         _link_read_unit_with_load_store_unit [i] = new bool * [_nb_execute_unit];
    224         _link_read_unit_with_write_unit      [i] = new bool   [_nb_write_unit];
    225         _link_read_unit_with_thread          [i] = new bool   [_nb_thread];
    226 
    227221        for (uint32_t j=0; j<_nb_execute_unit; j++)
    228           {
    229             _link_read_unit_with_load_store_unit [i][j] = new bool [_max_nb_inst_memory];
    230 
    231             for (uint32_t k=0; k<_max_nb_inst_memory; k++)
    232               _link_read_unit_with_load_store_unit [i][j][k] = false;
    233           }
     222          for (uint32_t k=0; k<_max_nb_inst_memory; k++)
     223            _link_read_unit_with_load_store_unit [i][j][k] = false;
     224
    234225        for (uint32_t j=0; j<_nb_write_unit; j++)
    235226          _link_read_unit_with_write_unit [i][j] = false;
     
    594585    delete    _param_read_unit [i];
    595586    delete [] _param_read_unit;
    596 
     587   
    597588    for (uint32_t i=0; i<_nb_execute_unit; i++)
    598589      {
    599590        uint32_t x = _translate_num_execute_unit [i];
    600 
     591       
    601592        if (_is_load_store_unit [i] == false)
    602593          delete _param_functionnal_unit [x];
    603594        else
    604           delete _param_load_store_unit [x];
     595          delete _param_load_store_unit  [x];
    605596      }
    606597    delete [] _param_functionnal_unit;
     
    613604    delete    _param_register_unit;
    614605
    615     delete [] _read_unit_to_execution_unit_table_execute_type;
    616     delete [] _read_unit_nb_register_write;
    617     delete [] _read_unit_nb_bypass_write;
    618     delete [] _read_unit_nb_bypass_memory;
    619     delete [] _set_read_unit_source_register_write ;
    620     delete [] _set_read_unit_source_bypass_write   ;
    621     delete [] _set_read_unit_source_bypass_memory  ;
    622     delete [] _link_read_unit_with_load_store_unit;
    623     delete [] _link_read_unit_with_write_unit;
    624     delete [] _link_read_unit_with_thread;
    625     delete [] _is_load_store_unit;
    626     delete [] _translate_num_execute_unit;
    627     delete [] _nb_execute_unit_port;
     606    uint32_t _nb_thread = get_nb_thread(_nb_context,
     607                                        _nb_front_end,
     608                                        _nb_ooo_engine);
     609    uint32_t _max_nb_inst_memory = max<uint32_t>(_nb_inst_memory,_nb_load_store_unit);
     610
     611    DELETE2(_link_read_unit_with_thread           ,_nb_read_unit,_nb_thread      );
     612    DELETE2(_link_read_unit_with_write_unit       ,_nb_read_unit,_nb_write_unit  );
     613    DELETE3(_link_read_unit_with_load_store_unit  ,_nb_read_unit,_nb_execute_unit,_max_nb_inst_memory);
     614
     615    DELETE1(_read_unit_nb_bypass_memory           ,_nb_read_unit);
     616    DELETE1(_read_unit_nb_bypass_write            ,_nb_read_unit);
     617    DELETE1(_read_unit_nb_register_write          ,_nb_read_unit);
     618
     619    DELETE1(_set_read_unit_source_bypass_memory   ,_nb_read_unit);
     620    DELETE1(_set_read_unit_source_bypass_write    ,_nb_read_unit);
     621    DELETE1(_set_read_unit_source_register_write  ,_nb_read_unit);
     622
     623    DELETE2(_read_unit_to_execution_unit_table_execute_type,_nb_execute_unit,_nb_type);
     624    DELETE1(_nb_execute_unit_port                          ,_nb_execute_unit);
     625
    628626    log_printf(FUNC,Execute_loop,FUNCTION,"End");
    629627  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp

    r124 r128  
    5050            reg_STATE            [i] = CONTEXT_STATE_OK;
    5151            reg_INTERRUPT_ENABLE [i] = 0;
    52             reg_EVENT_DEPTH      [i] = 0; // unacessary
     52
     53            reg_EVENT_ADDRESS          [i] = 0; // not necessary
     54            reg_EVENT_ADDRESS_EPCR     [i] = 0; // not necessary
     55            reg_EVENT_ADDRESS_EPCR_VAL [i] = 0; // not necessary
     56            reg_EVENT_ADDRESS_EEAR     [i] = 0; // not necessary
     57            reg_EVENT_ADDRESS_EEAR_VAL [i] = 0; // not necessary
     58            reg_EVENT_IS_DELAY_SLOT    [i] = 0; // not necessary
     59            reg_EVENT_IS_DS_TAKE       [i] = 0; // not necessary
     60            reg_EVENT_DEPTH            [i] = 0; // not necessary
     61            reg_EVENT_FLUSH_ONLY       [i] = 0; // not necessary
    5362          }
    5463      }
     
    236245            reg_STATE [i] = state;
    237246          }
     247
     248        // -------------------------------------------------------------------
     249        // -----[ BRANCH_EVENT ]----------------------------------------------
     250        // -------------------------------------------------------------------
     251        for (uint32_t i=0; i<_param->_nb_context; ++i)
     252          if (PORT_READ(in_BRANCH_EVENT_VAL [i]) and internal_BRANCH_EVENT_ACK [i])
     253            {
     254              log_printf(TRACE,Context_State,FUNCTION,"  * BRANCH_EVENT [%d]",i);
     255
     256              context_state_t state = reg_STATE [i];
     257
     258              Tdepth_t   depth      = (_param->_have_port_depth)?PORT_READ(in_BRANCH_EVENT_DEPTH [i]):0;
     259              Tdepth_t   depth_cur  = reg_EVENT_DEPTH [i];
     260              Tdepth_t   depth_min  = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [i]):0;
     261              Tdepth_t   depth_max  = _param->_nb_inst_branch_speculated [i];
     262             
     263              Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));
     264              Tdepth_t   depth1     = (depth    >=depth_min)?(depth    -depth_min):((depth    +depth_max-depth_min));
     265//               Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max));
     266//               Tdepth_t   depth1     = (depth    >=depth_min)?(depth    ):((depth    +depth_max));
     267
     268              // priority : miss_load > miss_branch > excep > spr/sync
     269              uint8_t    priority0  = get_priority(state);
     270              uint8_t    priority1  = PRIORITY_MISS_BRANCH; // miss
     271
     272              // is_valid = can modify local information
     273              //   if context_state_ok : yes
     274              //   if context_state_ko : test the depth, and the priority of event
     275              bool       is_valid   = ((state == CONTEXT_STATE_OK) or
     276                                       (state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE) or
     277//                                     (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE) or
     278                                       (depth1< depth0) or
     279                                       ((depth1==depth0) and (priority1>=priority0))); // >= because another branch can be a miss prediction with same depth
     280
     281              bool       is_invalid = priority0 == PRIORITY_MISS_LOAD;
     282
     283#ifdef DEBUG_TEST
     284              if ((state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE) and
     285                  (depth0 != depth1))
     286                throw ERRORMORPHEO(FUNCTION,toString(_("BRANCH_EVENT[%d] : Invalid state : %s.\n"),i,toString(state).c_str()));
     287#endif
     288
     289              log_printf(TRACE,Context_State,FUNCTION,"    * state     : %s",toString(state).c_str());
     290              log_printf(TRACE,Context_State,FUNCTION,"    * depth     : %d",depth     );
     291              log_printf(TRACE,Context_State,FUNCTION,"    * depth_cur : %d",depth_cur );
     292              log_printf(TRACE,Context_State,FUNCTION,"    * depth_min : %d",depth_min );
     293              log_printf(TRACE,Context_State,FUNCTION,"    * depth_max : %d",depth_max );
     294              log_printf(TRACE,Context_State,FUNCTION,"    * depth0    : %d",depth0    );
     295              log_printf(TRACE,Context_State,FUNCTION,"    * depth1    : %d",depth1    );
     296              log_printf(TRACE,Context_State,FUNCTION,"    * priority0 : %d",priority0 );
     297              log_printf(TRACE,Context_State,FUNCTION,"    * priority1 : %d",priority1 );
     298              log_printf(TRACE,Context_State,FUNCTION,"  * is_valid    : %d",is_valid  );
     299              log_printf(TRACE,Context_State,FUNCTION,"  * is_invalid  : %d",is_invalid);
     300
     301              if (is_valid and not is_invalid)
     302                {
     303//                reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
     304
     305                  if (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE)
     306                    {
     307// #if (MANAGE_EVENT == MANAGE_EVENT_NO_WAIT)
     308//                       reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR;
     309// #else
     310                      reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND;
     311// #endif
     312                    }
     313                  else
     314                    {
     315                      Tcontrol_t can_continue = PORT_READ(in_BRANCH_EVENT_CAN_CONTINUE    [i]);
     316                      Tcontrol_t dest_val     = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST_VAL[i]);
     317
     318                      log_printf(TRACE,Context_State,FUNCTION,"  * dest_val    : %d",dest_val    );
     319                      log_printf(TRACE,Context_State,FUNCTION,"  * can_continue: %d",can_continue);
     320
     321                      if (can_continue)
     322                        reg_STATE                [i] =  CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
     323                      else
     324                        {
     325// #if (MANAGE_EVENT == MANAGE_EVENT_NO_WAIT)
     326//                           reg_STATE                [i] =  CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
     327// #else
     328                          reg_STATE                [i] =  CONTEXT_STATE_KO_MISS_BRANCH_WAITEND;
     329// #endif
     330                        }
     331
     332                      reg_EVENT_ADDRESS          [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_SRC  [i])+1; // address delay slot
     333                      reg_EVENT_ADDRESS_EPCR     [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST [i]);   // address_next
     334                      reg_EVENT_ADDRESS_EPCR_VAL [i] = dest_val;
     335                    //reg_EVENT_ADDRESS_EEAR     [i] = 0;
     336                      reg_EVENT_ADDRESS_EEAR_VAL [i] = 0;
     337                      reg_EVENT_IS_DELAY_SLOT    [i] = 1;
     338                      reg_EVENT_IS_DS_TAKE       [i] = dest_val;
     339                      reg_EVENT_DEPTH            [i] = depth;
     340                      reg_EVENT_FLUSH_ONLY       [i] = can_continue;
     341                    }
     342                }
     343            }
     344       
     345        // -------------------------------------------------------------------
     346        // -----[ DECOD_EVENT ]-----------------------------------------------
     347        // -------------------------------------------------------------------
     348
     349        for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     350          if (PORT_READ(in_DECOD_EVENT_VAL [i]) and internal_DECOD_EVENT_ACK [i])
     351            {
     352              log_printf(TRACE,Context_State,FUNCTION,"  * DECOD_EVENT [%d]",i);
     353
     354              Tcontext_t context    = (_param->_have_port_context_id )?PORT_READ(in_DECOD_EVENT_CONTEXT_ID [i]):0;
     355              Tdepth_t   depth      = (_param->_have_port_depth      )?PORT_READ(in_DECOD_EVENT_DEPTH      [i]):0;
     356              Tdepth_t   depth_cur  = reg_EVENT_DEPTH [context];
     357              Tdepth_t   depth_min = (_param->_have_port_depth      )?PORT_READ(in_DEPTH_MIN [context]):0;
     358              Tdepth_t   depth_max  = _param->_nb_inst_branch_speculated [context];
     359             
     360              Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));
     361              Tdepth_t   depth1     = (depth    >=depth_min)?(depth    -depth_min):((depth    +depth_max-depth_min));
     362//               Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max));
     363//               Tdepth_t   depth1     = (depth    >=depth_min)?(depth    ):((depth    +depth_max));
     364
     365              context_state_t state = reg_STATE [context];
     366              Tevent_type_t   type  = PORT_READ(in_DECOD_EVENT_TYPE [i]);
     367             
     368              // miss_load > miss_branch > excep > spr/sync
     369              uint8_t    priority0  = get_priority(state);
     370              uint8_t    priority1  = (state == EVENT_TYPE_EXCEPTION)?PRIORITY_EXCEPTION:PRIORITY_NONE;
     371
     372              // is_valid = can modify local information
     373              //  if context_state_ok : yes
     374              //  if context_state_ko : test the depth, and the priority of envent
     375
     376              bool       is_valid   = ((state == CONTEXT_STATE_OK) or
     377                                       (depth1< depth0) or
     378                                       ((depth1==depth0) and (priority1>=priority0)));
     379
     380              log_printf(TRACE,Context_State,FUNCTION,"    * depth     : %d",depth     );
     381              log_printf(TRACE,Context_State,FUNCTION,"    * depth_cur : %d",depth_cur );
     382              log_printf(TRACE,Context_State,FUNCTION,"    * depth_min : %d",depth_min );
     383              log_printf(TRACE,Context_State,FUNCTION,"    * depth_max : %d",depth_max );
     384              log_printf(TRACE,Context_State,FUNCTION,"    * depth0    : %d",depth0    );
     385              log_printf(TRACE,Context_State,FUNCTION,"    * depth1    : %d",depth1    );
     386              log_printf(TRACE,Context_State,FUNCTION,"    * priority0 : %d",priority0 );
     387              log_printf(TRACE,Context_State,FUNCTION,"    * priority1 : %d",priority1 );
     388              log_printf(TRACE,Context_State,FUNCTION,"  * is_valid    : %d",is_valid  );
     389
     390              if (is_valid)
     391                {
     392                  log_printf(TRACE,Context_State,FUNCTION,"    * is_valid");
     393
     394                  // decod :
     395                  // type : csync, psync, msync, spr_access (l.mac, l.maci, l.macrc, l.msb, l.mfspr, l.mtspr), exception (l.sys)
     396                  context_state_t state_next    = state;
     397                  Taddress_t      address       = PORT_READ(in_DECOD_EVENT_ADDRESS       [i]);
     398                  Tcontrol_t      is_delay_slot = PORT_READ(in_DECOD_EVENT_IS_DELAY_SLOT [i]);
     399
     400                  switch (type)
     401                    {
     402                    case EVENT_TYPE_EXCEPTION          :
     403                      {
     404                        log_printf(TRACE,Context_State,FUNCTION,"    * EVENT_TYPE_EXCEPTION");
     405
     406                        state_next = CONTEXT_STATE_KO_EXCEP;
     407
     408                        break;
     409                      }
     410                    case EVENT_TYPE_SPR_ACCESS         :
     411                      {
     412                        log_printf(TRACE,Context_State,FUNCTION,"    * EVENT_TYPE_SPR_ACCESS");
     413
     414//                      state_next = CONTEXT_STATE_KO_SPR  ;
     415                        state_next = CONTEXT_STATE_KO_SPR_EXEC;
     416                        address++; // take next address
     417//                         if (is_delay_slot)
     418//                           throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");
     419                        break;
     420                      }
     421                    case EVENT_TYPE_MSYNC              :
     422                      {
     423                        log_printf(TRACE,Context_State,FUNCTION,"    * EVENT_TYPE_MSYNC");
     424
     425//                      state_next = CONTEXT_STATE_KO_MSYNC;
     426                        state_next = CONTEXT_STATE_KO_MSYNC_EXEC;
     427                        address++;  // take next address
     428//                         if (is_delay_slot)
     429//                           throw ERRORMORPHEO(FUNCTION,"MSYNC in delay slot, not supported.\n");
     430                        break;
     431                      }
     432                    case EVENT_TYPE_PSYNC              :
     433                      {
     434                        log_printf(TRACE,Context_State,FUNCTION,"    * EVENT_TYPE_PSYNC");
     435
     436//                      state_next = CONTEXT_STATE_KO_PSYNC;
     437                        state_next = CONTEXT_STATE_KO_PSYNC_FLUSH;
     438                        address++;  // take next address
     439                        if (is_delay_slot)
     440                          throw ERRORMORPHEO(FUNCTION,"PSYNC in delay slot, not supported.\n");
     441                        break;
     442                      }
     443                    case EVENT_TYPE_CSYNC              :
     444                      {
     445                        log_printf(TRACE,Context_State,FUNCTION,"    * EVENT_TYPE_CSYNC");
     446
     447//                      state_next = CONTEXT_STATE_KO_CSYNC;
     448                        state_next = CONTEXT_STATE_KO_CSYNC_FLUSH;
     449                        address++;  // take next address
     450                        if (is_delay_slot)
     451                          throw ERRORMORPHEO(FUNCTION,"CSYNC in delay slot, not supported.\n");
     452                        break;
     453                      }               
     454                    case EVENT_TYPE_NONE               :
     455                    case EVENT_TYPE_BRANCH_MISS_SPECULATION   :
     456                    case EVENT_TYPE_LOAD_MISS_SPECULATION   :
     457//                     case EVENT_TYPE_BRANCH_NO_ACCURATE :
     458                    default :
     459                      {
     460                        throw ERRORMORPHEO(FUNCTION,toString(_("DECOD_EVENT [%d] : invalid event_type : %s.\n"),i,toString(type).c_str()));
     461                      }
     462                    }
     463
     464                  reg_STATE                  [context] = state_next;
     465                  reg_EVENT_ADDRESS          [context] = address;
     466                  reg_EVENT_ADDRESS_EPCR     [context] = PORT_READ(in_DECOD_EVENT_ADDRESS_EPCR  [i]);
     467                  reg_EVENT_ADDRESS_EPCR_VAL [context] = 1;
     468                //reg_EVENT_ADDRESS_EEAR     [context]
     469                  reg_EVENT_ADDRESS_EEAR_VAL [context] = 0;
     470                  reg_EVENT_IS_DELAY_SLOT    [context] = is_delay_slot;
     471                //reg_EVENT_IS_DS_TAKE       [context] = 0;
     472                  reg_EVENT_DEPTH            [context] = depth;
     473                  reg_EVENT_FLUSH_ONLY       [context] = false;
     474                }
     475            }
    238476
    239477        // -------------------------------------------------------------------
     
    283521
    284522        // -------------------------------------------------------------------
    285         // -----[ BRANCH_EVENT ]----------------------------------------------
    286         // -------------------------------------------------------------------
    287         for (uint32_t i=0; i<_param->_nb_context; ++i)
    288           if (PORT_READ(in_BRANCH_EVENT_VAL [i]) and internal_BRANCH_EVENT_ACK [i])
    289             {
    290               log_printf(TRACE,Context_State,FUNCTION,"  * BRANCH_EVENT [%d]",i);
    291 
    292               context_state_t state = reg_STATE [i];
    293 
    294               Tdepth_t   depth      = (_param->_have_port_depth)?PORT_READ(in_BRANCH_EVENT_DEPTH [i]):0;
    295               Tdepth_t   depth_cur  = reg_EVENT_DEPTH [i];
    296               Tdepth_t   depth_min  = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [i]):0;
    297               Tdepth_t   depth_max  = _param->_nb_inst_branch_speculated [i];
    298              
    299               Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));
    300               Tdepth_t   depth1     = (depth    >=depth_min)?(depth    -depth_min):((depth    +depth_max-depth_min));
    301 //               Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max));
    302 //               Tdepth_t   depth1     = (depth    >=depth_min)?(depth    ):((depth    +depth_max));
    303 
    304               // priority : miss_load > miss_branch > excep > spr/sync
    305               uint8_t    priority0  = get_priority(state);
    306               uint8_t    priority1  = PRIORITY_MISS_BRANCH; // miss
    307 
    308               // is_valid = can modify local information
    309               //   if context_state_ok : yes
    310               //   if context_state_ko : test the depth, and the priority of event
    311               bool       is_valid   = ((state == CONTEXT_STATE_OK) or
    312                                        (state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE) or
    313 //                                     (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE) or
    314                                        (depth1< depth0) or
    315                                        ((depth1==depth0) and (priority1>=priority0))); // >= because another branch can be a miss prediction with same depth
    316 
    317               bool       is_invalid = priority0 == PRIORITY_MISS_LOAD;
    318 
    319 #ifdef DEBUG_TEST
    320               if ((state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE) and
    321                   (depth0 != depth1))
    322                 throw ERRORMORPHEO(FUNCTION,toString(_("BRANCH_EVENT[%d] : Invalid state : %s.\n"),i,toString(state).c_str()));
    323 #endif
    324 
    325               log_printf(TRACE,Context_State,FUNCTION,"    * state     : %s",toString(state).c_str());
    326               log_printf(TRACE,Context_State,FUNCTION,"    * depth     : %d",depth     );
    327               log_printf(TRACE,Context_State,FUNCTION,"    * depth_cur : %d",depth_cur );
    328               log_printf(TRACE,Context_State,FUNCTION,"    * depth_min : %d",depth_min );
    329               log_printf(TRACE,Context_State,FUNCTION,"    * depth_max : %d",depth_max );
    330               log_printf(TRACE,Context_State,FUNCTION,"    * depth0    : %d",depth0    );
    331               log_printf(TRACE,Context_State,FUNCTION,"    * depth1    : %d",depth1    );
    332               log_printf(TRACE,Context_State,FUNCTION,"    * priority0 : %d",priority0 );
    333               log_printf(TRACE,Context_State,FUNCTION,"    * priority1 : %d",priority1 );
    334               log_printf(TRACE,Context_State,FUNCTION,"  * is_valid    : %d",is_valid  );
    335 
    336               if (is_valid and not is_invalid)
    337                 {
    338 //                reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
    339 
    340                   if (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE)
    341                     {
    342 // #if (MANAGE_EVENT == MANAGE_EVENT_NO_WAIT)
    343 //                       reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR;
    344 // #else
    345                       reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND;
    346 // #endif
    347                     }
    348                   else
    349                     {
    350                       Tcontrol_t can_continue = PORT_READ(in_BRANCH_EVENT_CAN_CONTINUE    [i]);
    351                       Tcontrol_t dest_val     = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST_VAL[i]);
    352 
    353                       log_printf(TRACE,Context_State,FUNCTION,"  * dest_val    : %d",dest_val    );
    354                       log_printf(TRACE,Context_State,FUNCTION,"  * can_continue: %d",can_continue);
    355 
    356                       if (can_continue)
    357                         reg_STATE                [i] =  CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
    358                       else
    359                         {
    360 // #if (MANAGE_EVENT == MANAGE_EVENT_NO_WAIT)
    361 //                           reg_STATE                [i] =  CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
    362 // #else
    363                           reg_STATE                [i] =  CONTEXT_STATE_KO_MISS_BRANCH_WAITEND;
    364 // #endif
    365                         }
    366 
    367                       reg_EVENT_ADDRESS          [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_SRC  [i])+1; // address delay slot
    368                       reg_EVENT_ADDRESS_EPCR     [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST [i]);   // address_next
    369                       reg_EVENT_ADDRESS_EPCR_VAL [i] = dest_val;
    370                     //reg_EVENT_ADDRESS_EEAR     [i] = 0;
    371                       reg_EVENT_ADDRESS_EEAR_VAL [i] = 0;
    372                       reg_EVENT_IS_DELAY_SLOT    [i] = 1;
    373                       reg_EVENT_IS_DS_TAKE       [i] = dest_val;
    374                       reg_EVENT_DEPTH            [i] = depth;
    375                       reg_EVENT_FLUSH_ONLY       [i] = can_continue;
    376                     }
    377                 }
    378             }
    379 
    380         // -------------------------------------------------------------------
    381523        // -----[ BRANCH_COMPLETE ]----------------------------------------------
    382524        // -------------------------------------------------------------------
     
    429571                  reg_EVENT_DEPTH            [context_id] = depth;
    430572                  reg_EVENT_FLUSH_ONLY       [context_id] = false;
    431                 }
    432             }
    433        
    434         // -------------------------------------------------------------------
    435         // -----[ DECOD_EVENT ]-----------------------------------------------
    436         // -------------------------------------------------------------------
    437 
    438         for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
    439           if (PORT_READ(in_DECOD_EVENT_VAL [i]) and internal_DECOD_EVENT_ACK [i])
    440             {
    441               log_printf(TRACE,Context_State,FUNCTION,"  * DECOD_EVENT [%d]",i);
    442 
    443               Tcontext_t context    = (_param->_have_port_context_id )?PORT_READ(in_DECOD_EVENT_CONTEXT_ID [i]):0;
    444               Tdepth_t   depth      = (_param->_have_port_depth      )?PORT_READ(in_DECOD_EVENT_DEPTH      [i]):0;
    445               Tdepth_t   depth_cur  = reg_EVENT_DEPTH [context];
    446               Tdepth_t   depth_min = (_param->_have_port_depth      )?PORT_READ(in_DEPTH_MIN [context]):0;
    447               Tdepth_t   depth_max  = _param->_nb_inst_branch_speculated [context];
    448              
    449               Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));
    450               Tdepth_t   depth1     = (depth    >=depth_min)?(depth    -depth_min):((depth    +depth_max-depth_min));
    451 //               Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max));
    452 //               Tdepth_t   depth1     = (depth    >=depth_min)?(depth    ):((depth    +depth_max));
    453 
    454               context_state_t state = reg_STATE [context];
    455               Tevent_type_t   type  = PORT_READ(in_DECOD_EVENT_TYPE [i]);
    456              
    457               // miss_load > miss_branch > excep > spr/sync
    458               uint8_t    priority0  = get_priority(state);
    459               uint8_t    priority1  = (state == EVENT_TYPE_EXCEPTION)?PRIORITY_EXCEPTION:PRIORITY_NONE;
    460 
    461               // is_valid = can modify local information
    462               //  if context_state_ok : yes
    463               //  if context_state_ko : test the depth, and the priority of envent
    464 
    465               bool       is_valid   = ((state == CONTEXT_STATE_OK) or
    466                                        (depth1< depth0) or
    467                                        ((depth1==depth0) and (priority1>=priority0)));
    468 
    469               log_printf(TRACE,Context_State,FUNCTION,"    * depth     : %d",depth     );
    470               log_printf(TRACE,Context_State,FUNCTION,"    * depth_cur : %d",depth_cur );
    471               log_printf(TRACE,Context_State,FUNCTION,"    * depth_min : %d",depth_min );
    472               log_printf(TRACE,Context_State,FUNCTION,"    * depth_max : %d",depth_max );
    473               log_printf(TRACE,Context_State,FUNCTION,"    * depth0    : %d",depth0    );
    474               log_printf(TRACE,Context_State,FUNCTION,"    * depth1    : %d",depth1    );
    475               log_printf(TRACE,Context_State,FUNCTION,"    * priority0 : %d",priority0 );
    476               log_printf(TRACE,Context_State,FUNCTION,"    * priority1 : %d",priority1 );
    477               log_printf(TRACE,Context_State,FUNCTION,"  * is_valid    : %d",is_valid  );
    478 
    479               if (is_valid)
    480                 {
    481                   log_printf(TRACE,Context_State,FUNCTION,"    * is_valid");
    482 
    483                   // decod :
    484                   // type : csync, psync, msync, spr_access (l.mac, l.maci, l.macrc, l.msb, l.mfspr, l.mtspr), exception (l.sys)
    485                   context_state_t state_next    = state;
    486                   Taddress_t      address       = PORT_READ(in_DECOD_EVENT_ADDRESS       [i]);
    487                   Tcontrol_t      is_delay_slot = PORT_READ(in_DECOD_EVENT_IS_DELAY_SLOT [i]);
    488 
    489                   switch (type)
    490                     {
    491                     case EVENT_TYPE_EXCEPTION          :
    492                       {
    493                         log_printf(TRACE,Context_State,FUNCTION,"    * EVENT_TYPE_EXCEPTION");
    494 
    495                         state_next = CONTEXT_STATE_KO_EXCEP;
    496 
    497                         break;
    498                       }
    499                     case EVENT_TYPE_SPR_ACCESS         :
    500                       {
    501                         log_printf(TRACE,Context_State,FUNCTION,"    * EVENT_TYPE_SPR_ACCESS");
    502 
    503 //                      state_next = CONTEXT_STATE_KO_SPR  ;
    504                         state_next = CONTEXT_STATE_KO_SPR_EXEC;
    505                         address++; // take next address
    506 //                         if (is_delay_slot)
    507 //                           throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");
    508                         break;
    509                       }
    510                     case EVENT_TYPE_MSYNC              :
    511                       {
    512                         log_printf(TRACE,Context_State,FUNCTION,"    * EVENT_TYPE_MSYNC");
    513 
    514 //                      state_next = CONTEXT_STATE_KO_MSYNC;
    515                         state_next = CONTEXT_STATE_KO_MSYNC_EXEC;
    516                         address++;  // take next address
    517 //                         if (is_delay_slot)
    518 //                           throw ERRORMORPHEO(FUNCTION,"MSYNC in delay slot, not supported.\n");
    519                         break;
    520                       }
    521                     case EVENT_TYPE_PSYNC              :
    522                       {
    523                         log_printf(TRACE,Context_State,FUNCTION,"    * EVENT_TYPE_PSYNC");
    524 
    525 //                      state_next = CONTEXT_STATE_KO_PSYNC;
    526                         state_next = CONTEXT_STATE_KO_PSYNC_FLUSH;
    527                         address++;  // take next address
    528                         if (is_delay_slot)
    529                           throw ERRORMORPHEO(FUNCTION,"PSYNC in delay slot, not supported.\n");
    530                         break;
    531                       }
    532                     case EVENT_TYPE_CSYNC              :
    533                       {
    534                         log_printf(TRACE,Context_State,FUNCTION,"    * EVENT_TYPE_CSYNC");
    535 
    536 //                      state_next = CONTEXT_STATE_KO_CSYNC;
    537                         state_next = CONTEXT_STATE_KO_CSYNC_FLUSH;
    538                         address++;  // take next address
    539                         if (is_delay_slot)
    540                           throw ERRORMORPHEO(FUNCTION,"CSYNC in delay slot, not supported.\n");
    541                         break;
    542                       }               
    543                     case EVENT_TYPE_NONE               :
    544                     case EVENT_TYPE_BRANCH_MISS_SPECULATION   :
    545                     case EVENT_TYPE_LOAD_MISS_SPECULATION   :
    546 //                     case EVENT_TYPE_BRANCH_NO_ACCURATE :
    547                     default :
    548                       {
    549                         throw ERRORMORPHEO(FUNCTION,toString(_("DECOD_EVENT [%d] : invalid event_type : %s.\n"),i,toString(type).c_str()));
    550                       }
    551                     }
    552 
    553                   reg_STATE                  [context] = state_next;
    554                   reg_EVENT_ADDRESS          [context] = address;
    555                   reg_EVENT_ADDRESS_EPCR     [context] = PORT_READ(in_DECOD_EVENT_ADDRESS_EPCR  [i]);
    556                   reg_EVENT_ADDRESS_EPCR_VAL [context] = 1;
    557                 //reg_EVENT_ADDRESS_EEAR     [context]
    558                   reg_EVENT_ADDRESS_EEAR_VAL [context] = 0;
    559                   reg_EVENT_IS_DELAY_SLOT    [context] = is_delay_slot;
    560                 //reg_EVENT_IS_DS_TAKE       [context] = 0;
    561                   reg_EVENT_DEPTH            [context] = depth;
    562                   reg_EVENT_FLUSH_ONLY       [context] = false;
    563573                }
    564574            }
     
    706716            }
    707717
     718        // -------------------------------------------------------------------
     719        // -----[ INTERRUPT ]-------------------------------------------------
     720        // -------------------------------------------------------------------
    708721        for (uint32_t i=0; i<_param->_nb_context; ++i)
    709722          {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_deallocation.cpp

    r123 r128  
    9090        DELETE1_SIGNAL(in_CONTEXT_DECOD_ENABLE                ,_param->_nb_context,1);
    9191        DELETE1_SIGNAL(in_CONTEXT_EVENT                       ,_param->_nb_context,1);
     92        DELETE1_SIGNAL(in_CONTEXT_DEPTH_VAL                   ,_param->_nb_context,1);
    9293        DELETE1_SIGNAL(in_CONTEXT_DEPTH                       ,_param->_nb_context,_param->_size_depth);
    9394       
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_deallocation.cpp

    r112 r128  
    3535        DELETE0_SIGNAL(out_ADDRESS_BRANCH_STATE               ,_param->_size_branch_state            );
    3636        DELETE0_SIGNAL(out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID,_param->_size_depth);
    37         DELETE1_SIGNAL(out_ADDRESS_INSTRUCTION_ENABLE          ,1,_param->_nb_instruction);
     37        DELETE1_SIGNAL(out_ADDRESS_INSTRUCTION_ENABLE         ,_param->_nb_instruction,1);
    3838       
    3939        DELETE0_SIGNAL(out_PREDICT_VAL                        ,1);
     
    4848        DELETE0_SIGNAL( in_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_size_depth);
    4949        DELETE0_SIGNAL( in_PREDICT_INST_IFETCH_PTR            ,_param->_size_inst_ifetch_ptr);
    50         DELETE1_SIGNAL(in_PREDICT_INSTRUCTION_ENABLE           ,1,_param->_nb_instruction);
     50        DELETE1_SIGNAL(in_PREDICT_INSTRUCTION_ENABLE          ,_param->_nb_instruction,1);
    5151       
    5252        DELETE0_SIGNAL( in_EVENT_VAL             ,1);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_transition.cpp

    r123 r128  
    2828      {
    2929        // nothing is valid
    30         reg_PC_ACCESS_VAL    = 0;
    31 
    32         reg_PC_CURRENT_VAL   = 0;
    33 
    34         reg_PC_NEXT_VAL      = 1;
    35         reg_PC_NEXT          = 0x100>>2;
    36         reg_PC_NEXT_IS_DS_TAKE                  = 0;
     30        reg_PC_ACCESS_VAL                               = 0;
     31        reg_PC_ACCESS                                   = 0;// not necessary
     32        reg_PC_ACCESS_IS_DS_TAKE                        = 0;// not necessary
     33        for (uint32_t i=0; i<_param->_nb_instruction; i++)
     34        reg_PC_ACCESS_INSTRUCTION_ENABLE [i]            = 0;// not necessary
     35        reg_PC_ACCESS_INST_IFETCH_PTR                   = 0;// not necessary
     36        reg_PC_ACCESS_BRANCH_STATE                      = 0;// not necessary
     37        reg_PC_ACCESS_BRANCH_UPDATE_PREDICTION_ID       = 0;// not necessary
     38
     39        reg_PC_CURRENT_VAL                              = 0;
     40        reg_PC_CURRENT                                  = 0;// not necessary
     41        reg_PC_CURRENT_IS_DS_TAKE                       = 0;// not necessary
     42        for (uint32_t i=0; i<_param->_nb_instruction; i++)
     43        reg_PC_CURRENT_INSTRUCTION_ENABLE [i]           = 0;// not necessary
     44        reg_PC_CURRENT_INST_IFETCH_PTR                  = 0;// not necessary
     45        reg_PC_CURRENT_BRANCH_STATE                     = 0;// not necessary
     46        reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID      = 0;// not necessary
     47
     48        reg_PC_NEXT_VAL                                 = 1;
     49        reg_PC_NEXT                                     = 0x100>>2;
     50        reg_PC_NEXT_IS_DS_TAKE                          = 0;
    3751        uint32_t index = reg_PC_NEXT % _param->_nb_instruction;
    3852        for (uint32_t i=0; i<_param->_nb_instruction; i++)
    39         reg_PC_NEXT_INSTRUCTION_ENABLE [i]      = 0;
    40         reg_PC_NEXT_INSTRUCTION_ENABLE [index]  = 1;
    41         reg_PC_NEXT_INST_IFETCH_PTR             = 0;
    42         reg_PC_NEXT_BRANCH_STATE                = 0;
    43         reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID = 0;
    44 
    45 
    46         reg_PC_NEXT_NEXT_VAL = 0;
     53        reg_PC_NEXT_INSTRUCTION_ENABLE [i]              = 0;
     54        reg_PC_NEXT_INSTRUCTION_ENABLE [index]          = 1;
     55        reg_PC_NEXT_INST_IFETCH_PTR                     = 0;
     56        reg_PC_NEXT_BRANCH_STATE                        = 0;
     57        reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID         = 0;
     58
     59        reg_PC_NEXT_NEXT_VAL                            = 0;
     60        reg_PC_NEXT_NEXT                                = 0;// not necessary
     61        reg_PC_NEXT_NEXT_IS_DS_TAKE                     = 0;// not necessary
    4762      }
    4863    else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/include/Types.h

    r101 r128  
    4747  public : ~ifetch_queue_entry_t (void)
    4848    {
    49       delete _instruction       ;
    50       delete _instruction_enable;
     49      delete [] _instruction       ;
     50      delete [] _instruction_enable;
    5151    }
    52 
    53 //   public : friend std::ostream& operator<< (std::ostream& output,
    54 //                                          ifetch_queue_entry_t & x)
    55 //     {
    56 //       output << ;
    57 //       return output;
    58 //     }
    59 
    6052  };
    6153
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_transition.cpp

    r119 r128  
    3131
    3232        for (uint32_t i=0; i<_param->_size_queue; i++)
    33           _queue [i]->_state = IFETCH_QUEUE_STATE_EMPTY;
     33          {
     34            _queue [i]->_state = IFETCH_QUEUE_STATE_EMPTY;
     35            _queue [i]->_address                     = 0; // not necessary
     36            _queue [i]->_inst_ifetch_ptr             = 0; // not necessary
     37            _queue [i]->_branch_state                = 0; // not necessary
     38            _queue [i]->_branch_update_prediction_id = 0; // not necessary
     39            _queue [i]->_exception                   = 0; // not necessary
     40
     41            for (uint32_t j=0; j<_param->_nb_instruction; j++)
     42              {
     43            _queue [i]->_instruction             [j] = 0; // not necessary
     44            _queue [i]->_instruction_enable      [j] = 0; // not necessary
     45              }
     46          }
    3447      }
    3548    else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit_deallocation.cpp

    r123 r128  
    6060        DELETE0_SIGNAL(out_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_size_depth);
    6161        DELETE0_SIGNAL(out_DECOD_EXCEPTION                  ,_param->_size_exception_ifetch);
    62         DELETE1_SIGNAL(out_DECOD_VAL                        ,1,_param->_nb_instruction);
    63         DELETE1_SIGNAL( in_DECOD_ACK                        ,1,_param->_nb_instruction);
     62        DELETE1_SIGNAL(out_DECOD_VAL                        ,_param->_nb_instruction,1);
     63        DELETE1_SIGNAL( in_DECOD_ACK                        ,_param->_nb_instruction,1);
    6464        DELETE1_SIGNAL(out_DECOD_INSTRUCTION                ,_param->_nb_instruction,_param->_size_instruction);
    6565
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/include/Branch_Target_Buffer_Glue.h

    r82 r128  
    8282  public    : SC_IN (Tcontrol_t         ) ***  in_PREDICT_REGISTER_IS_ACCURATE   ; //[nb_inst_predict][associativity]
    8383
    84   public    : SC_IN (Tptr_t             )  **  in_PREDICT_SORT_VAL               ; //[nb_inst_predict]
     84  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_SORT_VAL               ; //[nb_inst_predict]
    8585  public    : SC_IN (Tptr_t             )  **  in_PREDICT_SORT_INDEX             ; //[nb_inst_predict]
    8686
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_allocation.cpp

    r112 r128  
    7474        if (_param->_have_port_victim)
    7575          {
    76         ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_VAL  ,"sort_val"  ,Tptr_t,1);
    77         ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_INDEX,"sort_index",Tptr_t,_param->_size_victim);
     76        ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_VAL      , "sort_val"      ,Tcontrol_t         ,1);
     77        ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_INDEX    , "sort_index"    ,Tptr_t             ,_param->_size_victim);
    7878
    7979        ALLOC1_SIGNAL_OUT(out_PREDICT_VICTIM_VAL    , "victim_val"    ,Tcontrol_t         , 1);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_predict.cpp

    r123 r128  
    3838        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * val          : %d",val         );
    3939        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * register_ack : %d",register_ack);
     40        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * port_victim  : %d",_param->_have_port_victim);
    4041        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * sort_val     : %d",sort_val    );
    4142        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * victim_ack   : %d",victim_ack  );
     
    5152
    5253        // Multiplexor
     54
    5355        PORT_WRITE(out_PREDICT_HIT          [i],hit);
    5456        PORT_WRITE(out_PREDICT_ADDRESS_SRC  [i],address_src);
     
    6466                                                    victim_ack
    6567                                                    ));
     68
    6669        PORT_WRITE(out_PREDICT_REGISTER_VAL   [i], (
    6770                                                    val          and
     
    8487        PORT_WRITE(out_PREDICT_VICTIM_INDEX   [i], index);
    8588          }
     89
    8690      }
    8791      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_transition.cpp

    r107 r128  
    2929        for (uint32_t i=0; i<_param->_size_bank; i++)
    3030          for (uint32_t j=0; j<_param->_associativity; j++)
    31             reg_BTB [i][j]._val = false;
     31            {
     32              reg_BTB [i][j]._val              = false;
     33              reg_BTB [i][j]._context          = 0; // not necessary
     34              reg_BTB [i][j]._address_dest_val = 0; // not necessary
     35              reg_BTB [i][j]._address_src      = 0; // not necessary
     36              reg_BTB [i][j]._address_dest     = 0; // not necessary
     37              reg_BTB [i][j]._condition        = 0; // not necessary
     38              reg_BTB [i][j]._last_take        = 0; // not necessary
     39              reg_BTB [i][j]._accurate         = 0; // not necessary
     40            }
    3241      }
    3342    else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_deallocation.cpp

    r115 r128  
    6464      {
    6565        for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
    66           delete _component_sort [i];
     66        delete    _component_sort [i];
    6767        delete [] _component_sort;
    68         delete _component_victim;
     68        delete    _component_victim;
    6969      }
    7070    delete _component_branch_target_buffer_glue;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_statistics_allocation.cpp

    r88 r128  
    3535      }
    3636
    37 //     _stat->add_stat(_component_branch_target_buffer_glue    ->_stat);
     37    _stat->add_stat(_component_branch_target_buffer_glue    ->_stat);
    3838    _stat->add_stat(_component_branch_target_buffer_register->_stat);
    3939
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Parameters.cpp

    r111 r128  
    8080  {
    8181    log_begin(Meta_Predictor_Glue,FUNCTION);
     82
     83    DELETE1(_predictor_history_mask     ,_nb_predictor);
     84    DELETE1(_predictor_history_shift_msb,_nb_predictor);
     85    DELETE1(_predictor_history_shift    ,_nb_predictor);
     86
    8287    log_end(Meta_Predictor_Glue,FUNCTION);
    8388  };
     
    8893  {
    8994    log_begin(Meta_Predictor_Glue,FUNCTION);
    90 
    91     DELETE1(_predictor_history_mask ,_nb_predictor);
    92     DELETE1(_predictor_history_shift,_nb_predictor);
    93 
    9495    log_end(Meta_Predictor_Glue,FUNCTION);
    9596  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Meta_Predictor_deallocation.cpp

    r112 r128  
    4545    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    4646
    47     DELETE0(_component_glue);
    48     DELETE1(_component_two_level_branch_predictor,_param->_nb_predictor);
     47    delete    _component_glue;
     48    for (uint32_t i=0; i<_param->_nb_predictor; ++i)
     49    delete    _component_two_level_branch_predictor [i];
     50    delete [] _component_two_level_branch_predictor;
    4951
    5052    delete _component;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Meta_Predictor_statistics_allocation.cpp

    r110 r128  
    2828                      "Meta_Predictor",
    2929                      param_statistics);
     30
     31    for (uint32_t i=0; i<_param->_nb_predictor; ++i)
     32    _stat->add_stat(_component_two_level_branch_predictor [i]->_stat);
     33    _stat->add_stat(_component_glue                          ->_stat);
    3034   
    3135    log_end(Meta_Predictor,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Parameters.cpp

    r112 r128  
    122122    log_begin(Meta_Predictor,FUNCTION);
    123123
    124     DELETE1(_param_two_level_branch_predictor, _nb_predictor);
     124    delete    _param_glue;
     125    for (uint32_t i=0; i<_nb_predictor; ++i)
     126    delete    _param_two_level_branch_predictor [i];
     127    delete [] _param_two_level_branch_predictor;
    125128
    126129    DELETE1(_predictor_size_history          , _nb_predictor);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_statistics_allocation.cpp

    r81 r128  
    2828                      param_statistics);
    2929
    30     _stat->add_stat(_component_glue->_stat);
     30    if (_param->_have_component_meta_predictor)
     31    _stat->add_stat(_component_meta_predictor->_stat);
     32    _stat->add_stat(_component_glue          ->_stat);
    3133   
    3234    log_printf(FUNC,Direction,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_transition.cpp

    r111 r128  
    3737//          reg_PREDICT_BOTTOM [i] = 0;
    3838            reg_PREDICT_NB_ELT [i] = 0;
     39
     40            for (uint32_t j=0; j<_param->_size_queue [i]; ++j)
     41            reg_stack [i][j]._address = 0; // not necessary
    3942          }
    4043      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters.cpp

    r122 r128  
    6363    for (uint32_t i=0; i<_nb_thread; i++)
    6464      _have_thread[i] = false;
    65     for (uint32_t i=0; i<_nb_context; i++)
     65    for (uint32_t i=0; i<_nb_thread; i++)
    6666      _have_thread[_translate_num_context_to_num_thread [i]] = true;
    6767
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp

    r122 r128  
    172172
    173173#if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true)
    174     for (uint32_t i=0; i<_param->_nb_thread; ++i)
    175       if (_param->_have_thread [i])
    176         {
    177           branchement_log_file [i].close();
    178         }
     174    {
     175      for (uint32_t i=0; i<_param->_nb_thread; ++i)
     176        if (_param->_have_thread [i])
     177          {
     178            branchement_log_file [i].close();
     179          }
     180      delete [] branchement_log_file;
     181    }
    179182#endif
    180183
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_statistics_deallocation.cpp

    r97 r128  
    2929    delete    _stat;
    3030
    31     DELETE2(_stat_nb_branch_hit            ,_param->_nb_context,MAX_BRANCH_CONDITION);
    32     DELETE2(_stat_nb_branch_miss           ,_param->_nb_context,MAX_BRANCH_CONDITION);
    33     DELETE1(_stat_nb_branch_unused         ,_param->_nb_context);
    34     DELETE1(_stat_ufpt_queue_nb_elt        ,_param->_nb_context);
    35     DELETE1(_stat_upt_queue_nb_elt         ,_param->_nb_context);
     31    DELETE2(_stat_nb_branch_hit              ,_param->_nb_context,MAX_BRANCH_CONDITION);
     32    DELETE2(_stat_nb_branch_miss             ,_param->_nb_context,MAX_BRANCH_CONDITION);
     33    DELETE1(_stat_nb_branch_unused           ,_param->_nb_context);
     34
     35    DELETE1(_stat_nb_branch_ifetch_prediction,_param->_nb_context);
     36    DELETE1(_stat_nb_branch_accurate         ,_param->_nb_context);
     37
     38    DELETE1(_stat_ufpt_queue_nb_elt          ,_param->_nb_context);
     39    DELETE1(_stat_upt_queue_nb_elt           ,_param->_nb_context);
    3640   
    3741    log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp

    r124 r128  
    3434          {
    3535            for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; ++j)
    36               reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state = UPDATE_FETCH_PREDICTION_STATE_EMPTY;
     36              {
     37            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state            = UPDATE_FETCH_PREDICTION_STATE_EMPTY;
     38            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._condition        = 0; // not necessary
     39            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._address_src      = 0; // not necessary
     40            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._address_dest     = 0; // not necessary
     41            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._last_take        = 0; // not necessary
     42            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._is_accurate      = 0; // not necessary
     43            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._history          = 0; // not necessary
     44            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._address_ras      = 0; // not necessary
     45            reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._index_ras        = 0; // not necessary
     46              }
    3747            reg_UFPT_BOTTOM          [i] = 0;
    3848            reg_UFPT_TOP             [i] = 0;
     
    4252                                                               
    4353            for (uint32_t j=0; j<_param->_size_upt_queue[i]; ++j)
    44               reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EMPTY;
     54              {
     55            reg_UPDATE_PREDICTION_TABLE [i][j]._state            = UPDATE_PREDICTION_STATE_EMPTY;
     56            reg_UPDATE_PREDICTION_TABLE [i][j]._condition        = 0; // not necessary
     57            reg_UPDATE_PREDICTION_TABLE [i][j]._address_src      = 0; // not necessary
     58            reg_UPDATE_PREDICTION_TABLE [i][j]._address_dest     = 0; // not necessary
     59            reg_UPDATE_PREDICTION_TABLE [i][j]._last_take        = 0; // not necessary
     60            reg_UPDATE_PREDICTION_TABLE [i][j]._good_take        = 0; // not necessary
     61            reg_UPDATE_PREDICTION_TABLE [i][j]._is_accurate      = 0; // not necessary
     62            reg_UPDATE_PREDICTION_TABLE [i][j]._history          = 0; // not necessary
     63            reg_UPDATE_PREDICTION_TABLE [i][j]._address_ras      = 0; // not necessary
     64            reg_UPDATE_PREDICTION_TABLE [i][j]._index_ras        = 0; // not necessary
     65            reg_UPDATE_PREDICTION_TABLE [i][j]._ifetch_prediction= 0; // not necessary
     66            reg_UPDATE_PREDICTION_TABLE [i][j]._miss_commit      = 0; // not necessary
     67            reg_UPDATE_PREDICTION_TABLE [i][j]._retire_ok        = 0; // not necessary
     68            reg_UPDATE_PREDICTION_TABLE [i][j]._miss_prediction  = 0; // not necessary
     69              }
    4570            reg_UPT_BOTTOM           [i] = 0;
    4671            reg_UPT_TOP              [i] = 0;
     
    5479            reg_UPT_EVENT_STATE      [i] = UPT_EVENT_STATE_OK;
    5580
    56 //             reg_EVENT_VAL            [i] = false;
    57 //             reg_EVENT_STATE          [i] = EVENT_STATE_OK;
    58 //             reg_EVENT_IS_BRANCH      [i] = true;
     81            reg_EVENT_UPT_PTR          [i] = 0; // not necessary
     82            reg_EVENT_UPT_FULL         [i] = 0; // not necessary
     83
     84//          reg_EVENT_STATE            [i] = EVENT_STATE_OK; // not necessary
     85//          reg_EVENT_IS_BRANCH        [i] = true          ; // not necessary
     86
     87            reg_EVENT_DEPTH            [i] = 0; // not necessary
     88            reg_EVENT_ADDRESS_SRC      [i] = 0; // not necessary
     89            reg_EVENT_ADDRESS_DEST_VAL [i] = 0; // not necessary
     90            reg_EVENT_ADDRESS_DEST     [i] = 0; // not necessary
     91            reg_EVENT_CAN_CONTINUE     [i] = 0; // not necessary
     92
    5993          }
    6094      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp

    r119 r128  
    6666        DELETE1_SIGNAL( in_BRANCH_EVENT_ACK              ,_param->_nb_context,1);
    6767//      DELETE1_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID       ,_param->_nb_context,_param->_size_context_id);
    68 //      DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH            ,_param->_nb_context,_param->_size_depth);
     68        DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH            ,_param->_nb_context,_param->_size_depth);
    6969//      DELETE1_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION  ,_param->_nb_context,1);
    7070        DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC      ,_param->_nb_context,_param->_size_instruction_address);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/src/main.cpp

    r111 r128  
    223223     
    224224      test (name,param);
     225
     226      delete param;
    225227    }
    226228  catch (morpheo::ErrorMorpheo & error)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/src/test.cpp

    r108 r128  
    4747  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    4848  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     49
     50  sc_signal<Tcontrol_t           >  ** out_ICACHE_REQ_VAL                 ;
     51  sc_signal<Tcontrol_t           >  **  in_ICACHE_REQ_ACK                 ;
     52//sc_signal<Tcontext_t           >  ** out_ICACHE_REQ_THREAD_ID           ;
     53  sc_signal<Tpacket_t            >  ** out_ICACHE_REQ_PACKET_ID           ;
     54  sc_signal<Ticache_instruction_t>  ** out_ICACHE_REQ_ADDRESS             ;
     55  sc_signal<Ticache_type_t       >  ** out_ICACHE_REQ_TYPE                ;
     56  sc_signal<Tcontrol_t           >  **  in_ICACHE_RSP_VAL                 ;
     57  sc_signal<Tcontrol_t           >  ** out_ICACHE_RSP_ACK                 ;
     58//sc_signal<Tcontext_t           >  **  in_ICACHE_RSP_THREAD_ID           ;
     59  sc_signal<Tpacket_t            >  **  in_ICACHE_RSP_PACKET_ID           ;
     60  sc_signal<Ticache_instruction_t> ***  in_ICACHE_RSP_INSTRUCTION         ;
     61  sc_signal<Ticache_error_t      >  **  in_ICACHE_RSP_ERROR               ;
     62  sc_signal<Tcontrol_t           >  ** out_DECOD_VAL                      ;
     63  sc_signal<Tcontrol_t           >  **  in_DECOD_ACK                      ;
     64  sc_signal<Tcontext_t           >  ** out_DECOD_CONTEXT_ID               ;
     65  sc_signal<Tdepth_t             >  ** out_DECOD_DEPTH                    ;
     66  sc_signal<Ttype_t              >  ** out_DECOD_TYPE                     ;
     67  sc_signal<Toperation_t         >  ** out_DECOD_OPERATION                ;
     68  sc_signal<Tcontrol_t           >  ** out_DECOD_NO_EXECUTE               ;
     69  sc_signal<Tcontrol_t           >  ** out_DECOD_IS_DELAY_SLOT            ;
     70  sc_signal<Tgeneral_data_t      >  ** out_DECOD_ADDRESS                  ;
     71  sc_signal<Tgeneral_data_t      >  ** out_DECOD_ADDRESS_NEXT             ;
     72  sc_signal<Tcontrol_t           >  ** out_DECOD_HAS_IMMEDIAT             ;
     73  sc_signal<Tgeneral_data_t      >  ** out_DECOD_IMMEDIAT                 ;
     74  sc_signal<Tcontrol_t           >  ** out_DECOD_READ_RA                  ;
     75  sc_signal<Tgeneral_address_t   >  ** out_DECOD_NUM_REG_RA               ;
     76  sc_signal<Tcontrol_t           >  ** out_DECOD_READ_RB                  ;
     77  sc_signal<Tgeneral_address_t   >  ** out_DECOD_NUM_REG_RB               ;
     78  sc_signal<Tcontrol_t           >  ** out_DECOD_READ_RC                  ;
     79  sc_signal<Tspecial_address_t   >  ** out_DECOD_NUM_REG_RC               ;
     80  sc_signal<Tcontrol_t           >  ** out_DECOD_WRITE_RD                 ;
     81  sc_signal<Tgeneral_address_t   >  ** out_DECOD_NUM_REG_RD               ;
     82  sc_signal<Tcontrol_t           >  ** out_DECOD_WRITE_RE                 ;
     83  sc_signal<Tspecial_address_t   >  ** out_DECOD_NUM_REG_RE               ;
     84  sc_signal<Texception_t         >  ** out_DECOD_EXCEPTION_USE            ;
     85  sc_signal<Texception_t         >  ** out_DECOD_EXCEPTION                ;
     86  sc_signal<Tcontrol_t           >  **  in_BRANCH_COMPLETE_VAL            ;
     87  sc_signal<Tcontrol_t           >  ** out_BRANCH_COMPLETE_ACK            ;
     88  sc_signal<Tcontext_t           >  **  in_BRANCH_COMPLETE_CONTEXT_ID     ;
     89  sc_signal<Tdepth_t             >  **  in_BRANCH_COMPLETE_DEPTH          ;
     90  sc_signal<Taddress_t           >  **  in_BRANCH_COMPLETE_ADDRESS        ;
     91  sc_signal<Tcontrol_t           >  **  in_BRANCH_COMPLETE_NO_SEQUENCE    ;
     92  sc_signal<Tcontrol_t           >  ** out_BRANCH_COMPLETE_MISS_PREDICTION;
     93  sc_signal<Tcontrol_t           >   *  in_COMMIT_EVENT_VAL               ;
     94  sc_signal<Tcontrol_t           >   * out_COMMIT_EVENT_ACK               ;
     95  sc_signal<Tcontext_t           >   *  in_COMMIT_EVENT_CONTEXT_ID        ;
     96  sc_signal<Tdepth_t             >   *  in_COMMIT_EVENT_DEPTH             ;
     97  sc_signal<Tevent_type_t        >   *  in_COMMIT_EVENT_TYPE              ;
     98  sc_signal<Tcontrol_t           >   *  in_COMMIT_EVENT_IS_DELAY_SLOT     ;
     99  sc_signal<Taddress_t           >   *  in_COMMIT_EVENT_ADDRESS           ;
     100  sc_signal<Tcontrol_t           >   *  in_COMMIT_EVENT_ADDRESS_EPCR_VAL  ;
     101  sc_signal<Taddress_t           >   *  in_COMMIT_EVENT_ADDRESS_EPCR      ;
     102  sc_signal<Tcontrol_t           >   *  in_COMMIT_EVENT_ADDRESS_EEAR_VAL  ;
     103  sc_signal<Tgeneral_data_t      >   *  in_COMMIT_EVENT_ADDRESS_EEAR      ;
     104  sc_signal<Tcontrol_t           >  ** out_EVENT_VAL                      ;
     105  sc_signal<Tcontrol_t           >  **  in_EVENT_ACK                      ;
     106  sc_signal<Taddress_t           >  ** out_EVENT_ADDRESS                  ;
     107  sc_signal<Taddress_t           >  ** out_EVENT_ADDRESS_NEXT             ;
     108  sc_signal<Tcontrol_t           >  ** out_EVENT_ADDRESS_NEXT_VAL         ;
     109  sc_signal<Tcontrol_t           >  ** out_EVENT_IS_DS_TAKE               ;
     110  sc_signal<Tcontrol_t           >  ** out_SPR_EVENT_VAL                  ;
     111  sc_signal<Tcontrol_t           >  **  in_SPR_EVENT_ACK                  ;
     112  sc_signal<Tspr_t               >  ** out_SPR_EVENT_EPCR                 ;
     113  sc_signal<Tcontrol_t           >  ** out_SPR_EVENT_EEAR_WEN             ;
     114  sc_signal<Tspr_t               >  ** out_SPR_EVENT_EEAR                 ;
     115  sc_signal<Tcontrol_t           >  ** out_SPR_EVENT_SR_DSX               ;
     116  sc_signal<Tcontrol_t           >  ** out_SPR_EVENT_SR_TO_ESR            ;
     117  sc_signal<Tcounter_t           >  **  in_NB_INST_COMMIT_ALL             ;
     118  sc_signal<Tcounter_t           >  **  in_NB_INST_COMMIT_MEM             ;
     119  sc_signal<Tcounter_t           >  ** out_NB_INST_DECOD_ALL              ;
     120  sc_signal<Tdepth_t             >  ** out_DEPTH_MIN                      ;
     121  sc_signal<Tdepth_t             >  ** out_DEPTH_MAX                      ;
     122  sc_signal<Tcontrol_t           >  ** out_DEPTH_FULL                     ;
     123  sc_signal<Tcontrol_t           >  **  in_SPR_SR_IEE                     ;
     124  sc_signal<Tcontrol_t           >  **  in_SPR_SR_EPH                     ;
     125  sc_signal<Tcontrol_t           >  **  in_INTERRUPT_ENABLE               ;
    49126
    50127  ALLOC1_SC_SIGNAL(out_ICACHE_REQ_VAL                 ,"out_ICACHE_REQ_VAL                 ",Tcontrol_t           ,_param->_nb_context);
     
    68145  ALLOC1_SC_SIGNAL(out_DECOD_NO_EXECUTE               ,"out_DECOD_NO_EXECUTE               ",Tcontrol_t           ,_param->_sum_inst_decod);
    69146  ALLOC1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT            ,"out_DECOD_IS_DELAY_SLOT            ",Tcontrol_t           ,_param->_sum_inst_decod);
    70 #ifdef DEBUG
    71147  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS                  ,"out_DECOD_ADDRESS                  ",Tgeneral_data_t      ,_param->_sum_inst_decod);
    72 #endif
    73148  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT             ,"out_DECOD_ADDRESS_NEXT             ",Tgeneral_data_t      ,_param->_sum_inst_decod);
    74149  ALLOC1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT             ,"out_DECOD_HAS_IMMEDIAT             ",Tcontrol_t           ,_param->_sum_inst_decod);
     
    325400  DELETE1_SC_SIGNAL(out_DECOD_NO_EXECUTE               ,_param->_sum_inst_decod);
    326401  DELETE1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT            ,_param->_sum_inst_decod);
    327 #ifdef DEBUG
    328402  DELETE1_SC_SIGNAL(out_DECOD_ADDRESS                  ,_param->_sum_inst_decod);
    329 #endif
    330403  DELETE1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT             ,_param->_sum_inst_decod);
    331404  DELETE1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT             ,_param->_sum_inst_decod);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_deallocation.cpp

    r123 r128  
    109109        DELETE1_SIGNAL(out_NB_INST_DECOD_ALL                ,_param->_nb_context,_param->_size_nb_inst_decod);
    110110
    111         DELETE1_SIGNAL(out_DEPTH_MIN                        ,_param->_nb_context,_param->_size_depth  );
    112         DELETE1_SIGNAL(out_DEPTH_MAX                        ,_param->_nb_context,_param->_size_depth+1);
    113         DELETE1_SIGNAL(out_DEPTH_FULL                       ,_param->_nb_context,_param->_size_depth+1);
     111        DELETE1_SIGNAL(out_DEPTH_MIN                        ,_param->_nb_context,_param->_size_depth);
     112        DELETE1_SIGNAL(out_DEPTH_MAX                        ,_param->_nb_context,_param->_size_depth);
     113        DELETE1_SIGNAL(out_DEPTH_FULL                       ,_param->_nb_context,1);
    114114
    115115        DELETE1_SIGNAL( in_SPR_SR_IEE                       ,_param->_nb_context,1);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Parameters.cpp

    r122 r128  
    77
    88#include "Behavioural/Core/Multi_Front_end/Front_end/include/Parameters.h"
     9#include "Behavioural/include/Allocation.h"
    910#include "Common/include/Max.h"
    1011
     
    110111    uint32_t size_instruction_address   = size_general_data - 2;
    111112
    112     _array_size_depth                   = new uint32_t [_nb_context];
     113    ALLOC1(_array_size_depth            ,uint32_t,_nb_context);
    113114    for (uint32_t i=0; i<_nb_context; i++)
    114115      _array_size_depth [i] = log2(_upt_size_queue[i]);
    115116   
    116     _array_size_nb_inst_decod = new uint32_t [_nb_decod_unit];
     117    ALLOC1(_array_size_nb_inst_decod    ,uint32_t,_nb_decod_unit);
    117118    for (uint32_t i=0; i<_nb_decod_unit; i++)
    118119      _array_size_nb_inst_decod [i] = log2(_size_decod_queue[i]+1);
     
    159160       );
    160161
    161     _translate_context_id_from_decod_unit= new std::vector<uint32_t> [_nb_decod_unit];
     162    ALLOC1(_translate_context_id_from_decod_unit,std::vector<uint32_t>,_nb_decod_unit);
    162163
    163164    for (uint32_t i=0; i<_nb_context; ++i)
    164165      _translate_context_id_from_decod_unit [_link_context_to_decod_unit[i]].push_back(i);
    165166
    166     _decod_unit_nb_context               = new uint32_t    [_nb_decod_unit];
    167     _decod_unit_nb_inst_fetch            = new uint32_t *  [_nb_decod_unit];
    168     _decod_unit_nb_branch_speculated     = new uint32_t *  [_nb_decod_unit];
    169 //     _decod_unit_depth                    = new uint32_t *  [_nb_decod_unit];
    170     _decod_unit_instruction_implemeted   = new bool     ** [_nb_decod_unit];
    171 //     _have_port_decod_unit_context_id     = new bool        [_nb_decod_unit];
     167    ALLOC1(_decod_unit_nb_context            ,uint32_t,_nb_decod_unit);
     168    ALLOC2(_decod_unit_nb_inst_fetch         ,uint32_t,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size());
     169    ALLOC2(_decod_unit_nb_branch_speculated  ,uint32_t,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size());
     170//  ALLOC2(_decod_unit_depth                 ,uint32_t,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size());
     171    ALLOC3(_decod_unit_instruction_implemeted,bool    ,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size(),NB_INSTRUCTION);
     172//  ALLOC2(_have_port_decod_unit_context_id  ,bool    ,_nb_decod_unit);
    172173    _sum_inst_decod                      = 0;
    173174   
     
    179180
    180181        _decod_unit_nb_context             [i] = size;
    181         _decod_unit_nb_inst_fetch          [i] = new uint32_t   [size];
    182 //         _decod_unit_depth                  [i] = new uint32_t   [size];
    183         _decod_unit_nb_branch_speculated   [i] = new uint32_t   [size];
    184         _decod_unit_instruction_implemeted [i] = new bool     * [size];
    185 //         _have_port_decod_unit_context_id   [i] = size > 0;
     182//      _have_port_decod_unit_context_id   [i] = size > 0;
    186183
    187184        for (uint32_t j=0; j<size; ++j)
     
    191188            _decod_unit_nb_inst_fetch          [i][j] = _nb_inst_fetch  [x];
    192189            _decod_unit_nb_branch_speculated   [i][j] = _upt_size_queue [x];
    193 //             _decod_unit_depth                  [i][j] = log2(_upt_size_queue[x]);
    194             _decod_unit_instruction_implemeted [i][j] = new bool [NB_INSTRUCTION];
     190//          _decod_unit_depth                  [i][j] = log2(_upt_size_queue[x]);
    195191
    196192            for (uint32_t k=0; k<NB_INSTRUCTION; ++k)
     
    302298    delete [] _param_ifetch_unit    ;
    303299
    304 //     delete [] _size_ifetch_queue_ptr;
    305 //     delete [] _size_nb_inst_decod;
    306     delete [] _array_size_depth;
    307     for (uint32_t i=0; i<_nb_context; ++i)
    308       {
    309         for (uint32_t j=0; j<_translate_context_id_from_decod_unit [i].size(); ++j)
    310           delete [] _decod_unit_instruction_implemeted [i][j];
    311 
    312         delete [] _decod_unit_nb_inst_fetch          [i];
    313 //         delete [] _decod_unit_depth                  [i];
    314         delete [] _decod_unit_nb_branch_speculated   [i];
    315         delete [] _decod_unit_instruction_implemeted [i];
    316       }
    317     delete [] _decod_unit_nb_inst_fetch         ;
    318 //     delete [] _decod_unit_depth                 ;
    319     delete [] _decod_unit_nb_branch_speculated  ;
    320     delete [] _decod_unit_instruction_implemeted;
    321 
    322 //     delete [] _have_port_decod_unit_context_id;
    323     delete [] _decod_unit_nb_context               ;
    324     delete [] _translate_context_id_from_decod_unit;
     300//  DELETE2(_have_port_decod_unit_context_id     ,_nb_decod_unit);
     301    DELETE3(_decod_unit_instruction_implemeted   ,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size(),NB_INSTRUCTION);
     302//  DELETE2(_decod_unit_depth                    ,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size());
     303    DELETE2(_decod_unit_nb_branch_speculated     ,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size());
     304    DELETE2(_decod_unit_nb_inst_fetch            ,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size());
     305    DELETE1(_decod_unit_nb_context               ,_nb_decod_unit);
     306
     307    DELETE1(_translate_context_id_from_decod_unit,_nb_decod_unit);
     308    DELETE1(_array_size_nb_inst_decod            ,_nb_decod_unit);
     309    DELETE1(_array_size_depth                    ,_nb_context);
    325310
    326311    log_end(Front_end,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/src/main.cpp

    r110 r128  
    142142     
    143143      test (name,param);
     144
     145      delete param;
    144146    }
    145147  catch (morpheo::ErrorMorpheo & error)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/src/test.cpp

    r121 r128  
    2929#endif
    3030
    31   simulation_init(0,0);
     31  simulation_init(0,0,0,false,false);
    3232
    3333  debug_idle_cycle = CYCLE_MAX;
     
    6262  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    6363
     64  sc_signal<Tcontrol_t        > ***  in_INSERT_VAL                     ;
     65  sc_signal<Tcontrol_t        > *** out_INSERT_ACK                     ;
     66  sc_signal<Tcontext_t        > ***  in_INSERT_FRONT_END_ID            ;
     67  sc_signal<Tcontext_t        > ***  in_INSERT_CONTEXT_ID              ;
     68  sc_signal<Tpacket_t         > *** out_INSERT_PACKET_ID               ;
     69//sc_signal<Tcontext_t        > ***  in_INSERT_RENAME_UNIT_ID          ;
     70  sc_signal<Tdepth_t          > ***  in_INSERT_DEPTH                   ;
     71  sc_signal<Ttype_t           > ***  in_INSERT_TYPE                    ;
     72  sc_signal<Toperation_t      > ***  in_INSERT_OPERATION               ;
     73  sc_signal<Tcontrol_t        > ***  in_INSERT_NO_EXECUTE              ;
     74  sc_signal<Tcontrol_t        > ***  in_INSERT_LAST_EVENT              ;
     75  sc_signal<Tcontrol_t        > ***  in_INSERT_IS_DELAY_SLOT           ;
     76  sc_signal<Taddress_t        > ***  in_INSERT_ADDRESS                 ;
     77  sc_signal<Taddress_t        > ***  in_INSERT_ADDRESS_NEXT            ;
     78  sc_signal<Texception_t      > ***  in_INSERT_EXCEPTION               ;
     79  sc_signal<Texception_t      > ***  in_INSERT_EXCEPTION_USE           ;
     80  sc_signal<Tlsq_ptr_t        > ***  in_INSERT_STORE_QUEUE_PTR_WRITE   ;
     81  sc_signal<Tlsq_ptr_t        > ***  in_INSERT_LOAD_QUEUE_PTR_WRITE    ;
     82  sc_signal<Tcontrol_t        > ***  in_INSERT_READ_RA                 ;
     83  sc_signal<Tgeneral_address_t> ***  in_INSERT_NUM_REG_RA_LOG          ;
     84  sc_signal<Tgeneral_address_t> ***  in_INSERT_NUM_REG_RA_PHY          ;
     85  sc_signal<Tcontrol_t        > ***  in_INSERT_READ_RB                 ;
     86  sc_signal<Tgeneral_address_t> ***  in_INSERT_NUM_REG_RB_LOG          ;
     87  sc_signal<Tgeneral_address_t> ***  in_INSERT_NUM_REG_RB_PHY          ;
     88  sc_signal<Tcontrol_t        > ***  in_INSERT_READ_RC                 ;
     89  sc_signal<Tspecial_address_t> ***  in_INSERT_NUM_REG_RC_LOG          ;
     90  sc_signal<Tspecial_address_t> ***  in_INSERT_NUM_REG_RC_PHY          ;
     91  sc_signal<Tcontrol_t        > ***  in_INSERT_WRITE_RD                ;
     92  sc_signal<Tgeneral_address_t> ***  in_INSERT_NUM_REG_RD_LOG          ;
     93  sc_signal<Tgeneral_address_t> ***  in_INSERT_NUM_REG_RD_PHY_OLD      ;
     94  sc_signal<Tgeneral_address_t> ***  in_INSERT_NUM_REG_RD_PHY_NEW      ;
     95  sc_signal<Tcontrol_t        > ***  in_INSERT_WRITE_RE                ;
     96  sc_signal<Tspecial_address_t> ***  in_INSERT_NUM_REG_RE_LOG          ;
     97  sc_signal<Tspecial_address_t> ***  in_INSERT_NUM_REG_RE_PHY_OLD      ;
     98  sc_signal<Tspecial_address_t> ***  in_INSERT_NUM_REG_RE_PHY_NEW      ;
     99
     100  sc_signal<Tcontrol_t        > *** out_RETIRE_VAL                     ;
     101  sc_signal<Tcontrol_t        > ***  in_RETIRE_ACK                     ;
     102  sc_signal<Tcontext_t        > *** out_RETIRE_FRONT_END_ID            ;
     103  sc_signal<Tcontext_t        > *** out_RETIRE_CONTEXT_ID              ;
     104//sc_signal<Tcontext_t        > *** out_RETIRE_RENAME_UNIT_ID          ;
     105  sc_signal<Tcontrol_t        > *** out_RETIRE_USE_STORE_QUEUE         ;
     106  sc_signal<Tcontrol_t        > *** out_RETIRE_USE_LOAD_QUEUE          ;
     107  sc_signal<Tlsq_ptr_t        > *** out_RETIRE_STORE_QUEUE_PTR_WRITE   ;
     108  sc_signal<Tlsq_ptr_t        > *** out_RETIRE_LOAD_QUEUE_PTR_WRITE    ;
     109  sc_signal<Tcontrol_t        > *** out_RETIRE_READ_RA                 ;
     110  sc_signal<Tgeneral_address_t> *** out_RETIRE_NUM_REG_RA_PHY          ;
     111  sc_signal<Tcontrol_t        > *** out_RETIRE_READ_RB                 ;
     112  sc_signal<Tgeneral_address_t> *** out_RETIRE_NUM_REG_RB_PHY          ;
     113  sc_signal<Tcontrol_t        > *** out_RETIRE_READ_RC                 ;
     114  sc_signal<Tspecial_address_t> *** out_RETIRE_NUM_REG_RC_PHY          ;
     115  sc_signal<Tcontrol_t        > *** out_RETIRE_WRITE_RD                ;
     116  sc_signal<Tgeneral_address_t> *** out_RETIRE_NUM_REG_RD_LOG          ;
     117  sc_signal<Tgeneral_address_t> *** out_RETIRE_NUM_REG_RD_PHY_OLD      ;
     118  sc_signal<Tgeneral_address_t> *** out_RETIRE_NUM_REG_RD_PHY_NEW      ;
     119  sc_signal<Tcontrol_t        > *** out_RETIRE_WRITE_RE                ;
     120  sc_signal<Tspecial_address_t> *** out_RETIRE_NUM_REG_RE_LOG          ;
     121  sc_signal<Tspecial_address_t> *** out_RETIRE_NUM_REG_RE_PHY_OLD      ;
     122  sc_signal<Tspecial_address_t> *** out_RETIRE_NUM_REG_RE_PHY_NEW      ;
     123
     124  sc_signal<Tcontrol_t        > *** out_RETIRE_EVENT_VAL               ;
     125  sc_signal<Tcontrol_t        > ***  in_RETIRE_EVENT_ACK               ;
     126  sc_signal<Tevent_state_t    > *** out_RETIRE_EVENT_STATE             ;
     127  sc_signal<Tcontrol_t        > *** out_RETIRE_EVENT_STOP              ;
     128
     129  sc_signal<Tcontrol_t        >  **  in_COMMIT_VAL                     ;
     130  sc_signal<Tcontrol_t        >  ** out_COMMIT_ACK                     ;
     131  sc_signal<Tcontrol_t        >  **  in_COMMIT_WEN                     ;
     132  sc_signal<Tpacket_t         >  **  in_COMMIT_PACKET_ID               ;
     133//sc_signal<Toperation_t      >  **  in_COMMIT_OPERATION               ;
     134//sc_signal<Ttype_t           >  **  in_COMMIT_TYPE                    ;
     135  sc_signal<Tspecial_data_t   >  **  in_COMMIT_FLAGS                   ;
     136  sc_signal<Texception_t      >  **  in_COMMIT_EXCEPTION               ;
     137  sc_signal<Tcontrol_t        >  **  in_COMMIT_NO_SEQUENCE             ;
     138  sc_signal<Taddress_t        >  **  in_COMMIT_ADDRESS                 ;
     139  sc_signal<Tgeneral_address_t>  ** out_COMMIT_NUM_REG_RD              ;
     140
     141  sc_signal<Tcontrol_t        >  ** out_REEXECUTE_VAL                  ;
     142  sc_signal<Tcontrol_t        >  **  in_REEXECUTE_ACK                  ;
     143  sc_signal<Tcontext_t        >  ** out_REEXECUTE_CONTEXT_ID           ;
     144  sc_signal<Tcontext_t        >  ** out_REEXECUTE_FRONT_END_ID         ;
     145  sc_signal<Tpacket_t         >  ** out_REEXECUTE_PACKET_ID            ;
     146  sc_signal<Toperation_t      >  ** out_REEXECUTE_OPERATION            ;
     147  sc_signal<Ttype_t           >  ** out_REEXECUTE_TYPE                 ;
     148  sc_signal<Tlsq_ptr_t        >  ** out_REEXECUTE_STORE_QUEUE_PTR_WRITE;
     149
     150  sc_signal<Tcontrol_t        >  ** out_BRANCH_COMPLETE_VAL            ;
     151  sc_signal<Tcontrol_t        >  **  in_BRANCH_COMPLETE_ACK            ;
     152  sc_signal<Tcontext_t        >  ** out_BRANCH_COMPLETE_CONTEXT_ID     ;
     153  sc_signal<Tcontext_t        >  ** out_BRANCH_COMPLETE_FRONT_END_ID   ;
     154  sc_signal<Tdepth_t          >  ** out_BRANCH_COMPLETE_DEPTH          ;
     155  sc_signal<Taddress_t        >  ** out_BRANCH_COMPLETE_ADDRESS        ;
     156  sc_signal<Tcontrol_t        >  ** out_BRANCH_COMPLETE_NO_SEQUENCE    ;
     157  sc_signal<Tcontrol_t        >  **  in_BRANCH_COMPLETE_MISS_PREDICTION;
     158
     159  sc_signal<Tcontrol_t        >   * out_UPDATE_VAL                     ;
     160  sc_signal<Tcontrol_t        >   *  in_UPDATE_ACK                     ;
     161  sc_signal<Tcontext_t        >   * out_UPDATE_CONTEXT_ID              ;
     162  sc_signal<Tcontext_t        >   * out_UPDATE_FRONT_END_ID            ;
     163  sc_signal<Tdepth_t          >   * out_UPDATE_DEPTH                   ;
     164  sc_signal<Tevent_type_t     >   * out_UPDATE_TYPE                    ;
     165  sc_signal<Tcontrol_t        >   * out_UPDATE_IS_DELAY_SLOT           ;
     166  sc_signal<Taddress_t        >   * out_UPDATE_ADDRESS                 ;
     167  sc_signal<Tcontrol_t        >   * out_UPDATE_ADDRESS_EPCR_VAL        ;
     168  sc_signal<Taddress_t        >   * out_UPDATE_ADDRESS_EPCR            ;
     169  sc_signal<Tcontrol_t        >   * out_UPDATE_ADDRESS_EEAR_VAL        ;
     170  sc_signal<Tgeneral_data_t   >   * out_UPDATE_ADDRESS_EEAR            ;
     171
     172  sc_signal<Tcontrol_t        > ***  in_EVENT_VAL                      ;
     173  sc_signal<Tcontrol_t        > *** out_EVENT_ACK                      ;
     174  sc_signal<Taddress_t        > ***  in_EVENT_ADDRESS                  ;
     175  sc_signal<Taddress_t        > ***  in_EVENT_ADDRESS_NEXT             ;
     176  sc_signal<Tcontrol_t        > ***  in_EVENT_ADDRESS_NEXT_VAL         ;
     177  sc_signal<Tcontrol_t        > ***  in_EVENT_IS_DS_TAKE               ;
     178
     179  sc_signal<Tcounter_t        > *** out_NB_INST_COMMIT_ALL             ;
     180  sc_signal<Tcounter_t        > *** out_NB_INST_COMMIT_MEM             ;
     181  sc_signal<Tcounter_t        > ***  in_NB_INST_DECOD_ALL              ;
     182  sc_signal<Tdepth_t          > ***  in_DEPTH_MIN                      ;
     183  sc_signal<Tdepth_t          > ***  in_DEPTH_MAX                      ;
     184  sc_signal<Tcontrol_t        > ***  in_DEPTH_FULL                     ;
     185
     186  sc_signal<Tcontrol_t        > ***  in_SPR_READ_SR_OVE                ;
     187
     188  sc_signal<Tcontrol_t        > *** out_SPR_WRITE_VAL                  ;
     189  sc_signal<Tcontrol_t        > ***  in_SPR_WRITE_ACK                  ;
     190  sc_signal<Tcontrol_t        > *** out_SPR_WRITE_SR_F_VAL             ;
     191  sc_signal<Tcontrol_t        > *** out_SPR_WRITE_SR_F                 ;
     192  sc_signal<Tcontrol_t        > *** out_SPR_WRITE_SR_CY_VAL            ;
     193  sc_signal<Tcontrol_t        > *** out_SPR_WRITE_SR_CY                ;
     194  sc_signal<Tcontrol_t        > *** out_SPR_WRITE_SR_OV_VAL            ;
     195  sc_signal<Tcontrol_t        > *** out_SPR_WRITE_SR_OV                ;
     196
     197  sc_signal<bool              >   * out_INFO_ROB_EMPTY                 ;
     198
    64199  ALLOC2_SC_SIGNAL( in_INSERT_VAL                     ," in_INSERT_VAL                     ",Tcontrol_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    65200  ALLOC2_SC_SIGNAL(out_INSERT_ACK                     ,"out_INSERT_ACK                     ",Tcontrol_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    72207  ALLOC2_SC_SIGNAL( in_INSERT_OPERATION               ," in_INSERT_OPERATION               ",Toperation_t      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    73208  ALLOC2_SC_SIGNAL( in_INSERT_NO_EXECUTE              ," in_INSERT_NO_EXECUTE              ",Tcontrol_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     209  ALLOC2_SC_SIGNAL( in_INSERT_LAST_EVENT              ," in_INSERT_LAST_EVENT              ",Tcontrol_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    74210  ALLOC2_SC_SIGNAL( in_INSERT_IS_DELAY_SLOT           ," in_INSERT_IS_DELAY_SLOT           ",Tcontrol_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    75 #ifdef DEBUG
    76211  ALLOC2_SC_SIGNAL( in_INSERT_ADDRESS                 ," in_INSERT_ADDRESS                 ",Taddress_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    77 #endif
    78212  ALLOC2_SC_SIGNAL( in_INSERT_ADDRESS_NEXT            ," in_INSERT_ADDRESS_NEXT            ",Taddress_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    79213  ALLOC2_SC_SIGNAL( in_INSERT_EXCEPTION               ," in_INSERT_EXCEPTION               ",Texception_t      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    125259  ALLOC2_SC_SIGNAL( in_RETIRE_EVENT_ACK               ," in_RETIRE_EVENT_ACK               ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
    126260  ALLOC2_SC_SIGNAL(out_RETIRE_EVENT_STATE             ,"out_RETIRE_EVENT_STATE             ",Tevent_state_t    ,_param->_nb_front_end,_param->_nb_context[it1]);
     261  ALLOC2_SC_SIGNAL(out_RETIRE_EVENT_STOP              ,"out_RETIRE_EVENT_STOP              ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
    127262
    128263  ALLOC1_SC_SIGNAL( in_COMMIT_VAL                     ," in_COMMIT_VAL               ",Tcontrol_t        ,_param->_nb_inst_commit);
     
    137272  ALLOC1_SC_SIGNAL( in_COMMIT_ADDRESS                 ," in_COMMIT_ADDRESS           ",Taddress_t        ,_param->_nb_inst_commit);
    138273  ALLOC1_SC_SIGNAL(out_COMMIT_NUM_REG_RD              ,"out_COMMIT_NUM_REG_RD        ",Tgeneral_address_t,_param->_nb_inst_commit);
     274
    139275  ALLOC1_SC_SIGNAL(out_REEXECUTE_VAL                  ,"out_REEXECUTE_VAL                  ",Tcontrol_t        ,_param->_nb_inst_reexecute);
    140276  ALLOC1_SC_SIGNAL( in_REEXECUTE_ACK                  ," in_REEXECUTE_ACK                  ",Tcontrol_t        ,_param->_nb_inst_reexecute);
     
    191327  ALLOC2_SC_SIGNAL(out_SPR_WRITE_SR_OV                ,"out_SPR_WRITE_SR_OV                ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
    192328
     329  ALLOC0_SC_SIGNAL(out_INFO_ROB_EMPTY                 ,"out_INFO_ROB_EMPTY                 ",bool              );
     330
    193331  /********************************************************
    194332   * Instanciation
     
    215353  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_IS_DELAY_SLOT           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    216354  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_NO_EXECUTE              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     355  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_LAST_EVENT              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    217356#ifdef DEBUG
    218357  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_ADDRESS                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    272411  INSTANCE2_SC_SIGNAL(_Commit_unit, in_RETIRE_EVENT_ACK               ,_param->_nb_front_end,_param->_nb_context[it1]);
    273412  INSTANCE2_SC_SIGNAL(_Commit_unit,out_RETIRE_EVENT_STATE             ,_param->_nb_front_end,_param->_nb_context[it1]);
     413  INSTANCE2_SC_SIGNAL(_Commit_unit,out_RETIRE_EVENT_STOP              ,_param->_nb_front_end,_param->_nb_context[it1]);
    274414  INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_VAL                     ,_param->_nb_inst_commit);
    275415  INSTANCE1_SC_SIGNAL(_Commit_unit,out_COMMIT_ACK                     ,_param->_nb_inst_commit);
     
    351491  INSTANCE2_SC_SIGNAL(_Commit_unit,out_SPR_WRITE_SR_OV                ,_param->_nb_front_end,_param->_nb_context[it1]);
    352492
     493#ifdef DEBUG_TEST
     494  INSTANCE0_SC_SIGNAL(_Commit_unit,out_INFO_ROB_EMPTY                 );
     495#endif
     496
    353497  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
    354498   
     
    378522  in_NRESET->write(1); 
    379523
     524#ifdef SELFTEST
    380525  LABEL("Loop of Test");
    381526  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
     
    435580                  in_INSERT_IS_DELAY_SLOT           [i][j]->write(0);
    436581                  in_INSERT_NO_EXECUTE              [i][j]->write(0);
     582                  in_INSERT_LAST_EVENT              [i][j]->write(0);
    437583                  in_INSERT_ADDRESS_NEXT            [i][j]->write(addr);
    438584                  in_INSERT_EXCEPTION               [i][j]->write(0);
     
    608754
    609755    }
     756#else
     757  SC_START(10);
     758#endif
    610759
    611760  /********************************************************
     
    631780  DELETE2_SC_SIGNAL( in_INSERT_OPERATION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    632781  DELETE2_SC_SIGNAL( in_INSERT_NO_EXECUTE              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     782  DELETE2_SC_SIGNAL( in_INSERT_LAST_EVENT              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    633783  DELETE2_SC_SIGNAL( in_INSERT_IS_DELAY_SLOT           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    634 #ifdef DEBUG
    635784  DELETE2_SC_SIGNAL( in_INSERT_ADDRESS                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    636 #endif
    637785  DELETE2_SC_SIGNAL( in_INSERT_ADDRESS_NEXT            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    638786  DELETE2_SC_SIGNAL( in_INSERT_EXCEPTION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    666814  DELETE2_SC_SIGNAL(out_RETIRE_STORE_QUEUE_PTR_WRITE   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    667815  DELETE2_SC_SIGNAL(out_RETIRE_LOAD_QUEUE_PTR_WRITE    ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    668 //   DELETE2_SC_SIGNAL(out_RETIRE_READ_RA                 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    669 //   DELETE2_SC_SIGNAL(out_RETIRE_NUM_REG_RA_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    670 //   DELETE2_SC_SIGNAL(out_RETIRE_READ_RB                 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    671 //   DELETE2_SC_SIGNAL(out_RETIRE_NUM_REG_RB_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    672 //   DELETE2_SC_SIGNAL(out_RETIRE_READ_RC                 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    673 //   DELETE2_SC_SIGNAL(out_RETIRE_NUM_REG_RC_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     816//DELETE2_SC_SIGNAL(out_RETIRE_READ_RA                 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     817//DELETE2_SC_SIGNAL(out_RETIRE_NUM_REG_RA_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     818//DELETE2_SC_SIGNAL(out_RETIRE_READ_RB                 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     819//DELETE2_SC_SIGNAL(out_RETIRE_NUM_REG_RB_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     820//DELETE2_SC_SIGNAL(out_RETIRE_READ_RC                 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     821//DELETE2_SC_SIGNAL(out_RETIRE_NUM_REG_RC_PHY          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    674822  DELETE2_SC_SIGNAL(out_RETIRE_WRITE_RD                ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    675823  DELETE2_SC_SIGNAL(out_RETIRE_NUM_REG_RD_LOG          ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     
    683831  DELETE2_SC_SIGNAL( in_RETIRE_EVENT_ACK               ,_param->_nb_front_end,_param->_nb_context[it1]);
    684832  DELETE2_SC_SIGNAL(out_RETIRE_EVENT_STATE             ,_param->_nb_front_end,_param->_nb_context[it1]);
     833  DELETE2_SC_SIGNAL(out_RETIRE_EVENT_STOP              ,_param->_nb_front_end,_param->_nb_context[it1]);
    685834  DELETE1_SC_SIGNAL( in_COMMIT_VAL               ,_param->_nb_inst_commit);
    686835  DELETE1_SC_SIGNAL(out_COMMIT_ACK               ,_param->_nb_inst_commit);
     
    747896  DELETE2_SC_SIGNAL(out_SPR_WRITE_SR_OV_VAL            ,_param->_nb_front_end,_param->_nb_context[it1]);
    748897  DELETE2_SC_SIGNAL(out_SPR_WRITE_SR_OV                ,_param->_nb_front_end,_param->_nb_context[it1]);
     898
     899  DELETE0_SC_SIGNAL(out_INFO_ROB_EMPTY                 );
    749900    }
    750901#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp

    r125 r128  
    239239
    240240#if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true)
    241     for (uint32_t i=0; i<_param->_nb_thread; ++i)
    242       if (_param->_have_thread [i])
    243         {
    244           instruction_log_file [i].close();
    245         }
     241    {   
     242      for (uint32_t i=0; i<_param->_nb_thread; ++i)
     243        if (_param->_have_thread [i])
     244          {
     245            instruction_log_file [i].close();
     246          }
     247      delete [] instruction_log_file;
     248    }
    246249#endif
    247250
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_retire.cpp

    r123 r128  
    5252      for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
    5353        {
    54           spr_write_val [i][j] = 0;
     54          spr_write_val       [i][j] = 0;
    5555          spr_write_sr_f_val  [i][j] = 0;
    5656          spr_write_sr_cy_val [i][j] = 0;
     
    6363    for (uint32_t i=0; i<_param->_nb_bank; i++)
    6464      {
    65         uint32_t num_bank = (internal_BANK_RETIRE_HEAD+i)%_param->_nb_bank;
     65        uint32_t num_bank = (internal_BANK_RETIRE_HEAD+i)%_param->_nb_bank;
     66
     67        log_printf(TRACE,Commit_unit,FUNCTION,"  * BANK [%d]",num_bank);
    6668
    6769        // Test if have instruction
     
    7274            uint32_t   x     = entry->rename_unit_id;
    7375            uint32_t   y     = num_inst_retire [x];
    74             bool       bypass= false;
    75             // test if :
    76             //  * can retire (all previous instruction is retired)
    77             //  * all structure is ok (not busy)
    78             if (can_retire [x] and // in-order
    79                 (y < _param->_nb_inst_retire [x]) and
    80                 PORT_READ(in_RETIRE_ACK [x][y])) // not busy
    81               {
    82                 rob_state_t state        = entry->state;
    83                 Tcontext_t  front_end_id = entry->front_end_id;
    84                 Tcontext_t  context_id   = entry->context_id; 
     76
     77            log_printf(TRACE,Commit_unit,FUNCTION,"    * num_rename_unit        : %d",x);
     78            log_printf(TRACE,Commit_unit,FUNCTION,"    * num_inst_retire        : %d",y);
     79
     80            if (y < _param->_nb_inst_retire [x])
     81              {
     82#ifdef DEBUG_TEST
     83                if (x >= _param->_nb_rename_unit)
     84                  throw ERRORMORPHEO(FUNCTION,toString(_("Invalid rename_unit number (%d, max is %d).\n"),x,_param->_nb_rename_unit));
     85#endif
     86                bool       bypass= false;
     87
     88                log_printf(TRACE,Commit_unit,FUNCTION,"    * can_retire             : %d",can_retire [x]);
     89                log_printf(TRACE,Commit_unit,FUNCTION,"    * RETIRE_ACK             : %d",PORT_READ(in_RETIRE_ACK [x][y]));
     90
     91                // test if :
     92                //  * can retire (all previous instruction is retired)
     93                //  * all structure is ok (not busy)
     94                if (can_retire [x] and // in-order
     95                    PORT_READ(in_RETIRE_ACK [x][y])) // not busy
     96                  {
     97                    log_printf(TRACE,Commit_unit,FUNCTION,"    * valid !!!");
     98
     99                    rob_state_t state        = entry->state;
     100                    Tcontext_t  front_end_id = entry->front_end_id;
     101                    Tcontext_t  context_id   = entry->context_id; 
     102
     103                    log_printf(TRACE,Commit_unit,FUNCTION,"      * state                : %s",toString(state).c_str());
     104                    log_printf(TRACE,Commit_unit,FUNCTION,"      * front_end_id         : %d",front_end_id);
     105                    log_printf(TRACE,Commit_unit,FUNCTION,"      * context_id           : %d",context_id  );
     106                   
     107                    if ((state == ROB_END_OK         ) or
     108                        (state == ROB_END_KO         ) or
     109                        (state == ROB_END_BRANCH_MISS) or
     110                        (state == ROB_END_LOAD_MISS  ) or
     111                        (state == ROB_END_MISS       )//  or
     112//                      (state == ROB_END_EXCEPTION)
     113                        )
     114                      {
     115                        Tcontrol_t         write_re       = entry->write_re;
     116                        Tspecial_address_t num_reg_re_log = entry->num_reg_re_log;
     117                       
     118                        // if state is ok, when write flags in the SR regsiters
     119                        bool spr_write_ack = true;
     120                       
     121                        // Write in SR the good flag
     122                        if ((state == ROB_END_OK  ) and write_re)
     123                          // ROB_END_BRANCH_MISS is a valid branch instruction but don't modify RE
     124                          {
     125                            log_printf(TRACE,Commit_unit,FUNCTION,"      * need write SR flags");
     126                            log_printf(TRACE,Commit_unit,FUNCTION,"      * SPR_WRITE_ACK        : %d",PORT_READ(in_SPR_WRITE_ACK [front_end_id][context_id]));
     127
     128                            spr_write_ack = PORT_READ(in_SPR_WRITE_ACK [front_end_id][context_id]);
     129                           
     130                            // retire_ack is set !!!
     131                            spr_write_val       [front_end_id][context_id] = 1;
     132                           
     133                            Tspecial_data_t flags = entry->flags;
     134                           
     135                            switch (num_reg_re_log)
     136                              {
     137                              case SPR_LOGIC_SR_F     :
     138                                {
     139                                  spr_write_sr_f_val  [front_end_id][context_id] = 1;
     140                                  spr_write_sr_f      [front_end_id][context_id] = (flags & FLAG_F )!=0;
     141                                 
     142                                  break;
     143                                }
     144                              case SPR_LOGIC_SR_CY_OV :
     145                                {
     146                                  spr_write_sr_cy_val [front_end_id][context_id] = 1;
     147                                  spr_write_sr_ov_val [front_end_id][context_id] = 1;   
     148                                  spr_write_sr_cy     [front_end_id][context_id] = (flags & FLAG_CY)!=0;
     149                                  spr_write_sr_ov     [front_end_id][context_id] = (flags & FLAG_OV)!=0;
     150                                 
     151                                  break;
     152                                }
     153                              default :
     154                                {
     155#ifdef DEBUG_TEST
     156                                  throw ERRORMORPHEO(FUNCTION,_("Invalid num_reg_re_log.\n"));
     157#endif
     158                                }
     159                              }
     160                          }
     161                       
     162                        // find an instruction can be retire, and in order
     163                       
     164                        if (spr_write_ack)
     165                          {
     166                            retire_val [x][y] = 1;
     167                            num_inst_retire [x] ++;
     168                            internal_BANK_RETIRE_VAL [num_bank] = true;
     169                          }
     170                       
     171                        internal_BANK_RETIRE_NUM_RENAME_UNIT [num_bank] = x;
     172                        internal_BANK_RETIRE_NUM_INST        [num_bank] = y;
     173                       
     174                        if (_param->_have_port_front_end_id)
     175                        PORT_WRITE(out_RETIRE_FRONT_END_ID          [x][y], front_end_id                );
     176                        if (_param->_have_port_context_id)
     177                        PORT_WRITE(out_RETIRE_CONTEXT_ID            [x][y], context_id                  );
     178//                      PORT_WRITE(out_RETIRE_RENAME_UNIT_ID        [x][y], entry->rename_unit_id       );
     179                        PORT_WRITE(out_RETIRE_USE_STORE_QUEUE       [x][y], entry->use_store_queue      );
     180                        PORT_WRITE(out_RETIRE_USE_LOAD_QUEUE        [x][y], entry->use_load_queue       );
     181                        PORT_WRITE(out_RETIRE_STORE_QUEUE_PTR_WRITE [x][y], entry->store_queue_ptr_write);
     182                        if (_param->_have_port_load_queue_ptr)
     183                        PORT_WRITE(out_RETIRE_LOAD_QUEUE_PTR_WRITE  [x][y], entry->load_queue_ptr_write );
     184//                      PORT_WRITE(out_RETIRE_READ_RA               [x][y], entry->read_ra              );
     185//                      PORT_WRITE(out_RETIRE_NUM_REG_RA_PHY        [x][y], entry->num_reg_ra_phy       );
     186//                      PORT_WRITE(out_RETIRE_READ_RB               [x][y], entry->read_rb              );
     187//                      PORT_WRITE(out_RETIRE_NUM_REG_RB_PHY        [x][y], entry->num_reg_rb_phy       );
     188//                      PORT_WRITE(out_RETIRE_READ_RC               [x][y], entry->read_rc              );
     189//                      PORT_WRITE(out_RETIRE_NUM_REG_RC_PHY        [x][y], entry->num_reg_rc_phy       );
     190                        PORT_WRITE(out_RETIRE_WRITE_RD              [x][y], entry->write_rd             );
     191                        PORT_WRITE(out_RETIRE_NUM_REG_RD_LOG        [x][y], entry->num_reg_rd_log       );
     192                        PORT_WRITE(out_RETIRE_NUM_REG_RD_PHY_OLD    [x][y], entry->num_reg_rd_phy_old   );
     193                        PORT_WRITE(out_RETIRE_NUM_REG_RD_PHY_NEW    [x][y], entry->num_reg_rd_phy_new   );
     194                        PORT_WRITE(out_RETIRE_WRITE_RE              [x][y], write_re                    );
     195                        PORT_WRITE(out_RETIRE_NUM_REG_RE_LOG        [x][y], num_reg_re_log              );
     196                        PORT_WRITE(out_RETIRE_NUM_REG_RE_PHY_OLD    [x][y], entry->num_reg_re_phy_old   );
     197                        PORT_WRITE(out_RETIRE_NUM_REG_RE_PHY_NEW    [x][y], entry->num_reg_re_phy_new   );
     198                       
     199                        // Event -> rob must be manage this event
     200                        if ((state == ROB_END_BRANCH_MISS) or
     201                            (state == ROB_END_LOAD_MISS))
     202                          can_retire [x] = false;
     203                      }
     204
     205                    log_printf(TRACE,Commit_unit,FUNCTION,"      * bypass (before)      : %d",bypass);
     206
     207                    bypass = ((state == ROB_END              ) or
     208                              (state == ROB_STORE_OK         ) or
     209                              (state == ROB_STORE_KO         ) or
     210                              (state == ROB_STORE_OK_WAIT_END) or
     211                              (state == ROB_STORE_KO_WAIT_END));
     212
     213                    log_printf(TRACE,Commit_unit,FUNCTION,"      * bypass (after)       : %d",bypass);
     214                   
     215                    uint32_t packet = ((entry->ptr << _param->_shift_num_slot) | num_bank);
     216
     217                    log_printf(TRACE,Commit_unit,FUNCTION,"      * packet               : %d",packet);
     218                   
     219                    // if future event, don't update after this event
     220                    if ((reg_EVENT_STATE  [front_end_id][context_id] == COMMIT_EVENT_STATE_NOT_YET_EVENT) and
     221                        (reg_EVENT_PACKET [front_end_id][context_id] == packet))
     222                      {
     223                        log_printf(TRACE,Commit_unit,FUNCTION,"      * is the event instruction, stop bypass !!!");
     224                        bypass = false;
     225                      }
     226                  }
    85227               
    86                   if ((state == ROB_END_OK         ) or
    87                       (state == ROB_END_KO         ) or
    88                       (state == ROB_END_BRANCH_MISS) or
    89                       (state == ROB_END_LOAD_MISS  ) or
    90                       (state == ROB_END_MISS       )//  or
    91 //                    (state == ROB_END_EXCEPTION)
    92                       )
    93                     {
    94                       Tcontrol_t         write_re       = entry->write_re;
    95                       Tspecial_address_t num_reg_re_log = entry->num_reg_re_log;
    96                      
    97                       // if state is ok, when write flags in the SR regsiters
    98                       bool spr_write_ack = true;
    99                      
    100                       // Write in SR the good flag
    101                       if ((state == ROB_END_OK  ) and write_re)
    102                         // ROB_END_BRANCH_MISS is a valid branch instruction but don't modify RE
    103                         {
    104                           spr_write_ack = PORT_READ(in_SPR_WRITE_ACK [front_end_id][context_id]);
    105                          
    106                           // retire_ack is set !!!
    107                           spr_write_val       [front_end_id][context_id] = 1;
    108                          
    109                           Tspecial_data_t flags = entry->flags;
    110                          
    111                           switch (num_reg_re_log)
    112                             {
    113                             case SPR_LOGIC_SR_F     :
    114                               {
    115                                 spr_write_sr_f_val  [front_end_id][context_id] = 1;
    116                                 spr_write_sr_f      [front_end_id][context_id] = (flags & FLAG_F )!=0;
    117                                
    118                                 break;
    119                               }
    120                             case SPR_LOGIC_SR_CY_OV :
    121                               {
    122                                 spr_write_sr_cy_val [front_end_id][context_id] = 1;
    123                                 spr_write_sr_ov_val [front_end_id][context_id] = 1;     
    124                                 spr_write_sr_cy     [front_end_id][context_id] = (flags & FLAG_CY)!=0;
    125                                 spr_write_sr_ov     [front_end_id][context_id] = (flags & FLAG_OV)!=0;
    126                                
    127                                 break;
    128                               }
    129                             default :
    130                               {
    131 #ifdef DEBUG_TEST
    132                                 throw ERRORMORPHEO(FUNCTION,_("Invalid num_reg_re_log.\n"));
    133 #endif
    134                               }
    135                             }
    136                         }
    137                      
    138                       // find an instruction can be retire, and in order
    139                      
    140                       if (spr_write_ack)
    141                         {
    142                           retire_val [x][y] = 1;
    143                           num_inst_retire [x] ++;
    144                           internal_BANK_RETIRE_VAL [num_bank] = true;
    145                         }
    146                      
    147                       internal_BANK_RETIRE_NUM_RENAME_UNIT [num_bank] = x;
    148                       internal_BANK_RETIRE_NUM_INST        [num_bank] = y;
    149                      
    150                       if (_param->_have_port_front_end_id)
    151                       PORT_WRITE(out_RETIRE_FRONT_END_ID          [x][y], front_end_id                );
    152                       if (_param->_have_port_context_id)
    153                       PORT_WRITE(out_RETIRE_CONTEXT_ID            [x][y], context_id                  );
    154 //                    PORT_WRITE(out_RETIRE_RENAME_UNIT_ID        [x][y], entry->rename_unit_id       );
    155                       PORT_WRITE(out_RETIRE_USE_STORE_QUEUE       [x][y], entry->use_store_queue      );
    156                       PORT_WRITE(out_RETIRE_USE_LOAD_QUEUE        [x][y], entry->use_load_queue       );
    157                       PORT_WRITE(out_RETIRE_STORE_QUEUE_PTR_WRITE [x][y], entry->store_queue_ptr_write);
    158                       if (_param->_have_port_load_queue_ptr)
    159                       PORT_WRITE(out_RETIRE_LOAD_QUEUE_PTR_WRITE  [x][y], entry->load_queue_ptr_write );
    160 //                       PORT_WRITE(out_RETIRE_READ_RA               [x][y], entry->read_ra              );
    161 //                       PORT_WRITE(out_RETIRE_NUM_REG_RA_PHY        [x][y], entry->num_reg_ra_phy       );
    162 //                       PORT_WRITE(out_RETIRE_READ_RB               [x][y], entry->read_rb              );
    163 //                       PORT_WRITE(out_RETIRE_NUM_REG_RB_PHY        [x][y], entry->num_reg_rb_phy       );
    164 //                       PORT_WRITE(out_RETIRE_READ_RC               [x][y], entry->read_rc              );
    165 //                       PORT_WRITE(out_RETIRE_NUM_REG_RC_PHY        [x][y], entry->num_reg_rc_phy       );
    166                       PORT_WRITE(out_RETIRE_WRITE_RD              [x][y], entry->write_rd             );
    167                       PORT_WRITE(out_RETIRE_NUM_REG_RD_LOG        [x][y], entry->num_reg_rd_log       );
    168                       PORT_WRITE(out_RETIRE_NUM_REG_RD_PHY_OLD    [x][y], entry->num_reg_rd_phy_old   );
    169                       PORT_WRITE(out_RETIRE_NUM_REG_RD_PHY_NEW    [x][y], entry->num_reg_rd_phy_new   );
    170                       PORT_WRITE(out_RETIRE_WRITE_RE              [x][y], write_re                    );
    171                       PORT_WRITE(out_RETIRE_NUM_REG_RE_LOG        [x][y], num_reg_re_log              );
    172                       PORT_WRITE(out_RETIRE_NUM_REG_RE_PHY_OLD    [x][y], entry->num_reg_re_phy_old   );
    173                       PORT_WRITE(out_RETIRE_NUM_REG_RE_PHY_NEW    [x][y], entry->num_reg_re_phy_new   );
    174 
    175                       // Event -> rob must be manage this event
    176                       if ((state == ROB_END_BRANCH_MISS) or
    177                           (state == ROB_END_LOAD_MISS))
    178                         can_retire [x] = false;
    179                     }
    180 
    181                   bypass = ((state == ROB_END              ) or
    182                             (state == ROB_STORE_OK         ) or
    183                             (state == ROB_STORE_KO         ) or
    184                             (state == ROB_STORE_OK_WAIT_END) or
    185                             (state == ROB_STORE_KO_WAIT_END));
    186                  
    187                   uint32_t packet = ((entry->ptr << _param->_shift_num_slot) | num_bank);
    188 
    189                   // if future event, don't update after this event
    190                   if ((reg_EVENT_STATE  [entry->front_end_id][entry->context_id] == COMMIT_EVENT_STATE_NOT_YET_EVENT) and
    191                       (reg_EVENT_PACKET [entry->front_end_id][entry->context_id] == packet))
    192                     bypass = false;
    193               }
    194 
    195             // Retire "in-order"
    196             can_retire [x]  &= (retire_val [x][y] or bypass);
     228                // Retire "in-order"
     229                can_retire [x]  &= (retire_val [x][y] or bypass);
     230              }
    197231          }
    198232      }
     
    219253          for (uint32_t j=0; j<_param->_nb_inst_retire[i]; j++)
    220254            PORT_WRITE(out_RETIRE_VAL [i][j],0);
     255
     256        for (uint32_t i=0; i<_param->_nb_front_end; ++i)
     257          for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
     258            PORT_WRITE(out_SPR_WRITE_VAL [i][j], 0);
    221259      }
    222260
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp

    r124 r128  
    5454//            reg_EVENT_FLUSH           [i][j] = false;
    5555//            reg_EVENT_STOP            [i][j] = false;
     56              reg_EVENT_NUM_BANK        [i][j] = 0; // not necessary
     57              reg_EVENT_NUM_PTR         [i][j] = 0; // not necessary
     58            //reg_EVENT_CAN_RESTART     [i][j] = 0; // not necessary
     59              reg_EVENT_PACKET          [i][j] = 0; // not necessary
    5660              reg_EVENT_NB_INST         [i][j] = 0;
    5761              reg_EVENT_LAST            [i][j] = false;
     62              reg_EVENT_LAST_NUM_BANK   [i][j] = 0; // not necessary
     63              reg_EVENT_LAST_NUM_PTR    [i][j] = 0; // not necessary
    5864
    5965              reg_EVENT_NEXT_STOP       [i][j] = false;
     66              reg_EVENT_NEXT_PACKET     [i][j] = 0; // not necessary
    6067
    6168//            reg_PC_PREVIOUS           [i][j] = (0x100-4)>>2;
     
    274281                      entry->num_reg_re_phy_old      = PORT_READ(in_INSERT_NUM_REG_RE_PHY_OLD    [x][y]);
    275282                      entry->num_reg_re_phy_new      = PORT_READ(in_INSERT_NUM_REG_RE_PHY_NEW    [x][y]);
     283
     284                      entry->flags                   = 0; // not necessary
    276285                      entry->no_sequence             = type == TYPE_BRANCH;
    277286//                    entry->speculative             = true;
    278287#ifdef DEBUG       
    279288                      entry->address                 = PORT_READ(in_INSERT_ADDRESS               [x][y]);
     289#else
     290                      entry->address                 = 0; // not necessary
    280291#endif               
    281292                      entry->address_next            = PORT_READ(in_INSERT_ADDRESS_NEXT          [x][y]);
     
    13391350                             (*it)->flags         ,
    13401351                             (*it)->no_sequence   ,
    1341 //                              (*it)->speculative   ,
     1352//                           (*it)->speculative   ,
    13421353                             (*it)->address       ,
    13431354                             (*it)->address<<2    ,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/SelfTest/src/test.cpp

    r117 r128  
    5757  sc_signal<Ttype_t           > ***  in_ISSUE_IN_TYPE                  ;
    5858  sc_signal<Tlsq_ptr_t        > ***  in_ISSUE_IN_STORE_QUEUE_PTR_WRITE ;
     59  sc_signal<Tlsq_ptr_t        > ***  in_ISSUE_IN_STORE_QUEUE_PTR_READ  ;
     60  sc_signal<Tcontrol_t        > ***  in_ISSUE_IN_STORE_QUEUE_EMPTY     ;
    5961  sc_signal<Tlsq_ptr_t        > ***  in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE  ;
    6062  sc_signal<Tcontrol_t        > ***  in_ISSUE_IN_HAS_IMMEDIAT          ;
     
    7880  sc_signal<Ttype_t           >  **  in_REEXECUTE_TYPE                 ;
    7981  sc_signal<Tlsq_ptr_t        >  **  in_REEXECUTE_STORE_QUEUE_PTR_WRITE;
     82  sc_signal<Tlsq_ptr_t        >  **  in_REEXECUTE_STORE_QUEUE_PTR_READ ;
     83  sc_signal<Tcontrol_t        >  **  in_REEXECUTE_STORE_QUEUE_EMPTY    ;
    8084  sc_signal<Tlsq_ptr_t        >  **  in_REEXECUTE_LOAD_QUEUE_PTR_WRITE ;
    8185  sc_signal<Tcontrol_t        >  **  in_REEXECUTE_HAS_IMMEDIAT         ;
     
    99103  sc_signal<Ttype_t           >  ** out_ISSUE_OUT_TYPE                 ;
    100104  sc_signal<Tlsq_ptr_t        >  ** out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE;
     105  sc_signal<Tlsq_ptr_t        >  ** out_ISSUE_OUT_STORE_QUEUE_PTR_READ ;
     106  sc_signal<Tcontrol_t        >  ** out_ISSUE_OUT_STORE_QUEUE_EMPTY    ;
    101107  sc_signal<Tlsq_ptr_t        >  ** out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE ;
    102108  sc_signal<Tcontrol_t        >  ** out_ISSUE_OUT_HAS_IMMEDIAT         ;
     
    121127  ALLOC2_SC_SIGNAL( in_ISSUE_IN_TYPE                  ," in_ISSUE_IN_TYPE                  ",Ttype_t           ,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]);
    122128  ALLOC2_SC_SIGNAL( in_ISSUE_IN_STORE_QUEUE_PTR_WRITE ," in_ISSUE_IN_STORE_QUEUE_PTR_WRITE ",Tlsq_ptr_t        ,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]);
     129  ALLOC2_SC_SIGNAL( in_ISSUE_IN_STORE_QUEUE_PTR_READ  ," in_ISSUE_IN_STORE_QUEUE_PTR_READ  ",Tlsq_ptr_t        ,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]);
     130  ALLOC2_SC_SIGNAL( in_ISSUE_IN_STORE_QUEUE_EMPTY     ," in_ISSUE_IN_STORE_QUEUE_EMPTY     ",Tcontrol_t        ,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]);
    123131  ALLOC2_SC_SIGNAL( in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE  ," in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE  ",Tlsq_ptr_t        ,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]);
    124132  ALLOC2_SC_SIGNAL( in_ISSUE_IN_HAS_IMMEDIAT          ," in_ISSUE_IN_HAS_IMMEDIAT          ",Tcontrol_t        ,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]);
     
    142150  ALLOC1_SC_SIGNAL( in_REEXECUTE_TYPE                 ," in_REEXECUTE_TYPE                 ",Ttype_t           ,_param->_nb_inst_reexecute);
    143151  ALLOC1_SC_SIGNAL( in_REEXECUTE_STORE_QUEUE_PTR_WRITE," in_REEXECUTE_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,_param->_nb_inst_reexecute);
     152  ALLOC1_SC_SIGNAL( in_REEXECUTE_STORE_QUEUE_PTR_READ ," in_REEXECUTE_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t        ,_param->_nb_inst_reexecute);
     153  ALLOC1_SC_SIGNAL( in_REEXECUTE_STORE_QUEUE_EMPTY    ," in_REEXECUTE_STORE_QUEUE_EMPTY    ",Tcontrol_t        ,_param->_nb_inst_reexecute);
    144154  ALLOC1_SC_SIGNAL( in_REEXECUTE_LOAD_QUEUE_PTR_WRITE ," in_REEXECUTE_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t        ,_param->_nb_inst_reexecute);
    145155  ALLOC1_SC_SIGNAL( in_REEXECUTE_HAS_IMMEDIAT         ," in_REEXECUTE_HAS_IMMEDIAT         ",Tcontrol_t        ,_param->_nb_inst_reexecute);
     
    163173  ALLOC1_SC_SIGNAL(out_ISSUE_OUT_TYPE                 ,"out_ISSUE_OUT_TYPE                 ",Ttype_t           ,_param->_nb_inst_issue);
    164174  ALLOC1_SC_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE,"out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,_param->_nb_inst_issue);
     175  ALLOC1_SC_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_PTR_READ ,"out_ISSUE_OUT_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t        ,_param->_nb_inst_issue);
     176  ALLOC1_SC_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_EMPTY    ,"out_ISSUE_OUT_STORE_QUEUE_EMPTY    ",Tcontrol_t        ,_param->_nb_inst_issue);
    165177  ALLOC1_SC_SIGNAL(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE ,"out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t        ,_param->_nb_inst_issue);
    166178  ALLOC1_SC_SIGNAL(out_ISSUE_OUT_HAS_IMMEDIAT         ,"out_ISSUE_OUT_HAS_IMMEDIAT         ",Tcontrol_t        ,_param->_nb_inst_issue);
     
    197209  INSTANCE2_SC_SIGNAL(_Issue_queue, in_ISSUE_IN_TYPE                  ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
    198210  INSTANCE2_SC_SIGNAL(_Issue_queue, in_ISSUE_IN_STORE_QUEUE_PTR_WRITE ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
     211  INSTANCE2_SC_SIGNAL(_Issue_queue, in_ISSUE_IN_STORE_QUEUE_PTR_READ  ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
     212  INSTANCE2_SC_SIGNAL(_Issue_queue, in_ISSUE_IN_STORE_QUEUE_EMPTY     ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
    199213  if (_param->_have_port_load_queue_ptr)
    200214  INSTANCE2_SC_SIGNAL(_Issue_queue, in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE  ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
     
    223237  INSTANCE1_SC_SIGNAL(_Issue_queue, in_REEXECUTE_TYPE                 ,_param->_nb_inst_reexecute);
    224238  INSTANCE1_SC_SIGNAL(_Issue_queue, in_REEXECUTE_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_reexecute);
     239  INSTANCE1_SC_SIGNAL(_Issue_queue, in_REEXECUTE_STORE_QUEUE_PTR_READ ,_param->_nb_inst_reexecute);
     240  INSTANCE1_SC_SIGNAL(_Issue_queue, in_REEXECUTE_STORE_QUEUE_EMPTY    ,_param->_nb_inst_reexecute);
    225241  if (_param->_have_port_load_queue_ptr)
    226242  INSTANCE1_SC_SIGNAL(_Issue_queue, in_REEXECUTE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_reexecute);
     
    249265  INSTANCE1_SC_SIGNAL(_Issue_queue,out_ISSUE_OUT_TYPE                 ,_param->_nb_inst_issue);
    250266  INSTANCE1_SC_SIGNAL(_Issue_queue,out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_issue);
     267  INSTANCE1_SC_SIGNAL(_Issue_queue,out_ISSUE_OUT_STORE_QUEUE_PTR_READ ,_param->_nb_inst_issue);
     268  INSTANCE1_SC_SIGNAL(_Issue_queue,out_ISSUE_OUT_STORE_QUEUE_EMPTY    ,_param->_nb_inst_issue);
    251269  if (_param->_have_port_load_queue_ptr)
    252270  INSTANCE1_SC_SIGNAL(_Issue_queue,out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_issue);
     
    423441  DELETE2_SC_SIGNAL( in_ISSUE_IN_TYPE                  ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
    424442  DELETE2_SC_SIGNAL( in_ISSUE_IN_STORE_QUEUE_PTR_WRITE ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
     443  DELETE2_SC_SIGNAL( in_ISSUE_IN_STORE_QUEUE_PTR_READ  ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
     444  DELETE2_SC_SIGNAL( in_ISSUE_IN_STORE_QUEUE_EMPTY     ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
    425445  DELETE2_SC_SIGNAL( in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE  ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
    426446  DELETE2_SC_SIGNAL( in_ISSUE_IN_HAS_IMMEDIAT          ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
     
    445465  DELETE1_SC_SIGNAL( in_REEXECUTE_TYPE                 ,_param->_nb_inst_reexecute);
    446466  DELETE1_SC_SIGNAL( in_REEXECUTE_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_reexecute);
     467  DELETE1_SC_SIGNAL( in_REEXECUTE_STORE_QUEUE_PTR_READ ,_param->_nb_inst_reexecute);
     468  DELETE1_SC_SIGNAL( in_REEXECUTE_STORE_QUEUE_EMPTY    ,_param->_nb_inst_reexecute);
    447469  DELETE1_SC_SIGNAL( in_REEXECUTE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_reexecute);
    448470  DELETE1_SC_SIGNAL( in_REEXECUTE_HAS_IMMEDIAT         ,_param->_nb_inst_reexecute);
     
    467489  DELETE1_SC_SIGNAL(out_ISSUE_OUT_TYPE                 ,_param->_nb_inst_issue);
    468490  DELETE1_SC_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_issue);
     491  DELETE1_SC_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_PTR_READ ,_param->_nb_inst_issue);
     492  DELETE1_SC_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_EMPTY    ,_param->_nb_inst_issue);
    469493  DELETE1_SC_SIGNAL(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_issue);
    470494  DELETE1_SC_SIGNAL(out_ISSUE_OUT_HAS_IMMEDIAT         ,_param->_nb_inst_issue);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_allocation.cpp

    r122 r128  
    156156
    157157    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    158     ALLOC1(internal_BANK_IN_ACK             ,Tcontrol_t,_param->_nb_bank);
    159     ALLOC1(internal_BANK_IN_NUM_RENAME_UNIT ,uint32_t  ,_param->_nb_bank);
    160     ALLOC1(internal_BANK_IN_NUM_INST        ,uint32_t  ,_param->_nb_bank);
    161 
    162158    ALLOC1(internal_ISSUE_OUT_VAL           ,Tcontrol_t,_param->_nb_inst_issue);
    163159    ALLOC1(internal_ISSUE_OUT_FROM_REEXECUTE,Tcontrol_t,_param->_nb_inst_issue);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_deallocation.cpp

    r122 r128  
    101101
    102102        // ~~~~~[ Registers ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     103        while (not _reexecute_queue.empty())
     104          {
     105            delete _reexecute_queue.front();
     106            _reexecute_queue.pop_front();
     107          }
     108
    103109        DELETE1(_issue_queue                     ,_param->_nb_bank);
    104110       
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_transition.cpp

    r122 r128  
    105105                log_printf(TRACE,Issue_queue,FUNCTION,"  * ISSUE_OUT [%d] - From issue_queue [%d]",i,num_bank);
    106106               
     107                delete entry;
     108               
    107109                _issue_queue [num_bank].remove(entry);
    108                
     110
    109111                reg_NUM_BANK_HEAD = (reg_NUM_BANK_HEAD+1)%_param->_nb_bank;
    110                
    111                 delete entry;
    112112              }
    113113
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_transition.cpp

    r122 r128  
    101101                log_printf(TRACE,Issue_queue,FUNCTION,"  * ISSUE_OUT [%d] - From issue_queue [%d]",i,num_bank);
    102102               
     103                delete entry;
     104
    103105                _issue_queue [num_bank].remove(entry);
    104                 delete entry;
    105106              }
    106107      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/SelfTest/src/main.cpp

    r88 r128  
    108108     
    109109      test (name,param);
     110
     111      delete param;
    110112    }
    111113  catch (morpheo::ErrorMorpheo & error)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/SelfTest/src/test.cpp

    r121 r128  
    4848  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    4949
     50  sc_signal<Tcontext_t         > ***  in_RENAME_FRONT_END_ID                     ;
     51  sc_signal<Tcontext_t         > *** out_RENAME_RENAME_UNIT_FRONT_END_ID         ;
     52
     53  sc_signal<Tcontrol_t         >  ** out_INSERT_VAL                              ;
     54  sc_signal<Tcontrol_t         >  **  in_INSERT_ACK                              ;
     55  sc_signal<Tcontrol_t         >  ** out_INSERT_RD_USE                           ;
     56  sc_signal<Tgeneral_address_t >  ** out_INSERT_RD_NUM_REG                       ;
     57  sc_signal<Tcontrol_t         >  ** out_INSERT_RE_USE                           ;
     58  sc_signal<Tspecial_address_t >  ** out_INSERT_RE_NUM_REG                       ;
     59
     60  sc_signal<Tcontrol_t         > ***  in_INSERT_RENAME_UNIT_VAL                  ;
     61  sc_signal<Tcontrol_t         > *** out_INSERT_RENAME_UNIT_ACK                  ;
     62  sc_signal<Tcontext_t         > ***  in_INSERT_RENAME_UNIT_FRONT_END_ID         ;
     63  sc_signal<Tcontext_t         > ***  in_INSERT_RENAME_UNIT_CONTEXT_ID           ;
     64  sc_signal<Ttype_t            > ***  in_INSERT_RENAME_UNIT_TYPE                 ;
     65  sc_signal<Toperation_t       > ***  in_INSERT_RENAME_UNIT_OPERATION            ;
     66  sc_signal<Tcontrol_t         > ***  in_INSERT_RENAME_UNIT_NO_EXECUTE           ;
     67  sc_signal<Tcontrol_t         > ***  in_INSERT_RENAME_UNIT_HAS_IMMEDIAT         ;
     68  sc_signal<Tgeneral_data_t    > ***  in_INSERT_RENAME_UNIT_IMMEDIAT             ;
     69  sc_signal<Tlsq_ptr_t         > ***  in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE;
     70  sc_signal<Tlsq_ptr_t         > ***  in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_READ ;
     71  sc_signal<Tcontrol_t         > ***  in_INSERT_RENAME_UNIT_STORE_QUEUE_EMPTY    ;
     72  sc_signal<Tlsq_ptr_t         > ***  in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE ;
     73  sc_signal<Tcontrol_t         > ***  in_INSERT_RENAME_UNIT_READ_RA              ;
     74  sc_signal<Tgeneral_address_t > ***  in_INSERT_RENAME_UNIT_NUM_REG_RA_PHY       ;
     75  sc_signal<Tcontrol_t         > ***  in_INSERT_RENAME_UNIT_READ_RB              ;
     76  sc_signal<Tgeneral_address_t > ***  in_INSERT_RENAME_UNIT_NUM_REG_RB_PHY       ;
     77  sc_signal<Tcontrol_t         > ***  in_INSERT_RENAME_UNIT_READ_RC              ;
     78  sc_signal<Tspecial_address_t > ***  in_INSERT_RENAME_UNIT_NUM_REG_RC_PHY       ;
     79  sc_signal<Tcontrol_t         > ***  in_INSERT_RENAME_UNIT_WRITE_RD             ;
     80  sc_signal<Tgeneral_address_t > ***  in_INSERT_RENAME_UNIT_NUM_REG_RD_PHY_OLD   ;
     81  sc_signal<Tgeneral_address_t > ***  in_INSERT_RENAME_UNIT_NUM_REG_RD_PHY_NEW   ;
     82  sc_signal<Tcontrol_t         > ***  in_INSERT_RENAME_UNIT_WRITE_RE             ;
     83  sc_signal<Tspecial_address_t > ***  in_INSERT_RENAME_UNIT_NUM_REG_RE_PHY_OLD   ;
     84  sc_signal<Tspecial_address_t > ***  in_INSERT_RENAME_UNIT_NUM_REG_RE_PHY_NEW   ;
     85
     86  sc_signal<Tcontrol_t         > *** out_INSERT_COMMIT_UNIT_VAL                  ;
     87  sc_signal<Tcontrol_t         > ***  in_INSERT_COMMIT_UNIT_ACK                  ;
     88  sc_signal<Tcontext_t         > *** out_INSERT_COMMIT_UNIT_FRONT_END_ID         ;
     89  sc_signal<Tcontext_t         > *** out_INSERT_COMMIT_UNIT_CONTEXT_ID           ;
     90//sc_signal<Tcontext_t         > *** out_INSERT_COMMIT_UNIT_RENAME_UNIT_ID       ;
     91  sc_signal<Ttype_t            > *** out_INSERT_COMMIT_UNIT_TYPE                 ;
     92  sc_signal<Toperation_t       > *** out_INSERT_COMMIT_UNIT_OPERATION            ;
     93  sc_signal<Tcontrol_t         > *** out_INSERT_COMMIT_UNIT_NO_EXECUTE           ;
     94  sc_signal<Tlsq_ptr_t         > *** out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE;
     95//   sc_signal<Tlsq_ptr_t         > *** out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_READ ;
     96//   sc_signal<Tcontrol_t         > *** out_INSERT_COMMIT_UNIT_STORE_QUEUE_EMPTY    ;
     97  sc_signal<Tlsq_ptr_t         > *** out_INSERT_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE ;
     98  sc_signal<Tcontrol_t         > *** out_INSERT_COMMIT_UNIT_READ_RA              ;
     99  sc_signal<Tgeneral_address_t > *** out_INSERT_COMMIT_UNIT_NUM_REG_RA_PHY       ;
     100  sc_signal<Tcontrol_t         > *** out_INSERT_COMMIT_UNIT_READ_RB              ;
     101  sc_signal<Tgeneral_address_t > *** out_INSERT_COMMIT_UNIT_NUM_REG_RB_PHY       ;
     102  sc_signal<Tcontrol_t         > *** out_INSERT_COMMIT_UNIT_READ_RC              ;
     103  sc_signal<Tspecial_address_t > *** out_INSERT_COMMIT_UNIT_NUM_REG_RC_PHY       ;
     104  sc_signal<Tcontrol_t         > *** out_INSERT_COMMIT_UNIT_WRITE_RD             ;
     105  sc_signal<Tgeneral_address_t > *** out_INSERT_COMMIT_UNIT_NUM_REG_RD_PHY_OLD   ;
     106  sc_signal<Tgeneral_address_t > *** out_INSERT_COMMIT_UNIT_NUM_REG_RD_PHY_NEW   ;
     107  sc_signal<Tcontrol_t         > *** out_INSERT_COMMIT_UNIT_WRITE_RE             ;
     108  sc_signal<Tspecial_address_t > *** out_INSERT_COMMIT_UNIT_NUM_REG_RE_PHY_OLD   ;
     109  sc_signal<Tspecial_address_t > *** out_INSERT_COMMIT_UNIT_NUM_REG_RE_PHY_NEW   ;
     110
     111  sc_signal<Tcontrol_t         > *** out_INSERT_ISSUE_QUEUE_VAL                  ;
     112  sc_signal<Tcontrol_t         > ***  in_INSERT_ISSUE_QUEUE_ACK                  ;
     113  sc_signal<Tcontext_t         > *** out_INSERT_ISSUE_QUEUE_CONTEXT_ID           ;
     114  sc_signal<Tcontext_t         > *** out_INSERT_ISSUE_QUEUE_FRONT_END_ID         ;
     115  sc_signal<Toperation_t       > *** out_INSERT_ISSUE_QUEUE_OPERATION            ;
     116  sc_signal<Ttype_t            > *** out_INSERT_ISSUE_QUEUE_TYPE                 ;
     117  sc_signal<Tlsq_ptr_t         > *** out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE;
     118  sc_signal<Tlsq_ptr_t         > *** out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_READ ;
     119  sc_signal<Tcontrol_t         > *** out_INSERT_ISSUE_QUEUE_STORE_QUEUE_EMPTY    ;
     120  sc_signal<Tlsq_ptr_t         > *** out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE ;
     121  sc_signal<Tcontrol_t         > *** out_INSERT_ISSUE_QUEUE_HAS_IMMEDIAT         ;
     122  sc_signal<Tgeneral_data_t    > *** out_INSERT_ISSUE_QUEUE_IMMEDIAT             ;
     123  sc_signal<Tcontrol_t         > *** out_INSERT_ISSUE_QUEUE_READ_RA              ;
     124  sc_signal<Tgeneral_address_t > *** out_INSERT_ISSUE_QUEUE_NUM_REG_RA           ;
     125  sc_signal<Tcontrol_t         > *** out_INSERT_ISSUE_QUEUE_READ_RB              ;
     126  sc_signal<Tgeneral_address_t > *** out_INSERT_ISSUE_QUEUE_NUM_REG_RB           ;
     127  sc_signal<Tcontrol_t         > *** out_INSERT_ISSUE_QUEUE_READ_RC              ;
     128  sc_signal<Tspecial_address_t > *** out_INSERT_ISSUE_QUEUE_NUM_REG_RC           ;
     129  sc_signal<Tcontrol_t         > *** out_INSERT_ISSUE_QUEUE_WRITE_RD             ;
     130  sc_signal<Tgeneral_address_t > *** out_INSERT_ISSUE_QUEUE_NUM_REG_RD           ;
     131  sc_signal<Tcontrol_t         > *** out_INSERT_ISSUE_QUEUE_WRITE_RE             ;
     132  sc_signal<Tspecial_address_t > *** out_INSERT_ISSUE_QUEUE_NUM_REG_RE           ;
     133
     134//sc_signal<Tcontrol_t         >  ** out_RETIRE_VAL                              ;
     135//sc_signal<Tcontrol_t         >  **  in_RETIRE_ACK                              ;
     136//sc_signal<Tcontrol_t         >  ** out_RETIRE_RD_OLD_USE                       ;
     137//sc_signal<Tgeneral_address_t >  ** out_RETIRE_RD_OLD_NUM_REG                   ;
     138//sc_signal<Tcontrol_t         >  ** out_RETIRE_RD_NEW_USE                       ;
     139//sc_signal<Tgeneral_address_t >  ** out_RETIRE_RD_NEW_NUM_REG                   ;
     140//sc_signal<Tcontrol_t         >  ** out_RETIRE_RE_OLD_USE                       ;
     141//sc_signal<Tspecial_address_t >  ** out_RETIRE_RE_OLD_NUM_REG                   ;
     142//sc_signal<Tcontrol_t         >  ** out_RETIRE_RE_NEW_USE                       ;
     143//sc_signal<Tspecial_address_t >  ** out_RETIRE_RE_NEW_NUM_REG                   ;
     144
     145//sc_signal<Tcontrol_t         > *** out_RETIRE_RENAME_UNIT_VAL                  ;
     146//sc_signal<Tcontrol_t         > ***  in_RETIRE_RENAME_UNIT_ACK                  ;
     147//sc_signal<Tcontext_t         > *** out_RETIRE_RENAME_UNIT_FRONT_END_ID         ;
     148//sc_signal<Tcontrol_t         > *** out_RETIRE_RENAME_UNIT_WRITE_RD             ;
     149//sc_signal<Tgeneral_address_t > *** out_RETIRE_RENAME_UNIT_NUM_REG_RD_PHY_OLD   ;
     150//sc_signal<Tgeneral_address_t > *** out_RETIRE_RENAME_UNIT_NUM_REG_RD_PHY_NEW   ;
     151//sc_signal<Tcontrol_t         > *** out_RETIRE_RENAME_UNIT_WRITE_RE             ;
     152//sc_signal<Tspecial_address_t > *** out_RETIRE_RENAME_UNIT_NUM_REG_RE_PHY_OLD   ;
     153//sc_signal<Tspecial_address_t > *** out_RETIRE_RENAME_UNIT_NUM_REG_RE_PHY_NEW   ;
     154//sc_signal<Tevent_state_t     > *** out_RETIRE_RENAME_UNIT_EVENT_STATE          ;
     155
     156//sc_signal<Tcontrol_t         > ***  in_RETIRE_COMMIT_UNIT_VAL                  ;
     157//sc_signal<Tcontrol_t         > *** out_RETIRE_COMMIT_UNIT_ACK                  ;
     158//sc_signal<Tcontext_t         > ***  in_RETIRE_COMMIT_UNIT_FRONT_END_ID         ;
     159//sc_signal<Tcontrol_t         > ***  in_RETIRE_COMMIT_UNIT_WRITE_RD             ;
     160//sc_signal<Tgeneral_address_t > ***  in_RETIRE_COMMIT_UNIT_NUM_REG_RD_PHY_OLD   ;
     161//sc_signal<Tgeneral_address_t > ***  in_RETIRE_COMMIT_UNIT_NUM_REG_RD_PHY_NEW   ;
     162//sc_signal<Tcontrol_t         > ***  in_RETIRE_COMMIT_UNIT_WRITE_RE             ;
     163//sc_signal<Tspecial_address_t > ***  in_RETIRE_COMMIT_UNIT_NUM_REG_RE_PHY_OLD   ;
     164//sc_signal<Tspecial_address_t > ***  in_RETIRE_COMMIT_UNIT_NUM_REG_RE_PHY_NEW   ;
     165//sc_signal<Tevent_state_t     > ***  in_RETIRE_COMMIT_UNIT_EVENT_STATE          ;
     166
     167  sc_signal<Tcontrol_t         > *** out_SPR_SR_IEE                              ;
     168  sc_signal<Tcontrol_t         > *** out_SPR_SR_EPH                              ;
     169  sc_signal<Tspr_t             > *** out_SPR_RENAME_UNIT_SR                      ;
     170  sc_signal<Tcontrol_t         > *** out_SPR_COMMIT_UNIT_SR_OVE                  ;
     171  sc_signal<Tspr_t             > ***  in_SPR_SPECIAL_REGISTER_UNIT_SR            ;
     172
    50173  ALLOC2_SC_SIGNAL( in_RENAME_FRONT_END_ID                     ," in_RENAME_FRONT_END_ID                     ",Tcontext_t         ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);                               
    51174  ALLOC2_SC_SIGNAL(out_RENAME_RENAME_UNIT_FRONT_END_ID         ,"out_RENAME_RENAME_UNIT_FRONT_END_ID         ",Tcontext_t         ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);                               
     
    68191  ALLOC2_SC_SIGNAL( in_INSERT_RENAME_UNIT_IMMEDIAT             ," in_INSERT_RENAME_UNIT_IMMEDIAT             ",Tgeneral_data_t    ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
    69192  ALLOC2_SC_SIGNAL( in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE," in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
     193  ALLOC2_SC_SIGNAL( in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_READ ," in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
     194  ALLOC2_SC_SIGNAL( in_INSERT_RENAME_UNIT_STORE_QUEUE_EMPTY    ," in_INSERT_RENAME_UNIT_STORE_QUEUE_EMPTY    ",Tcontrol_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
    70195  ALLOC2_SC_SIGNAL( in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE ," in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
    71196  ALLOC2_SC_SIGNAL( in_INSERT_RENAME_UNIT_READ_RA              ," in_INSERT_RENAME_UNIT_READ_RA              ",Tcontrol_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
     
    91216  ALLOC2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_NO_EXECUTE           ,"out_INSERT_COMMIT_UNIT_NO_EXECUTE           ",Tcontrol_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
    92217  ALLOC2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE,"out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
     218//   ALLOC2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_READ ,"out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
     219//   ALLOC2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_STORE_QUEUE_EMPTY    ,"out_INSERT_COMMIT_UNIT_STORE_QUEUE_EMPTY    ",Tcontrol_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
    93220  ALLOC2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE ,"out_INSERT_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
    94221  ALLOC2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_READ_RA              ,"out_INSERT_COMMIT_UNIT_READ_RA              ",Tcontrol_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
     
    112239  ALLOC2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_TYPE                 ,"out_INSERT_ISSUE_QUEUE_TYPE                 ",Ttype_t            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
    113240  ALLOC2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE,"out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
     241  ALLOC2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_READ ,"out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
     242  ALLOC2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_EMPTY    ,"out_INSERT_ISSUE_QUEUE_STORE_QUEUE_EMPTY    ",Tcontrol_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
    114243  ALLOC2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE ,"out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
    115244  ALLOC2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_HAS_IMMEDIAT         ,"out_INSERT_ISSUE_QUEUE_HAS_IMMEDIAT         ",Tcontrol_t         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);                           
     
    199328  INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue, in_INSERT_RENAME_UNIT_IMMEDIAT                  ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    200329  INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue, in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE     ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     330  INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue, in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_READ      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     331  INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue, in_INSERT_RENAME_UNIT_STORE_QUEUE_EMPTY         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    201332  if (_param->_have_port_load_queue_ptr)
    202333  INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue, in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    225356  INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_COMMIT_UNIT_NO_EXECUTE                ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    226357  INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE     ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     358//   INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_READ      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     359//   INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_COMMIT_UNIT_STORE_QUEUE_EMPTY         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    227360  if (_param->_have_port_load_queue_ptr)
    228361  INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    251384  INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_ISSUE_QUEUE_TYPE                      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    252385  INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE     ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     386  INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_READ      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     387  INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_ISSUE_QUEUE_STORE_QUEUE_EMPTY         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    253388  if (_param->_have_port_load_queue_ptr)
    254389  INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    399534  DELETE2_SC_SIGNAL( in_INSERT_RENAME_UNIT_IMMEDIAT                  ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    400535  DELETE2_SC_SIGNAL( in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE     ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     536  DELETE2_SC_SIGNAL( in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_READ      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     537  DELETE2_SC_SIGNAL( in_INSERT_RENAME_UNIT_STORE_QUEUE_EMPTY         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    401538  DELETE2_SC_SIGNAL( in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    402539  DELETE2_SC_SIGNAL( in_INSERT_RENAME_UNIT_READ_RA                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    422559  DELETE2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_NO_EXECUTE                ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    423560  DELETE2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE     ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     561//   DELETE2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_READ      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     562//   DELETE2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_STORE_QUEUE_EMPTY         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    424563  DELETE2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    425564  DELETE2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_READ_RA                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    443582  DELETE2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_TYPE                      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    444583  DELETE2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE     ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     584  DELETE2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_READ      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     585  DELETE2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_EMPTY         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    445586  DELETE2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    446587  DELETE2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_HAS_IMMEDIAT              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_deallocation.cpp

    r122 r128  
    7171        DELETE2_SIGNAL(out_INSERT_COMMIT_UNIT_TYPE                      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_type            );
    7272        DELETE2_SIGNAL(out_INSERT_COMMIT_UNIT_OPERATION                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_operation       );
     73        DELETE2_SIGNAL(out_INSERT_COMMIT_UNIT_NO_EXECUTE                ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1);
    7374        DELETE2_SIGNAL(out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE     ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_store_queue_ptr );
    7475        DELETE2_SIGNAL(out_INSERT_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_load_queue_ptr  );
     
    9596        DELETE2_SIGNAL(out_INSERT_ISSUE_QUEUE_TYPE                      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_type            );
    9697        DELETE2_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE     ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_store_queue_ptr );
     98        DELETE2_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_READ      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_store_queue_ptr );
     99        DELETE2_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_EMPTY         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1);
    97100        DELETE2_SIGNAL(out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_load_queue_ptr  );
    98101        DELETE2_SIGNAL(out_INSERT_ISSUE_QUEUE_HAS_IMMEDIAT              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                             );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_genMealy_insert.cpp

    r123 r128  
    5454          Tspecial_address_t NUM_REG_RE_PHY_NEW    = PORT_READ(in_INSERT_RENAME_UNIT_NUM_REG_RE_PHY_NEW    [i][j]);
    5555
    56           Tgeneral_address_t general_address_msb   = FRONT_END_ID << _param->_size_general_register;
    57           Tspecial_address_t special_address_msb   = FRONT_END_ID << _param->_size_special_register;
     56          Tgeneral_address_t general_address_msb   = i << _param->_size_general_register;
     57          Tspecial_address_t special_address_msb   = i << _param->_size_special_register;
    5858         
    5959          PORT_WRITE(out_INSERT_RD_USE                            [x]   ,WRITE_RD);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/Parameters.cpp

    r109 r128  
    77
    88#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/include/Parameters.h"
     9#include "Behavioural/include/Allocation.h"
    910#include "Common/include/Max.h"
    1011#include "Common/include/BitManipulation.h"
     
    6162      }
    6263
    63     _translate_front_end_id_to_rename_unit  = new uint32_t [_nb_front_end];
     64    ALLOC1(_translate_front_end_id_to_rename_unit,uint32_t,_nb_front_end);
    6465   
    6566    for (uint32_t i=0; i<_nb_front_end; i++)
     
    119120  {
    120121    log_begin(OOO_Engine_Glue,FUNCTION);
    121     delete _translate_front_end_id_to_rename_unit;
     122
     123    DELETE1(_translate_front_end_id_to_rename_unit,_nb_front_end);
     124 
    122125    log_end(OOO_Engine_Glue,FUNCTION);
    123126  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/SelfTest/src/main.cpp

    r88 r128  
    101101     
    102102      test (name,param);
     103
     104      delete param;
    103105    }
    104106  catch (morpheo::ErrorMorpheo & error)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/SelfTest/src/test.cpp

    r117 r128  
    137137  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    138138
     139  sc_signal<Tcontrol_t         > ***  in_EXECUTE_LOOP_VAL                     ;
     140  sc_signal<Tcontrol_t         > *** out_EXECUTE_LOOP_ACK                     ;
     141  sc_signal<Tcontext_t         > ***  in_EXECUTE_LOOP_CONTEXT_ID              ;
     142  sc_signal<Tcontext_t         > ***  in_EXECUTE_LOOP_FRONT_END_ID            ;
     143  sc_signal<Tpacket_t          > ***  in_EXECUTE_LOOP_PACKET_ID               ;
     144//sc_signal<Toperation_t       > ***  in_EXECUTE_LOOP_OPERATION               ;
     145//sc_signal<Ttype_t            > ***  in_EXECUTE_LOOP_TYPE                    ;
     146  sc_signal<Tspecial_data_t    > ***  in_EXECUTE_LOOP_FLAGS                   ;
     147  sc_signal<Texception_t       > ***  in_EXECUTE_LOOP_EXCEPTION               ;
     148  sc_signal<Tcontrol_t         > ***  in_EXECUTE_LOOP_NO_SEQUENCE             ;
     149  sc_signal<Tgeneral_data_t    > ***  in_EXECUTE_LOOP_ADDRESS                 ;
     150  sc_signal<Tgeneral_data_t    > ***  in_EXECUTE_LOOP_DATA                    ;
     151
     152  sc_signal<Tcontrol_t         >  ** out_COMMIT_VAL                           ;
     153  sc_signal<Tcontrol_t         >  **  in_COMMIT_ACK                           ;
     154  sc_signal<Tcontrol_t         >  ** out_COMMIT_WEN                           ;
     155  sc_signal<Tcontext_t         >  ** out_COMMIT_CONTEXT_ID                    ;
     156  sc_signal<Tcontext_t         >  ** out_COMMIT_FRONT_END_ID                  ;
     157  sc_signal<Tpacket_t          >  ** out_COMMIT_PACKET_ID                     ;
     158//sc_signal<Toperation_t       >  ** out_COMMIT_OPERATION                     ;
     159//sc_signal<Ttype_t            >  ** out_COMMIT_TYPE                          ;
     160  sc_signal<Tspecial_data_t    >  ** out_COMMIT_FLAGS                         ;
     161  sc_signal<Texception_t       >  ** out_COMMIT_EXCEPTION                     ;
     162  sc_signal<Tcontrol_t         >  ** out_COMMIT_NO_SEQUENCE                   ;
     163  sc_signal<Tgeneral_data_t    >  ** out_COMMIT_ADDRESS                       ;
     164  sc_signal<Tgeneral_address_t >  **  in_COMMIT_NUM_REG_RD                    ;
     165
     166  sc_signal<Tcontrol_t         >  ** out_SPR_VAL                              ;
     167  sc_signal<Tcontrol_t         >  **  in_SPR_ACK                              ;
     168  sc_signal<Tcontrol_t         >  ** out_SPR_WEN                              ;
     169  sc_signal<Tcontext_t         >  ** out_SPR_CONTEXT_ID                       ;
     170  sc_signal<Tcontext_t         >  ** out_SPR_FRONT_END_ID                     ;
     171  sc_signal<Tspr_address_t     >  ** out_SPR_NUM_GROUP                        ;
     172  sc_signal<Tspr_address_t     >  ** out_SPR_NUM_REG                          ;
     173  sc_signal<Tspr_t             >  ** out_SPR_WDATA                            ;
     174  sc_signal<Tspr_t             >  **  in_SPR_RDATA                            ;
     175  sc_signal<Tcontrol_t         >  **  in_SPR_INVALID                          ;
     176
     177  sc_signal<Tcontrol_t         >  **  in_REEXECUTE_ROB_VAL                    ;
     178  sc_signal<Tcontrol_t         >  ** out_REEXECUTE_ROB_ACK                    ;
     179  sc_signal<Tcontext_t         >  **  in_REEXECUTE_ROB_CONTEXT_ID             ;
     180  sc_signal<Tcontext_t         >  **  in_REEXECUTE_ROB_FRONT_END_ID           ;
     181  sc_signal<Tpacket_t          >  **  in_REEXECUTE_ROB_PACKET_ID              ;
     182  sc_signal<Toperation_t       >  **  in_REEXECUTE_ROB_OPERATION              ;
     183  sc_signal<Ttype_t            >  **  in_REEXECUTE_ROB_TYPE                   ;
     184  sc_signal<Tlsq_ptr_t         >  **  in_REEXECUTE_ROB_STORE_QUEUE_PTR_WRITE  ;
     185
     186  sc_signal<Tcontrol_t         >  ** out_REEXECUTE_VAL                        ;
     187  sc_signal<Tcontrol_t         >  **  in_REEXECUTE_ACK                        ;
     188  sc_signal<Tcontext_t         >  ** out_REEXECUTE_CONTEXT_ID                 ;
     189  sc_signal<Tcontext_t         >  ** out_REEXECUTE_FRONT_END_ID               ;
     190  sc_signal<Tpacket_t          >  ** out_REEXECUTE_PACKET_ID                  ;
     191  sc_signal<Toperation_t       >  ** out_REEXECUTE_OPERATION                  ;
     192  sc_signal<Ttype_t            >  ** out_REEXECUTE_TYPE                       ;
     193  sc_signal<Tlsq_ptr_t         >  ** out_REEXECUTE_STORE_QUEUE_PTR_WRITE      ;
     194  sc_signal<Tlsq_ptr_t         >  ** out_REEXECUTE_STORE_QUEUE_PTR_READ       ;
     195  sc_signal<Tcontrol_t         >  ** out_REEXECUTE_STORE_QUEUE_EMPTY          ;
     196  sc_signal<Tlsq_ptr_t         >  ** out_REEXECUTE_LOAD_QUEUE_PTR_WRITE       ;
     197  sc_signal<Tcontrol_t         >  ** out_REEXECUTE_HAS_IMMEDIAT               ;
     198  sc_signal<Tgeneral_data_t    >  ** out_REEXECUTE_IMMEDIAT                   ;
     199  sc_signal<Tcontrol_t         >  ** out_REEXECUTE_READ_RA                    ;
     200  sc_signal<Tgeneral_address_t >  ** out_REEXECUTE_NUM_REG_RA                 ;
     201  sc_signal<Tcontrol_t         >  ** out_REEXECUTE_READ_RB                    ;
     202  sc_signal<Tgeneral_address_t >  ** out_REEXECUTE_NUM_REG_RB                 ;
     203  sc_signal<Tcontrol_t         >  ** out_REEXECUTE_READ_RC                    ;
     204  sc_signal<Tspecial_address_t >  ** out_REEXECUTE_NUM_REG_RC                 ;
     205  sc_signal<Tcontrol_t         >  ** out_REEXECUTE_WRITE_RD                   ;
     206  sc_signal<Tgeneral_address_t >  ** out_REEXECUTE_NUM_REG_RD                 ;
     207  sc_signal<Tcontrol_t         >  ** out_REEXECUTE_WRITE_RE                   ;
     208  sc_signal<Tspecial_address_t >  ** out_REEXECUTE_NUM_REG_RE                 ;
     209
    139210  ALLOC2_SC_SIGNAL( in_EXECUTE_LOOP_VAL                     ," in_EXECUTE_LOOP_VAL                   ",Tcontrol_t         ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]);
    140211  ALLOC2_SC_SIGNAL(out_EXECUTE_LOOP_ACK                     ,"out_EXECUTE_LOOP_ACK                   ",Tcontrol_t         ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]);
     
    192263  ALLOC1_SC_SIGNAL(out_REEXECUTE_TYPE                       ,"out_REEXECUTE_TYPE                     ",Ttype_t            ,_param->_nb_inst_reexecute);
    193264  ALLOC1_SC_SIGNAL(out_REEXECUTE_STORE_QUEUE_PTR_WRITE      ,"out_REEXECUTE_STORE_QUEUE_PTR_WRITE    ",Tlsq_ptr_t         ,_param->_nb_inst_reexecute);
     265  ALLOC1_SC_SIGNAL(out_REEXECUTE_STORE_QUEUE_PTR_READ       ,"out_REEXECUTE_STORE_QUEUE_PTR_READ     ",Tlsq_ptr_t         ,_param->_nb_inst_reexecute);
     266  ALLOC1_SC_SIGNAL(out_REEXECUTE_STORE_QUEUE_EMPTY          ,"out_REEXECUTE_STORE_QUEUE_EMPTY        ",Tcontrol_t         ,_param->_nb_inst_reexecute);
    194267  ALLOC1_SC_SIGNAL(out_REEXECUTE_LOAD_QUEUE_PTR_WRITE       ,"out_REEXECUTE_LOAD_QUEUE_PTR_WRITE     ",Tlsq_ptr_t         ,_param->_nb_inst_reexecute);
    195268  ALLOC1_SC_SIGNAL(out_REEXECUTE_HAS_IMMEDIAT               ,"out_REEXECUTE_HAS_IMMEDIAT             ",Tcontrol_t         ,_param->_nb_inst_reexecute);
     
    284357  INSTANCE1_SC_SIGNAL(_Reexecute_unit,out_REEXECUTE_TYPE                       ,_param->_nb_inst_reexecute);
    285358  INSTANCE1_SC_SIGNAL(_Reexecute_unit,out_REEXECUTE_STORE_QUEUE_PTR_WRITE      ,_param->_nb_inst_reexecute);
     359  INSTANCE1_SC_SIGNAL(_Reexecute_unit,out_REEXECUTE_STORE_QUEUE_PTR_READ       ,_param->_nb_inst_reexecute);
     360  INSTANCE1_SC_SIGNAL(_Reexecute_unit,out_REEXECUTE_STORE_QUEUE_EMPTY          ,_param->_nb_inst_reexecute);
    286361  if (_param->_have_port_load_queue_ptr)
    287362  INSTANCE1_SC_SIGNAL(_Reexecute_unit,out_REEXECUTE_LOAD_QUEUE_PTR_WRITE       ,_param->_nb_inst_reexecute);
     
    475550                TEST(Tcontrol_t        ,out_REEXECUTE_HAS_IMMEDIAT          [i]->read(), 1);
    476551                TEST(Tlsq_ptr_t        ,out_REEXECUTE_STORE_QUEUE_PTR_WRITE [i]->read(), 0);
     552                TEST(Tlsq_ptr_t        ,out_REEXECUTE_STORE_QUEUE_PTR_READ  [i]->read(), 0);
     553                TEST(Tlsq_ptr_t        ,out_REEXECUTE_STORE_QUEUE_EMPTY     [i]->read(), 0);
    477554                TEST(Tlsq_ptr_t        ,out_REEXECUTE_LOAD_QUEUE_PTR_WRITE  [i]->read(), 0);
    478555                TEST(Tcontrol_t        ,out_REEXECUTE_READ_RA               [i]->read(), 0);
     
    568645  DELETE1_SC_SIGNAL(out_REEXECUTE_TYPE                       ,_param->_nb_inst_reexecute);
    569646  DELETE1_SC_SIGNAL(out_REEXECUTE_STORE_QUEUE_PTR_WRITE      ,_param->_nb_inst_reexecute);
     647  DELETE1_SC_SIGNAL(out_REEXECUTE_STORE_QUEUE_PTR_READ       ,_param->_nb_inst_reexecute);
     648  DELETE1_SC_SIGNAL(out_REEXECUTE_STORE_QUEUE_EMPTY          ,_param->_nb_inst_reexecute);
    570649  DELETE1_SC_SIGNAL(out_REEXECUTE_LOAD_QUEUE_PTR_WRITE       ,_param->_nb_inst_reexecute);
    571650  DELETE1_SC_SIGNAL(out_REEXECUTE_HAS_IMMEDIAT               ,_param->_nb_inst_reexecute);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_statistics_deallocation.cpp

    r110 r128  
    2929    delete _stat;
    3030   
     31    delete [] _stat_bank_spr_nb_elt;
    3132    delete [] _stat_bank_gpr_nb_elt;
    3233 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/src/main.cpp

    r88 r128  
    6767     
    6868      test (name,param);
     69
     70      delete param;
    6971    }
    7072  catch (morpheo::ErrorMorpheo & error)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/src/test.cpp

    r112 r128  
    5050  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    5151  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     52
     53  sc_signal<Tcontrol_t        >  **  in_RENAME_VAL               ;
     54  sc_signal<Tcontrol_t        >  ** out_RENAME_ACK               ;
     55  sc_signal<Tcontext_t        >  **  in_RENAME_FRONT_END_ID      ;
     56  sc_signal<Tcontext_t        >  **  in_RENAME_CONTEXT_ID        ;
     57  sc_signal<Tgeneral_address_t>  **  in_RENAME_NUM_REG_RA_LOG    ;
     58  sc_signal<Tgeneral_address_t>  **  in_RENAME_NUM_REG_RB_LOG    ;
     59  sc_signal<Tspecial_address_t>  **  in_RENAME_NUM_REG_RC_LOG    ;
     60  sc_signal<Tgeneral_address_t>  **  in_RENAME_NUM_REG_RD_LOG    ;
     61  sc_signal<Tspecial_address_t>  **  in_RENAME_NUM_REG_RE_LOG    ;
     62  sc_signal<Tgeneral_address_t>  ** out_RENAME_NUM_REG_RA_PHY    ;
     63  sc_signal<Tgeneral_address_t>  ** out_RENAME_NUM_REG_RB_PHY    ;
     64  sc_signal<Tspecial_address_t>  ** out_RENAME_NUM_REG_RC_PHY    ;
     65  sc_signal<Tgeneral_address_t>  ** out_RENAME_NUM_REG_RD_PHY_OLD;
     66  sc_signal<Tspecial_address_t>  ** out_RENAME_NUM_REG_RE_PHY_OLD;
     67
     68  sc_signal<Tcontrol_t        >  **  in_INSERT_VAL               ;
     69  sc_signal<Tcontrol_t        >  ** out_INSERT_ACK               ;
     70//sc_signal<Tcontext_t        >  **  in_INSERT_FRONT_END_ID      ;
     71//sc_signal<Tcontext_t        >  **  in_INSERT_CONTEXT_ID        ;
     72  sc_signal<Tcontrol_t        >  **  in_INSERT_WRITE_RD          ;
     73  sc_signal<Tcontrol_t        >  **  in_INSERT_WRITE_RE          ;
     74  sc_signal<Tgeneral_address_t>  **  in_INSERT_NUM_REG_RD_LOG    ;
     75  sc_signal<Tspecial_address_t>  **  in_INSERT_NUM_REG_RE_LOG    ;
     76  sc_signal<Tgeneral_address_t>  **  in_INSERT_NUM_REG_RD_PHY    ;
     77  sc_signal<Tspecial_address_t>  **  in_INSERT_NUM_REG_RE_PHY    ;
     78
     79  sc_signal<Tcontrol_t        >  **  in_RETIRE_VAL               ;
     80  sc_signal<Tcontrol_t        >  ** out_RETIRE_ACK               ;
     81  sc_signal<Tcontext_t        >  **  in_RETIRE_FRONT_END_ID      ;
     82  sc_signal<Tcontext_t        >  **  in_RETIRE_CONTEXT_ID        ;
     83  sc_signal<Tcontrol_t        >  **  in_RETIRE_WRITE_RD          ;
     84  sc_signal<Tcontrol_t        >  **  in_RETIRE_WRITE_RE          ;
     85  sc_signal<Tgeneral_address_t>  **  in_RETIRE_NUM_REG_RD_LOG    ;
     86  sc_signal<Tspecial_address_t>  **  in_RETIRE_NUM_REG_RE_LOG    ;
     87  sc_signal<Tgeneral_address_t>  **  in_RETIRE_NUM_REG_RD_PHY_NEW;
     88  sc_signal<Tspecial_address_t>  **  in_RETIRE_NUM_REG_RE_PHY_NEW;
     89  sc_signal<Tcontrol_t        >  ** out_RETIRE_RESTORE_RD_PHY_OLD;
     90  sc_signal<Tcontrol_t        >  ** out_RETIRE_RESTORE_RE_PHY_OLD;
     91  sc_signal<Tcontrol_t        >  ** out_RETIRE_RESTORE           ;
     92
     93  sc_signal<Tcontrol_t        > ***  in_RETIRE_EVENT_VAL         ;
     94  sc_signal<Tcontrol_t        > *** out_RETIRE_EVENT_ACK         ;
     95  sc_signal<Tevent_state_t    > ***  in_RETIRE_EVENT_STATE       ;
    5296
    5397  ALLOC1_SC_SIGNAL( in_RENAME_VAL               ," in_RENAME_VAL               ",Tcontrol_t        ,_param->_nb_inst_insert);
     
    85129  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_LOG    ," in_RETIRE_NUM_REG_RD_LOG    ",Tgeneral_address_t,_param->_nb_inst_retire);
    86130  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_LOG    ," in_RETIRE_NUM_REG_RE_LOG    ",Tspecial_address_t,_param->_nb_inst_retire);
    87   ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_OLD," in_RETIRE_NUM_REG_RD_PHY_OLD",Tgeneral_address_t,_param->_nb_inst_retire);
    88   ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_OLD," in_RETIRE_NUM_REG_RE_PHY_OLD",Tspecial_address_t,_param->_nb_inst_retire);
     131  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_NEW," in_RETIRE_NUM_REG_RD_PHY_NEW",Tgeneral_address_t,_param->_nb_inst_retire);
     132  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_NEW," in_RETIRE_NUM_REG_RE_PHY_NEW",Tspecial_address_t,_param->_nb_inst_retire);
    89133  ALLOC1_SC_SIGNAL(out_RETIRE_RESTORE_RD_PHY_OLD,"out_RETIRE_RESTORE_RD_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
    90134  ALLOC1_SC_SIGNAL(out_RETIRE_RESTORE_RE_PHY_OLD,"out_RETIRE_RESTORE_RE_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
     
    144188  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RD_LOG    ,_param->_nb_inst_retire);
    145189  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RE_LOG    ,_param->_nb_inst_retire);
    146   INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RD_PHY_OLD,_param->_nb_inst_retire);
    147   INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RE_PHY_OLD,_param->_nb_inst_retire);
     190  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RD_PHY_NEW,_param->_nb_inst_retire);
     191  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RE_PHY_NEW,_param->_nb_inst_retire);
    148192  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_inst_retire);
    149193  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_inst_retire);
     
    272316              in_RETIRE_NUM_REG_RD_LOG     [i]->write(rand() % _param->_nb_general_register_logic);
    273317              in_RETIRE_NUM_REG_RE_LOG     [i]->write(rand() % _param->_nb_special_register_logic);
    274               in_RETIRE_NUM_REG_RD_PHY_OLD [i]->write(rand() % _param->_nb_general_register);
    275               in_RETIRE_NUM_REG_RE_PHY_OLD [i]->write(rand() % _param->_nb_special_register);
     318              in_RETIRE_NUM_REG_RD_PHY_NEW [i]->write(rand() % _param->_nb_general_register);
     319              in_RETIRE_NUM_REG_RE_PHY_NEW [i]->write(rand() % _param->_nb_special_register);
    276320
    277321              in_RETIRE_EVENT_STATE        [front_end_id][context_id]->write(EVENT_STATE_NO_EVENT);
     
    409453              in_RETIRE_NUM_REG_RD_LOG     [i]->write(rand() % _param->_nb_general_register_logic);
    410454              in_RETIRE_NUM_REG_RE_LOG     [i]->write(rand() % _param->_nb_special_register_logic);
    411               in_RETIRE_NUM_REG_RD_PHY_OLD [i]->write(rand() % _param->_nb_general_register);
    412               in_RETIRE_NUM_REG_RE_PHY_OLD [i]->write(rand() % _param->_nb_special_register);
     455              in_RETIRE_NUM_REG_RD_PHY_NEW [i]->write(rand() % _param->_nb_general_register);
     456              in_RETIRE_NUM_REG_RE_PHY_NEW [i]->write(rand() % _param->_nb_special_register);
    413457
    414458              in_RETIRE_EVENT_STATE [retire_front_end_id [i]][retire_context_id [i]]->write(EVENT_STATE_WAITEND);
     
    451495
    452496                      if (rat_gpr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] == false)
    453                         rat_gpr[front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] = in_RETIRE_NUM_REG_RD_PHY_OLD[i]->read();
     497                        rat_gpr[front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] = in_RETIRE_NUM_REG_RD_PHY_NEW[i]->read();
    454498                      rat_gpr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] = true;
    455499                    }
     
    459503
    460504                      if (rat_spr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] == false)
    461                         rat_spr[front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] = in_RETIRE_NUM_REG_RE_PHY_OLD[i]->read();
     505                        rat_spr[front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] = in_RETIRE_NUM_REG_RE_PHY_NEW[i]->read();
    462506                      rat_spr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] = true;
    463507                    }
     
    498542  delete in_NRESET;
    499543
    500   delete []  in_RENAME_VAL               ;
    501   delete [] out_RENAME_ACK               ;
    502   if (_param->_have_port_front_end_id)
    503   delete []  in_RENAME_FRONT_END_ID      ;
    504   if (_param->_have_port_context_id)
    505   delete []  in_RENAME_CONTEXT_ID        ;
    506   delete []  in_RENAME_NUM_REG_RA_LOG    ;
    507   delete []  in_RENAME_NUM_REG_RB_LOG    ;
    508   delete []  in_RENAME_NUM_REG_RC_LOG    ;
    509   delete []  in_RENAME_NUM_REG_RD_LOG    ;
    510   delete []  in_RENAME_NUM_REG_RE_LOG    ;
    511   delete [] out_RENAME_NUM_REG_RA_PHY    ;
    512   delete [] out_RENAME_NUM_REG_RB_PHY    ;
    513   delete [] out_RENAME_NUM_REG_RC_PHY    ;
    514   delete [] out_RENAME_NUM_REG_RD_PHY_OLD;
    515   delete [] out_RENAME_NUM_REG_RE_PHY_OLD;
    516 
    517   delete []  in_INSERT_VAL               ;
    518   delete [] out_INSERT_ACK               ;
    519 //if (_param->_have_port_front_end_id)
    520 //delete []  in_INSERT_FRONT_END_ID      ;
    521 //if (_param->_have_port_context_id)
    522 //delete []  in_INSERT_CONTEXT_ID        ;
    523   delete []  in_INSERT_WRITE_RD          ;
    524   delete []  in_INSERT_WRITE_RE          ;
    525   delete []  in_INSERT_NUM_REG_RD_LOG    ;
    526   delete []  in_INSERT_NUM_REG_RE_LOG    ;
    527   delete []  in_INSERT_NUM_REG_RD_PHY    ;
    528   delete []  in_INSERT_NUM_REG_RE_PHY    ;
    529 
    530   delete []  in_RETIRE_VAL               ;
    531   delete [] out_RETIRE_ACK               ;
    532   if (_param->_have_port_front_end_id)
    533   delete []  in_RETIRE_FRONT_END_ID      ;
    534   if (_param->_have_port_context_id)
    535   delete []  in_RETIRE_CONTEXT_ID        ;
    536   delete []  in_RETIRE_WRITE_RD          ;
    537   delete []  in_RETIRE_WRITE_RE          ;
    538   delete []  in_RETIRE_NUM_REG_RD_LOG    ;
    539   delete []  in_RETIRE_NUM_REG_RE_LOG    ;
    540   delete []  in_RETIRE_NUM_REG_RD_PHY_OLD;
    541   delete []  in_RETIRE_NUM_REG_RE_PHY_OLD;
    542   delete [] out_RETIRE_RESTORE_RD_PHY_OLD;
    543   delete [] out_RETIRE_RESTORE_RE_PHY_OLD;
    544   delete [] out_RETIRE_RESTORE           ;
    545 
    546   DELETE2_SC_SIGNAL( in_RETIRE_EVENT_VAL            ,_param->_nb_front_end, _param->_nb_context[it1]);
    547   DELETE2_SC_SIGNAL(out_RETIRE_EVENT_ACK            ,_param->_nb_front_end, _param->_nb_context[it1]);
    548   DELETE2_SC_SIGNAL( in_RETIRE_EVENT_STATE          ,_param->_nb_front_end, _param->_nb_context[it1]);
     544
     545  DELETE1_SC_SIGNAL( in_RENAME_VAL               ,_param->_nb_inst_insert);
     546  DELETE1_SC_SIGNAL(out_RENAME_ACK               ,_param->_nb_inst_insert);
     547  DELETE1_SC_SIGNAL( in_RENAME_FRONT_END_ID      ,_param->_nb_inst_insert);
     548  DELETE1_SC_SIGNAL( in_RENAME_CONTEXT_ID        ,_param->_nb_inst_insert);
     549  DELETE1_SC_SIGNAL( in_RENAME_NUM_REG_RA_LOG    ,_param->_nb_inst_insert);
     550  DELETE1_SC_SIGNAL( in_RENAME_NUM_REG_RB_LOG    ,_param->_nb_inst_insert);
     551  DELETE1_SC_SIGNAL( in_RENAME_NUM_REG_RC_LOG    ,_param->_nb_inst_insert);
     552  DELETE1_SC_SIGNAL( in_RENAME_NUM_REG_RD_LOG    ,_param->_nb_inst_insert);
     553  DELETE1_SC_SIGNAL( in_RENAME_NUM_REG_RE_LOG    ,_param->_nb_inst_insert);
     554  DELETE1_SC_SIGNAL(out_RENAME_NUM_REG_RA_PHY    ,_param->_nb_inst_insert);
     555  DELETE1_SC_SIGNAL(out_RENAME_NUM_REG_RB_PHY    ,_param->_nb_inst_insert);
     556  DELETE1_SC_SIGNAL(out_RENAME_NUM_REG_RC_PHY    ,_param->_nb_inst_insert);
     557  DELETE1_SC_SIGNAL(out_RENAME_NUM_REG_RD_PHY_OLD,_param->_nb_inst_insert);
     558  DELETE1_SC_SIGNAL(out_RENAME_NUM_REG_RE_PHY_OLD,_param->_nb_inst_insert);
     559
     560  DELETE1_SC_SIGNAL( in_INSERT_VAL               ,_param->_nb_inst_insert);
     561  DELETE1_SC_SIGNAL(out_INSERT_ACK               ,_param->_nb_inst_insert);
     562//DELETE1_SC_SIGNAL( in_INSERT_FRONT_END_ID      ,_param->_nb_inst_insert);
     563//DELETE1_SC_SIGNAL( in_INSERT_CONTEXT_ID        ,_param->_nb_inst_insert);
     564  DELETE1_SC_SIGNAL( in_INSERT_WRITE_RD          ,_param->_nb_inst_insert);
     565  DELETE1_SC_SIGNAL( in_INSERT_WRITE_RE          ,_param->_nb_inst_insert);
     566  DELETE1_SC_SIGNAL( in_INSERT_NUM_REG_RD_LOG    ,_param->_nb_inst_insert);
     567  DELETE1_SC_SIGNAL( in_INSERT_NUM_REG_RE_LOG    ,_param->_nb_inst_insert);
     568  DELETE1_SC_SIGNAL( in_INSERT_NUM_REG_RD_PHY    ,_param->_nb_inst_insert);
     569  DELETE1_SC_SIGNAL( in_INSERT_NUM_REG_RE_PHY    ,_param->_nb_inst_insert);
     570
     571  DELETE1_SC_SIGNAL( in_RETIRE_VAL               ,_param->_nb_inst_retire);
     572  DELETE1_SC_SIGNAL(out_RETIRE_ACK               ,_param->_nb_inst_retire);
     573  DELETE1_SC_SIGNAL( in_RETIRE_FRONT_END_ID      ,_param->_nb_inst_retire);
     574  DELETE1_SC_SIGNAL( in_RETIRE_CONTEXT_ID        ,_param->_nb_inst_retire);
     575  DELETE1_SC_SIGNAL( in_RETIRE_WRITE_RD          ,_param->_nb_inst_retire);
     576  DELETE1_SC_SIGNAL( in_RETIRE_WRITE_RE          ,_param->_nb_inst_retire);
     577  DELETE1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_LOG    ,_param->_nb_inst_retire);
     578  DELETE1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_LOG    ,_param->_nb_inst_retire);
     579  DELETE1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_NEW,_param->_nb_inst_retire);
     580  DELETE1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_NEW,_param->_nb_inst_retire);
     581  DELETE1_SC_SIGNAL(out_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_inst_retire);
     582  DELETE1_SC_SIGNAL(out_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_inst_retire);
     583  DELETE1_SC_SIGNAL(out_RETIRE_RESTORE           ,_param->_nb_inst_retire);
     584
     585  DELETE2_SC_SIGNAL( in_RETIRE_EVENT_VAL         ,_param->_nb_front_end,_param->_nb_context[it1]);
     586  DELETE2_SC_SIGNAL(out_RETIRE_EVENT_ACK         ,_param->_nb_front_end,_param->_nb_context[it1]);
     587  DELETE2_SC_SIGNAL( in_RETIRE_EVENT_STATE       ,_param->_nb_front_end,_param->_nb_context[it1]);
    549588#endif
    550589
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_transition.cpp

    r123 r128  
    3636              rat_gpr_not_speculative   [i][j][0] = 0;
    3737              rat_gpr_speculative_valid [i][j][0] = false;
     38              rat_gpr_speculative       [i][j][0] = 0    ; // not necessary
     39              rat_gpr_update_table      [i][j][0] = false; // not necessary
    3840
    3941              for (uint32_t k=1; k<_param->_nb_general_register_logic; k++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Parameters.cpp

    r112 r128  
    127127    log_printf(FUNC,Register_translation_unit,FUNCTION,"Begin");
    128128
    129     delete [] _param_dependency_checking_unit;
    130     delete [] _param_free_list_unit;
    131     delete [] _param_register_address_translation_unit;
    132     delete [] _param_stat_list_unit;   
    133     delete [] _param_register_translation_unit_glue;
     129    delete _param_dependency_checking_unit;
     130    delete _param_free_list_unit;
     131    delete _param_register_address_translation_unit;
     132    delete _param_stat_list_unit;   
     133    delete _param_register_translation_unit_glue;
    134134
    135135    log_printf(FUNC,Register_translation_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/SelfTest/src/main.cpp

    r112 r128  
    135135     
    136136      test (name,param);
     137     
     138      delete param;
    137139    }
    138140  catch (morpheo::ErrorMorpheo & error)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/SelfTest/src/test.cpp

    r121 r128  
    4848  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    4949
     50  sc_signal<Tcontrol_t        > ***  in_RENAME_IN_VAL               ;
     51  sc_signal<Tcontrol_t        > *** out_RENAME_IN_ACK               ;
     52  sc_signal<Tcontext_t        > ***  in_RENAME_IN_FRONT_END_ID      ;
     53  sc_signal<Tcontext_t        > ***  in_RENAME_IN_CONTEXT_ID        ;
     54  sc_signal<Tdepth_t          > ***  in_RENAME_IN_DEPTH             ;
     55  sc_signal<Ttype_t           > ***  in_RENAME_IN_TYPE              ;
     56  sc_signal<Toperation_t      > ***  in_RENAME_IN_OPERATION         ;
     57  sc_signal<Tcontrol_t        > ***  in_RENAME_IN_NO_EXECUTE        ;
     58  sc_signal<Tcontrol_t        > ***  in_RENAME_IN_LAST_EVENT        ;
     59  sc_signal<Tcontrol_t        > ***  in_RENAME_IN_IS_DELAY_SLOT     ;
     60  sc_signal<Tgeneral_data_t   > ***  in_RENAME_IN_ADDRESS           ;
     61  sc_signal<Tgeneral_data_t   > ***  in_RENAME_IN_ADDRESS_NEXT      ;
     62  sc_signal<Tcontrol_t        > ***  in_RENAME_IN_HAS_IMMEDIAT      ;
     63  sc_signal<Tgeneral_data_t   > ***  in_RENAME_IN_IMMEDIAT          ;
     64  sc_signal<Tcontrol_t        > ***  in_RENAME_IN_READ_RA           ;
     65  sc_signal<Tgeneral_address_t> ***  in_RENAME_IN_NUM_REG_RA        ;
     66  sc_signal<Tcontrol_t        > ***  in_RENAME_IN_READ_RB           ;
     67  sc_signal<Tgeneral_address_t> ***  in_RENAME_IN_NUM_REG_RB        ;
     68  sc_signal<Tcontrol_t        > ***  in_RENAME_IN_READ_RC           ;
     69  sc_signal<Tspecial_address_t> ***  in_RENAME_IN_NUM_REG_RC        ;
     70  sc_signal<Tcontrol_t        > ***  in_RENAME_IN_WRITE_RD          ;
     71  sc_signal<Tgeneral_address_t> ***  in_RENAME_IN_NUM_REG_RD        ;
     72  sc_signal<Tcontrol_t        > ***  in_RENAME_IN_WRITE_RE          ;
     73  sc_signal<Tspecial_address_t> ***  in_RENAME_IN_NUM_REG_RE        ;
     74  sc_signal<Texception_t      > ***  in_RENAME_IN_EXCEPTION_USE     ;
     75  sc_signal<Texception_t      > ***  in_RENAME_IN_EXCEPTION         ;
     76  sc_signal<Tcontrol_t        >  ** out_INSERT_VAL                  ;
     77  sc_signal<Tcontrol_t        >  **  in_INSERT_ACK                  ;
     78  sc_signal<Tcontext_t        >  ** out_INSERT_FRONT_END_ID         ;
     79  sc_signal<Tcontext_t        >  ** out_INSERT_CONTEXT_ID           ;
     80  sc_signal<Tdepth_t          >  ** out_INSERT_DEPTH                ;
     81  sc_signal<Ttype_t           >  ** out_INSERT_TYPE                 ;
     82  sc_signal<Toperation_t      >  ** out_INSERT_OPERATION            ;
     83  sc_signal<Tcontrol_t        >  ** out_INSERT_NO_EXECUTE           ;
     84  sc_signal<Tcontrol_t        >  ** out_INSERT_LAST_EVENT           ;
     85  sc_signal<Tcontrol_t        >  ** out_INSERT_IS_DELAY_SLOT        ;
     86  sc_signal<Tgeneral_data_t   >  ** out_INSERT_ADDRESS              ;
     87  sc_signal<Tgeneral_data_t   >  ** out_INSERT_ADDRESS_NEXT         ;
     88  sc_signal<Tcontrol_t        >  ** out_INSERT_HAS_IMMEDIAT         ;
     89  sc_signal<Tgeneral_data_t   >  ** out_INSERT_IMMEDIAT             ;
     90  sc_signal<Tlsq_ptr_t        >  ** out_INSERT_STORE_QUEUE_PTR_WRITE;
     91  sc_signal<Tlsq_ptr_t        >  ** out_INSERT_STORE_QUEUE_PTR_READ ;
     92  sc_signal<Tcontrol_t        >  ** out_INSERT_STORE_QUEUE_EMPTY    ;
     93  sc_signal<Tlsq_ptr_t        >  ** out_INSERT_LOAD_QUEUE_PTR_WRITE ;
     94  sc_signal<Tcontrol_t        >  ** out_INSERT_READ_RA              ;
     95  sc_signal<Tgeneral_address_t>  ** out_INSERT_NUM_REG_RA_LOG       ;
     96  sc_signal<Tgeneral_address_t>  ** out_INSERT_NUM_REG_RA_PHY       ;
     97  sc_signal<Tcontrol_t        >  ** out_INSERT_READ_RB              ;
     98  sc_signal<Tgeneral_address_t>  ** out_INSERT_NUM_REG_RB_LOG       ;
     99  sc_signal<Tgeneral_address_t>  ** out_INSERT_NUM_REG_RB_PHY       ;
     100  sc_signal<Tcontrol_t        >  ** out_INSERT_READ_RC              ;
     101  sc_signal<Tspecial_address_t>  ** out_INSERT_NUM_REG_RC_LOG       ;
     102  sc_signal<Tspecial_address_t>  ** out_INSERT_NUM_REG_RC_PHY       ;
     103  sc_signal<Tcontrol_t        >  ** out_INSERT_WRITE_RD             ;
     104  sc_signal<Tgeneral_address_t>  ** out_INSERT_NUM_REG_RD_LOG       ;
     105  sc_signal<Tgeneral_address_t>  ** out_INSERT_NUM_REG_RD_PHY_OLD   ;
     106  sc_signal<Tgeneral_address_t>  ** out_INSERT_NUM_REG_RD_PHY_NEW   ;
     107  sc_signal<Tcontrol_t        >  ** out_INSERT_WRITE_RE             ;
     108  sc_signal<Tspecial_address_t>  ** out_INSERT_NUM_REG_RE_LOG       ;
     109  sc_signal<Tspecial_address_t>  ** out_INSERT_NUM_REG_RE_PHY_OLD   ;
     110  sc_signal<Tspecial_address_t>  ** out_INSERT_NUM_REG_RE_PHY_NEW   ;
     111  sc_signal<Texception_t      >  ** out_INSERT_EXCEPTION_USE        ;
     112  sc_signal<Texception_t      >  ** out_INSERT_EXCEPTION            ;
     113  sc_signal<Tcontrol_t        >  **  in_RETIRE_VAL                  ;
     114  sc_signal<Tcontrol_t        >  ** out_RETIRE_ACK                  ;
     115  sc_signal<Tcontext_t        >  **  in_RETIRE_FRONT_END_ID         ;
     116  sc_signal<Tcontext_t        >  **  in_RETIRE_CONTEXT_ID           ;
     117//sc_signal<Ttype_t           >  **  in_RETIRE_TYPE                 ;
     118//sc_signal<Toperation_t      >  **  in_RETIRE_OPERATION            ;
     119  sc_signal<Tcontrol_t        >  **  in_RETIRE_USE_STORE_QUEUE      ;
     120  sc_signal<Tcontrol_t        >  **  in_RETIRE_USE_LOAD_QUEUE       ;
     121  sc_signal<Tlsq_ptr_t        >  **  in_RETIRE_STORE_QUEUE_PTR_WRITE;
     122  sc_signal<Tlsq_ptr_t        >  **  in_RETIRE_LOAD_QUEUE_PTR_WRITE ;
     123  sc_signal<Tcontrol_t        >  **  in_RETIRE_READ_RA              ;
     124  sc_signal<Tgeneral_address_t>  **  in_RETIRE_NUM_REG_RA_PHY       ;
     125  sc_signal<Tcontrol_t        >  **  in_RETIRE_READ_RB              ;
     126  sc_signal<Tgeneral_address_t>  **  in_RETIRE_NUM_REG_RB_PHY       ;
     127  sc_signal<Tcontrol_t        >  **  in_RETIRE_READ_RC              ;
     128  sc_signal<Tspecial_address_t>  **  in_RETIRE_NUM_REG_RC_PHY       ;
     129  sc_signal<Tcontrol_t        >  **  in_RETIRE_WRITE_RD             ;
     130  sc_signal<Tgeneral_address_t>  **  in_RETIRE_NUM_REG_RD_LOG       ;
     131  sc_signal<Tgeneral_address_t>  **  in_RETIRE_NUM_REG_RD_PHY_OLD   ;
     132  sc_signal<Tgeneral_address_t>  **  in_RETIRE_NUM_REG_RD_PHY_NEW   ;
     133  sc_signal<Tcontrol_t        >  **  in_RETIRE_WRITE_RE             ;
     134  sc_signal<Tspecial_address_t>  **  in_RETIRE_NUM_REG_RE_LOG       ;
     135  sc_signal<Tspecial_address_t>  **  in_RETIRE_NUM_REG_RE_PHY_OLD   ;
     136  sc_signal<Tspecial_address_t>  **  in_RETIRE_NUM_REG_RE_PHY_NEW   ;
     137  sc_signal<Tcontrol_t        > ***  in_RETIRE_EVENT_VAL            ;
     138  sc_signal<Tcontrol_t        > *** out_RETIRE_EVENT_ACK            ;
     139  sc_signal<Tevent_state_t    > ***  in_RETIRE_EVENT_STATE          ;
     140  sc_signal<Tspr_t            > ***  in_SPR_READ_SR                 ;
     141  sc_signal<bool              >   *  in_INFO_ROB_EMPTY              ;
     142
    50143  ALLOC2_SC_SIGNAL( in_RENAME_IN_VAL               ," in_RENAME_IN_VAL               ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
    51144  ALLOC2_SC_SIGNAL(out_RENAME_IN_ACK               ,"out_RENAME_IN_ACK               ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     
    56149  ALLOC2_SC_SIGNAL( in_RENAME_IN_OPERATION         ," in_RENAME_IN_OPERATION         ",Toperation_t      ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
    57150  ALLOC2_SC_SIGNAL( in_RENAME_IN_NO_EXECUTE        ," in_RENAME_IN_NO_EXECUTE        ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     151  ALLOC2_SC_SIGNAL( in_RENAME_IN_LAST_EVENT        ," in_RENAME_IN_LAST_EVENT        ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
    58152  ALLOC2_SC_SIGNAL( in_RENAME_IN_IS_DELAY_SLOT     ," in_RENAME_IN_IS_DELAY_SLOT     ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
    59 #ifdef DEBUG
    60153  ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS           ," in_RENAME_IN_ADDRESS           ",Tgeneral_data_t   ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
    61 #endif
    62154  ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS_NEXT      ," in_RENAME_IN_ADDRESS_NEXT      ",Tgeneral_data_t   ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
    63155  ALLOC2_SC_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT      ," in_RENAME_IN_HAS_IMMEDIAT      ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     
    83175  ALLOC1_SC_SIGNAL(out_INSERT_OPERATION            ,"out_INSERT_OPERATION            ",Toperation_t      ,_param->_nb_inst_insert);
    84176  ALLOC1_SC_SIGNAL(out_INSERT_NO_EXECUTE           ,"out_INSERT_NO_EXECUTE           ",Tcontrol_t        ,_param->_nb_inst_insert);
     177  ALLOC1_SC_SIGNAL(out_INSERT_LAST_EVENT           ,"out_INSERT_LAST_EVENT           ",Tcontrol_t        ,_param->_nb_inst_insert);
    85178  ALLOC1_SC_SIGNAL(out_INSERT_IS_DELAY_SLOT        ,"out_INSERT_IS_DELAY_SLOT        ",Tcontrol_t        ,_param->_nb_inst_insert);
    86 #ifdef DEBUG
    87179  ALLOC1_SC_SIGNAL(out_INSERT_ADDRESS              ,"out_INSERT_ADDRESS              ",Tgeneral_data_t   ,_param->_nb_inst_insert);
    88 #endif
    89180  ALLOC1_SC_SIGNAL(out_INSERT_ADDRESS_NEXT         ,"out_INSERT_ADDRESS_NEXT         ",Tgeneral_data_t   ,_param->_nb_inst_insert);
    90181  ALLOC1_SC_SIGNAL(out_INSERT_HAS_IMMEDIAT         ,"out_INSERT_HAS_IMMEDIAT         ",Tcontrol_t        ,_param->_nb_inst_insert);
    91182  ALLOC1_SC_SIGNAL(out_INSERT_IMMEDIAT             ,"out_INSERT_IMMEDIAT             ",Tgeneral_data_t   ,_param->_nb_inst_insert);
    92183  ALLOC1_SC_SIGNAL(out_INSERT_STORE_QUEUE_PTR_WRITE,"out_INSERT_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,_param->_nb_inst_insert);
     184  ALLOC1_SC_SIGNAL(out_INSERT_STORE_QUEUE_PTR_READ ,"out_INSERT_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t        ,_param->_nb_inst_insert);
     185  ALLOC1_SC_SIGNAL(out_INSERT_STORE_QUEUE_EMPTY    ,"out_INSERT_STORE_QUEUE_EMPTY    ",Tcontrol_t        ,_param->_nb_inst_insert);
    93186  ALLOC1_SC_SIGNAL(out_INSERT_LOAD_QUEUE_PTR_WRITE ,"out_INSERT_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t        ,_param->_nb_inst_insert);
    94187  ALLOC1_SC_SIGNAL(out_INSERT_READ_RA              ,"out_INSERT_READ_RA              ",Tcontrol_t        ,_param->_nb_inst_insert);
     
    139232  ALLOC2_SC_SIGNAL( in_RETIRE_EVENT_STATE          ," in_RETIRE_EVENT_STATE          ",Tevent_state_t    ,_param->_nb_front_end,_param->_nb_context[it1]);
    140233  ALLOC2_SC_SIGNAL( in_SPR_READ_SR                 ," in_SPR_READ_SR                 ",Tspr_t            ,_param->_nb_front_end,_param->_nb_context[it1]);
     234  ALLOC0_SC_SIGNAL( in_INFO_ROB_EMPTY              ," in_INFO_ROB_EMPTY              ",bool              );
    141235 
    142236  /********************************************************
     
    160254  INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_OPERATION         ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    161255  INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_NO_EXECUTE        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     256  INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_LAST_EVENT        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    162257  INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_IS_DELAY_SLOT     ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    163258#ifdef DEBUG
     
    191286  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_OPERATION            ,_param->_nb_inst_insert);
    192287  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_NO_EXECUTE           ,_param->_nb_inst_insert);
     288  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_LAST_EVENT           ,_param->_nb_inst_insert);
    193289  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_IS_DELAY_SLOT        ,_param->_nb_inst_insert);
    194290#ifdef DEBUG
     
    199295  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_IMMEDIAT             ,_param->_nb_inst_insert);
    200296  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_insert);
     297  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_STORE_QUEUE_PTR_READ ,_param->_nb_inst_insert);
     298  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_STORE_QUEUE_EMPTY    ,_param->_nb_inst_insert);
    201299  if (_param->_have_port_load_queue_ptr)
    202300  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_insert);
     
    261359  INSTANCE2_SC_SIGNAL(_Rename_unit,in_SPR_READ_SR                  ,_param->_nb_front_end, _param->_nb_context[it1]);
    262360
     361#ifdef DEBUG_TEST
     362  INSTANCE0_SC_SIGNAL(_Rename_unit,in_INFO_ROB_EMPTY               );
     363#endif
    263364
    264365  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    314415  DELETE2_SC_SIGNAL( in_RENAME_IN_OPERATION         ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    315416  DELETE2_SC_SIGNAL( in_RENAME_IN_NO_EXECUTE        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     417  DELETE2_SC_SIGNAL( in_RENAME_IN_LAST_EVENT        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    316418  DELETE2_SC_SIGNAL( in_RENAME_IN_IS_DELAY_SLOT     ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    317 #ifdef DEBUG
    318419  DELETE2_SC_SIGNAL( in_RENAME_IN_ADDRESS           ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    319 #endif
    320420  DELETE2_SC_SIGNAL( in_RENAME_IN_ADDRESS_NEXT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    321421  DELETE2_SC_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     
    342442  DELETE1_SC_SIGNAL(out_INSERT_OPERATION            ,_param->_nb_inst_insert);
    343443  DELETE1_SC_SIGNAL(out_INSERT_NO_EXECUTE           ,_param->_nb_inst_insert);
     444  DELETE1_SC_SIGNAL(out_INSERT_LAST_EVENT           ,_param->_nb_inst_insert);
    344445  DELETE1_SC_SIGNAL(out_INSERT_IS_DELAY_SLOT        ,_param->_nb_inst_insert);
    345 #ifdef DEBUG
    346446  DELETE1_SC_SIGNAL(out_INSERT_ADDRESS              ,_param->_nb_inst_insert);
    347 #endif
    348447  DELETE1_SC_SIGNAL(out_INSERT_ADDRESS_NEXT         ,_param->_nb_inst_insert);
    349448  DELETE1_SC_SIGNAL(out_INSERT_HAS_IMMEDIAT         ,_param->_nb_inst_insert);
    350449  DELETE1_SC_SIGNAL(out_INSERT_IMMEDIAT             ,_param->_nb_inst_insert);
    351450  DELETE1_SC_SIGNAL(out_INSERT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_insert);
     451  DELETE1_SC_SIGNAL(out_INSERT_STORE_QUEUE_PTR_READ ,_param->_nb_inst_insert);
     452  DELETE1_SC_SIGNAL(out_INSERT_STORE_QUEUE_EMPTY    ,_param->_nb_inst_insert);
    352453  DELETE1_SC_SIGNAL(out_INSERT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_insert);
    353454  DELETE1_SC_SIGNAL(out_INSERT_EXCEPTION_USE        ,_param->_nb_inst_insert);
     
    401502
    402503  DELETE2_SC_SIGNAL(in_SPR_READ_SR                  ,_param->_nb_front_end, _param->_nb_context[it1]);
     504
     505  DELETE0_SC_SIGNAL(in_INFO_ROB_EMPTY               );
    403506    }
    404507#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/src/test.cpp

    r117 r128  
    2020#endif
    2121
    22   simulation_init(0,0);
     22  simulation_init(0,0,0,false,false);
    2323
    2424  debug_idle_cycle = CYCLE_MAX;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/SelfTest/src/test.cpp

    r88 r128  
    4747  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    4848  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     49
     50  sc_signal<Tcontrol_t    >   **  in_SPR_ACCESS_VAL         ;
     51  sc_signal<Tcontrol_t    >   ** out_SPR_ACCESS_ACK         ;
     52  sc_signal<Tcontext_t    >   **  in_SPR_ACCESS_FRONT_END_ID;
     53  sc_signal<Tcontext_t    >   **  in_SPR_ACCESS_CONTEXT_ID  ;
     54  sc_signal<Tcontrol_t    >   **  in_SPR_ACCESS_WEN         ;
     55  sc_signal<Tspr_address_t>   **  in_SPR_ACCESS_NUM_GROUP   ;
     56  sc_signal<Tspr_address_t>   **  in_SPR_ACCESS_NUM_REG     ;
     57  sc_signal<Tspr_t        >   **  in_SPR_ACCESS_WDATA       ;
     58  sc_signal<Tspr_t        >   ** out_SPR_ACCESS_RDATA       ;
     59  sc_signal<Tcontrol_t    >   ** out_SPR_ACCESS_INVALID     ;
     60
     61  sc_signal<Tspr_t        >  *** out_SPR_READ_SR            ;
     62
     63  sc_signal<Tcontrol_t    >  ***  in_SPR_COMMIT_VAL         ;
     64  sc_signal<Tcontrol_t    >  *** out_SPR_COMMIT_ACK         ;
     65  sc_signal<Tcontrol_t    >  ***  in_SPR_COMMIT_SR_F_VAL    ;
     66  sc_signal<Tcontrol_t    >  ***  in_SPR_COMMIT_SR_F        ;
     67  sc_signal<Tcontrol_t    >  ***  in_SPR_COMMIT_SR_CY_VAL   ;
     68  sc_signal<Tcontrol_t    >  ***  in_SPR_COMMIT_SR_CY       ;
     69  sc_signal<Tcontrol_t    >  ***  in_SPR_COMMIT_SR_OV_VAL   ;
     70  sc_signal<Tcontrol_t    >  ***  in_SPR_COMMIT_SR_OV       ;
     71
     72  sc_signal<Tcontrol_t    >  ***  in_SPR_EVENT_VAL          ;
     73  sc_signal<Tcontrol_t    >  *** out_SPR_EVENT_ACK          ;
     74  sc_signal<Tspr_t        >  ***  in_SPR_EVENT_EPCR         ;
     75  sc_signal<Tcontrol_t    >  ***  in_SPR_EVENT_EEAR_WEN     ;
     76  sc_signal<Tspr_t        >  ***  in_SPR_EVENT_EEAR         ;
     77  sc_signal<Tcontrol_t    >  ***  in_SPR_EVENT_SR_DSX       ;
     78  sc_signal<Tcontrol_t    >  ***  in_SPR_EVENT_SR_TO_ESR    ;
    4979
    5080  ALLOC1_SC_SIGNAL( in_SPR_ACCESS_VAL         ," in_SPR_ACCESS_VAL         ",Tcontrol_t    ,_param->_nb_inst_reexecute);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/include/SPR.h

    r117 r128  
    578578  public : void   reset (void  )
    579579    {
     580      thread_id = 0; // not necessary
    580581    };
    581582  public : Tspr_t read  (void  )
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_deallocation.cpp

    r123 r128  
    158158
    159159    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     160    for (uint32_t i=0; i<_param->_nb_rename_unit; ++i)
     161    delete    _component_rename_unit [i]       ;
    160162    delete [] _component_rename_unit           ;
    161163    delete    _component_commit_unit           ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/Parameters.cpp

    r120 r128  
    411411    delete [] _link_front_end_with_rename_unit             ;
    412412
     413    for (uint32_t i=0; i<_nb_rename_unit; i++)
     414    delete    _param_rename_unit [i]      ;
    413415    delete [] _param_rename_unit          ;
    414416    delete    _param_commit_unit          ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Core_deallocation.cpp

    r123 r128  
    6161    delete _component;
    6262
    63 //     delete    _component_glue;
    64 //     delete    _component_dcache_access;
    65 //     delete    _component_icache_access;
    66 //     for (uint32_t i=0; i<_param->_nb_execute_loop; ++i)
    67 //     delete    _component_execute_loop [i];
    68 //     delete [] _component_execute_loop;
    69 //     for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i)
    70 //     delete    _component_ooo_engine [i];
    71 //     delete [] _component_ooo_engine;
    72 //     for (uint32_t i=0; i<_param->_nb_front_end; ++i)
    73 //     delete    _component_front_end [i];
    74 //     delete [] _component_front_end;
     63    delete    _component_glue;
     64    delete    _component_dcache_access;
     65    delete    _component_icache_access;
     66    for (uint32_t i=0; i<_param->_nb_execute_loop; ++i)
     67    delete    _component_execute_loop [i];
     68    delete [] _component_execute_loop;
     69    for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i)
     70    delete    _component_ooo_engine [i];
     71    delete [] _component_ooo_engine;
     72    for (uint32_t i=0; i<_param->_nb_front_end; ++i)
     73    delete    _component_front_end [i];
     74    delete [] _component_front_end;
    7575
    7676    log_end(Core,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters.cpp

    r123 r128  
    394394        _link_thread_with_context [x.first][x.second] = i;
    395395      }
     396
     397//     log_printf(TRACE,Core,FUNCTION,_("  * _link_decod_unit_with_decod_bloc"));
    396398    for (uint32_t i=0; i<_nb_decod_bloc; ++i)
    397399      {
    398400        pair_dual x = _link_decod_unit_with_decod_bloc[i];
    399401        _link_decod_bloc_with_decod_unit [x.first][x.second] = i;
     402//         log_printf(TRACE,Core,FUNCTION,_("    [%d][%d] -> %d"),x.first,x.second,i);
    400403      }
     404
    401405    for (uint32_t i=0; i<_nb_rename_bloc; ++i)
    402406      {
     
    803807    ALLOC2(_front_end_context_select_load_balancing       ,Tload_balancing_t,_nb_front_end,_nb_decod_unit[it1]);
    804808
     809    log_printf(TRACE,Core,FUNCTION,_("  * decod_unit"));
     810
    805811    for (uint32_t i=0; i<_nb_front_end; ++i)
    806812      {
     
    813819          {
    814820            uint32_t num_decod_bloc=_link_decod_bloc_with_decod_unit[i][j];
    815            
     821           
     822            log_printf(TRACE,Core,FUNCTION,_("  [%d][%d] -> %d"),i,j,num_decod_bloc);
     823 
    816824            _front_end_size_decod_queue              [i][j] = _size_decod_queue              [num_decod_bloc];
    817825            _front_end_decod_queue_scheme            [i][j] = _decod_queue_scheme            [num_decod_bloc];
     
    18271835          uint32_t num_load_store_unit = _list_load_store_unit_with_execute_unit [i][j];
    18281836         
    1829           uint32_t num_thread;
    1830           for (num_thread = 0; num_thread<_nb_thread; ++num_thread)
    1831             if (_link_load_store_unit_with_thread [num_thread] == num_load_store_unit)
    1832               break;
    1833          
     1837          {
     1838            uint32_t num_thread;
     1839            for (num_thread = 0; num_thread<_nb_thread; ++num_thread)
     1840              if (_link_load_store_unit_with_thread [num_thread] == num_load_store_unit)
     1841                break;
    18341842#ifdef DEBUG_TEST
    1835           if (num_thread == _nb_thread)
    1836             throw ERRORMORPHEO(FUNCTION,toString(_("Load_store_unit [%d] is not link with a thread.\n"),num_load_store_unit));
     1843            if (num_thread == _nb_thread)
     1844              throw ERRORMORPHEO(FUNCTION,toString(_("Load_store_unit [%d] is not link with a thread.\n"),num_load_store_unit));
    18371845#endif
     1846          }
     1847
    18381848          // init with an invalid thread_id
    18391849          for (uint32_t k=0; k<_dcache_access_nb_context [i]; ++k)
     
    18581868                      uint32_t num_thread = _link_thread_with_context [num_front_end][num_context];
    18591869                     
    1860                       uint32_t index = ((num_ooo_engine<<(_size_context_id + _size_front_end_id )) |
    1861                                         (num_front_end <<(_size_context_id)) |
    1862                                         (num_context));
    1863                      
    1864                       _dcache_access_translate_load_store_unit_to_thread [i][j][index] = num_thread;
     1870                      if (_link_load_store_unit_with_thread [num_thread] == num_load_store_unit)
     1871                        {
     1872                          uint32_t index = ((num_ooo_engine<<(_size_context_id + _size_front_end_id )) |
     1873                                            (num_front_end <<(_size_context_id)) |
     1874                                            (num_context));
     1875                         
     1876                          _dcache_access_translate_load_store_unit_to_thread [i][j][index] = num_thread;
     1877                        }
    18651878                    }
    18661879                }
     
    19601973        _nb_thread                                 ,
    19611974        _link_thread_with_context               [i]
    1962         );
     1975         );
    19631976
    19641977    ALLOC1(_nb_inst_issue_queue,uint32_t,_nb_ooo_engine);
     
    21812194    log_begin(Core,FUNCTION);
    21822195
    2183 //     for (uint32_t i=0; i<_nb_front_end; ++i)
    2184 //     delete    _param_front_end [i];
    2185 //     delete [] _param_front_end;
    2186 //     for (uint32_t i=0; i<_nb_ooo_engine; ++i)
    2187 //     delete    _param_ooo_engine [i];
    2188 //     delete [] _param_ooo_engine;
    2189 //     for (uint32_t i=0; i<_nb_execute_loop; ++i)
    2190 //     delete    _param_execute_loop [i];
    2191 //     delete [] _param_execute_loop;
    2192 //     delete    _param_icache_access;
    2193 //     delete    _param_dcache_access;
    2194 //     delete    _param_glue;
    2195 
     2196    for (uint32_t i=0; i<_nb_front_end; ++i)
     2197    delete    _param_front_end [i];
     2198    delete [] _param_front_end;
     2199    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
     2200    delete    _param_ooo_engine [i];
     2201    delete [] _param_ooo_engine;
     2202    for (uint32_t i=0; i<_nb_execute_loop; ++i)
     2203    delete    _param_execute_loop [i];
     2204    delete [] _param_execute_loop;
     2205    delete    _param_icache_access;
     2206    delete    _param_dcache_access;
     2207    delete    _param_glue;
     2208
     2209    DELETE1(_nb_inst_issue_queue                                    ,_nb_ooo_engine);
     2210    DELETE1(_issue_queue_in_order                                   ,_nb_ooo_engine);
    21962211    DELETE3(_dcache_access_translate_load_store_unit_to_thread      ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1],_dcache_access_nb_context[it1]);
    21972212    DELETE1(_dcache_access_nb_context                               ,_nb_execute_loop);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters_msg_error.cpp

    r117 r128  
    5959      // set link
    6060      for (uint32_t i=0; i<_nb_decod_bloc; ++i)
    61         nb_link_decod_unit[_link_decod_unit_with_decod_bloc[i].first][_link_decod_unit_with_decod_bloc[i].second] ++;
    62 
     61        {
     62          uint32_t num_front_end  = _link_decod_unit_with_decod_bloc[i].first;
     63          uint32_t num_decod_unit = _link_decod_unit_with_decod_bloc[i].second;
     64
     65          bool error = false;
     66
     67          if (num_front_end >= _nb_front_end)
     68            {
     69              error = true;
     70              test.error(toString(_("Decod_bloc [%d] is connected with an invalid front_end (%d).\n"),i,num_front_end));
     71            }
     72
     73          if (num_decod_unit >= _nb_decod_unit[num_front_end])
     74            {
     75              error = true;
     76              test.error(toString(_("Decod_bloc [%d] is connected with an invalid decod_unit (%d.%d).\n"),i,num_front_end,num_decod_unit));
     77            }
     78
     79          if (not error)
     80            nb_link_decod_unit[num_front_end][num_decod_unit] ++;
     81        }
    6382      // test
    6483      for (uint32_t i=0; i<_nb_front_end; ++i)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/src/main.cpp

    r113 r128  
    5656     
    5757      test (name,param);
     58
     59      delete param;
    5860    }
    5961  catch (morpheo::ErrorMorpheo & error)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h

    r82 r128  
    55 * $Id$
    66 *
    7  * [ Description ]
     7 * [ Description ]
    88 *
    99 */
     
    1818
    1919//   typedef uint32_t Taddress_t;
    20   typedef uint32_t Tdata_t;
     20  typedef Tgeneral_data_t Tdata_t;
    2121 
    2222}; // end namespace registerfile_monolithic
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp

    r111 r128  
    2222    log_function(RegisterFile_Monolithic,FUNCTION,_name.c_str());
    2323
    24     if (_param->_have_init_value and (PORT_READ(in_NRESET) == 0))
     24    if (PORT_READ(in_NRESET) == 0)
    2525      {
    26         for (uint32_t i=0; i<_param->_nb_word; ++i)
    27           reg_DATA[i] = fromString<Tdata_t>(_param->_init_value);
     26        if (_param->_have_init_value)
     27          {
     28            for (uint32_t i=0; i<_param->_nb_word; ++i)
     29              reg_DATA[i] = fromString<Tdata_t>(_param->_init_value);
     30          }
     31        else
     32          {
     33            for (uint32_t i=0; i<_param->_nb_word; ++i)
     34              reg_DATA[i] = 0;
     35          }
    2836      }
    2937    else
     
    3139        for (uint32_t i=0; i<_param->_nb_port_write; i++)
    3240          {
     41            log_printf(TRACE,RegisterFile,FUNCTION,"  * WRITE [%d] : %d",i,PORT_READ(in_WRITE_VAL[i]));
     42
    3343            // Have a write?
    3444            if ( PORT_READ(in_WRITE_VAL[i]) == true)
     
    3848                  (*_stat_nb_write) ++;
    3949#endif   
    40                
     50
    4151                Taddress_t address = (_param->_have_port_address)?PORT_READ(in_WRITE_ADDRESS[i]):0;
    4252                Tdata_t    data    = PORT_READ(in_WRITE_DATA   [i]);
     53
     54                log_printf(TRACE,RegisterFile,FUNCTION,"    * address : %d",address);
     55                log_printf(TRACE,RegisterFile,FUNCTION,"    * gloup");
     56                log_printf(TRACE,RegisterFile,FUNCTION,"    * data    : %d",data);
    4357               
    4458                log_printf(TRACE,RegisterFile,FUNCTION,"  * [%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));
     59
     60#ifdef DEBUG_TEST
     61                if (address >= _param->_nb_word)
     62                  throw ERRORMORPHEO(FUNCTION,toString(_("Address (%d) is invalid (size : %d).\n"),address,_param->_nb_word));
     63#endif
    4564               
    4665                // Write in registerFile
     
    5069        for (uint32_t i=0; i<_param->_nb_port_read_write; i++)
    5170          {
     71            log_printf(TRACE,RegisterFile,FUNCTION,"  * READ_WRITE [%d] : %d",i,PORT_READ(in_READ_WRITE_VAL[i]));
     72
    5273            // Have a read_write?
    5374            if (PORT_READ(in_READ_WRITE_VAL[i]) == true)
     
    6586                    log_printf(TRACE,RegisterFile,FUNCTION,"  * [%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));
    6687                   
     88
     89#ifdef DEBUG_TEST
     90                if (address >= _param->_nb_word)
     91                  throw ERRORMORPHEO(FUNCTION,toString(_("Address (%d) is invalid (size : %d).\n"),address,_param->_nb_word));
     92#endif
     93
    6794                    // Write in registerFile
    6895                    reg_DATA[address] = data;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h

    r82 r128  
    55 * $Id$
    66 *
    7  * [ Description ]
     7 * [ Description ]
    88 *
    99 */
     
    1919
    2020//typedef uint32_t Taddress_t;
    21   typedef uint32_t Tdata_t;
     21  typedef Tgeneral_data_t Tdata_t;
    2222
    2323}; // end namespace registerfile_multi_banked
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_transition.cpp

    r124 r128  
    2525    // call function pointer
    2626//     (this->*function_transition) ();
    27     if (_param->_have_init_value and (PORT_READ(in_NRESET) == 0))
     27    if (PORT_READ(in_NRESET) == 0)
    2828      {
    29         for (uint32_t i=0; i<_param->_nb_bank; ++i)
    30           for (uint32_t j=0; j<_param->_nb_word; ++j)
    31           reg_DATA[i][j] = fromString<Tdata_t>(_param->_init_value);
     29        if (_param->_have_init_value)
     30          {
     31            for (uint32_t i=0; i<_param->_nb_bank; ++i)
     32              for (uint32_t j=0; j<_param->_nb_word; ++j)
     33                reg_DATA[i][j] = fromString<Tdata_t>(_param->_init_value);
     34          }
     35        else
     36          {
     37            for (uint32_t i=0; i<_param->_nb_bank; ++i)
     38              for (uint32_t j=0; j<_param->_nb_word; ++j)
     39                reg_DATA[i][j] = 0;
     40          }
    3241      }
    3342    else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_deallocation.cpp

    r81 r128  
    2222    delete in_NRESET;
    2323    // ----- Interface Read
     24    for (uint32_t i=0; i<_param->_nb_port_read; i++)
     25      {
     26    delete     in_READ_VAL    [i];
     27    delete    out_READ_ACK    [i];
     28    if (_param->_have_port_address == true)
     29    delete     in_READ_ADDRESS[i];
     30    delete    out_READ_DATA   [i];
     31      }
     32
    2433    delete []  in_READ_VAL    ;
    2534    delete [] out_READ_ACK    ;
     
    2938
    3039    // ----- Interface Write
     40    for (uint32_t i=0; i<_param->_nb_port_write; i++)
     41      {
     42    delete     in_WRITE_VAL    [i];
     43    delete    out_WRITE_ACK    [i];
     44    if (_param->_have_port_address == true)
     45    delete     in_WRITE_ADDRESS[i];
     46    delete     in_WRITE_DATA   [i];
     47      }
     48
    3149    delete []  in_WRITE_VAL    ;
    3250    delete [] out_WRITE_ACK    ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort.cpp

    r123 r128  
    7171    if (usage_is_set(_usage,USE_SYSTEMC))
    7272      {
     73# if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    7374        log_printf(INFO,Sort,FUNCTION,"Method - transition");
    7475
     
    7778        sensitive << (*(in_CLOCK)).pos();
    7879       
    79 # ifdef SYSTEMCASS_SPECIFIC
     80#  ifdef SYSTEMCASS_SPECIFIC
    8081        // List dependency information
    81 # endif   
     82#  endif   
     83# endif
    8284
    8385        log_printf(INFO,Sort,FUNCTION,"Method - genMealy");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_transition.cpp

    r81 r128  
    1414namespace generic {
    1515namespace sort {
    16 
    1716
    1817#undef  FUNCTION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Types.h

    r81 r128  
    4747  public  : entry_t ()
    4848    {
     49      _entry = NULL;
    4950    };
    5051  public  : entry_t (uint32_t size) : _size (size)
     
    5354     
    5455      // initialisation
    55       for (uint32_t i=0; i<size; i++)
    56         _entry [i] = false;
     56      reset ();
    5757    }
    5858   
    5959  public : ~entry_t ()
    6060    {
    61       delete _entry;
     61      if (_entry != NULL)
     62        delete [] _entry;
     63    }
     64
     65  public : void reset ()
     66    {
     67      // initialisation
     68      for (uint32_t i=0; i<_size; i++)
     69        _entry [i] = false;
    6270    }
    6371   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_deallocation.cpp

    r112 r128  
    2929    DELETE1_SIGNAL(out_ACCESS_VICTIM ,_param->_nb_access,log2(_param->_nb_entity   ));
    3030
    31     DELETE1(reg_TABLE             ,_param->_size_table);
     31    for (uint32_t i=0; i<_param->_size_table; i++)
     32    delete    reg_TABLE [i];
     33    delete [] reg_TABLE;
     34       
    3235    DELETE1(internal_ACCESS_ACK   ,_param->_nb_access);
    3336    DELETE1(internal_ACCESS_VICTIM,_param->_nb_access);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_genMealy.cpp

    r123 r128  
    2222        Taddress_t address = (_param->_size_table>1)?PORT_READ(in_ACCESS_ADDRESS[i]):0;
    2323
     24#ifdef DEBUG_TEST
     25        if (address >= _param->_size_table)
     26          throw ERRORMORPHEO(FUNCTION,toString(_("Address (%d) is invalid (size : %d).\n"),address,_param->_size_table));
     27#endif
     28
    2429        internal_ACCESS_VICTIM[i] = reg_TABLE[address]->access();
    2530
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_transition.cpp

    r123 r128  
    1717  void Victim_Pseudo_LRU::transition (void)
    1818  {
    19     for (uint32_t i=0; i<_param->_nb_access; i++)
     19
     20    if (PORT_READ(in_NRESET) == 0)
    2021      {
    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  = 0;
     22        for (uint32_t i=0; i<_param->_size_table; ++i)
     23          reg_TABLE[i]->reset();
     24      }
     25    else
     26      {
     27        for (uint32_t i=0; i<_param->_nb_access; i++)
     28          {
     29            if (PORT_READ (in_ACCESS_VAL[i]) and internal_ACCESS_ACK)
     30              {
     31                Taddress_t address = (_param->_size_table>1)?PORT_READ(in_ACCESS_ADDRESS[i]):0;
     32                Tentity_t  entity  = 0;
     33               
     34                if (PORT_READ(in_ACCESS_HIT [i]))
     35                  {
     36                    // Hit  : don't need a victim
     37// #ifdef STATISTICS
     38//                  _stat_nb_update ++;
     39// #endif
     40                    entity = PORT_READ(in_ACCESS_ENTITY[i]);
     41                  }
     42                else
     43                  {
     44                    // Miss : need victim
     45// #ifdef STATISTICS
     46//                  _stat_nb_access ++;
     47// #endif
     48                    entity = internal_ACCESS_VICTIM[i];
     49                  }
     50               
     51#ifdef DEBUG_TEST
     52                if (address >= _param->_size_table)
     53                  throw ERRORMORPHEO(FUNCTION,toString(_("Address (%d) is invalid (size : %d).\n"),address, _param->_size_table));
     54#endif
     55                reg_TABLE[address]->update(entity);
     56              }
     57          }//end for i
     58      }
    2559
    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               }
    42 
    43             reg_TABLE[address]->update(entity);
    44           }
    45       }//end for i
    46    
    4760#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    4861    end_cycle ();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_deallocation.cpp

    r112 r128  
    3838        delete    in_NRESET;
    3939
     40        for (uint32_t i=0; i<_param->_nb_access; ++i)
     41          {
     42        delete     in_ACCESS_VAL    [i];
     43        delete    out_ACCESS_ACK    [i];
     44        if (_param->_have_port_address)
     45        delete     in_ACCESS_ADDRESS[i];
     46        delete     in_ACCESS_HIT    [i];
     47        delete     in_ACCESS_ENTITY [i];
     48        delete    out_ACCESS_VICTIM [i];
     49          }
     50
    4051        delete []  in_ACCESS_VAL    ;
    4152        delete [] out_ACCESS_ACK    ;
     
    4758      }
    4859
    49 
    5060    log_printf(FUNC,Victim,FUNCTION,"End");
    5161  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest

    r117 r128  
    2525#MODELTECH_LIBRARY               = $(LIBRARY)
    2626
    27 EXEC_PREFIX                     =
    28 #$(VALGRIND)
     27EXEC_PREFIX                     = $(VALGRIND)
    2928EXEC_PARAMS                     = $(SYSTEMC_EXEC_PARAMS_$(SIMULATOR_SYSTEMC))
    3029EXEC_LOG                        = $(patsubst $(DIR_CFG_GEN)/%.cfg,$(DIR_LOG)/%.exec.log,$(wildcard $(DIR_CFG_GEN)/*.cfg))       \
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h

    r122 r128  
    1515// ======================================================================
    1616#define ALLOC0(var,type)                        \
    17   var = new type
    18 
    19 #define ALLOC1(var,type,s1)                      \
    20   var = new type [s1]
    21  
     17  do                                            \
     18    {                                           \
     19      var = new type;                           \
     20    } while (0)
     21
     22#define ALLOC1(var,type,s1)                     \
     23  do                                            \
     24    {                                           \
     25      var = new type [s1];                      \
     26    } while (0)
     27
    2228#define ALLOC2(var,type,s1,s2)                   \
    23   var = new type * [s1];                         \
    24   for (uint32_t it1=0; it1<s1; ++it1)            \
     29  do                                             \
    2530    {                                            \
    26       var [it1] = new type [s2];                 \
    27     }
     31      var = new type * [s1];                     \
     32      for (uint32_t it1=0; it1<s1; ++it1)        \
     33        {                                        \
     34          var [it1] = new type [s2];             \
     35        }                                        \
     36    } while (0)
    2837
    2938#define ALLOC3(var,type,s1,s2,s3)                \
    30   var = new type ** [s1];                        \
    31   for (uint32_t it1=0; it1<s1; ++it1)            \
     39  do                                             \
    3240    {                                            \
    33       var [it1] = new type * [s2];               \
    34       for (uint32_t it2=0; it2<s2; ++it2)        \
     41      var = new type ** [s1];                    \
     42      for (uint32_t it1=0; it1<s1; ++it1)        \
    3543        {                                        \
    36           var [it1][it2] = new type [s3];        \
     44          var [it1] = new type * [s2];           \
     45          for (uint32_t it2=0; it2<s2; ++it2)    \
     46            {                                    \
     47              var [it1][it2] = new type [s3];    \
     48            }                                    \
    3749        }                                        \
    38     }
    39  
     50    } while (0)
     51
    4052#define ALLOC4(var,type,s1,s2,s3,s4)                    \
    41   var = new type *** [s1];                              \
    42   for (uint32_t it1=0; it1<s1; ++it1)                   \
     53  do                                                    \
    4354    {                                                   \
    44       var [it1] = new type ** [s2];                     \
    45       for (uint32_t it2=0; it2<s2; ++it2)               \
     55      var = new type *** [s1];                          \
     56      for (uint32_t it1=0; it1<s1; ++it1)               \
    4657        {                                               \
    47           var [it1][it2] = new type * [s3];             \
    48           for (uint32_t it3=0; it3<s3; ++it3)           \
     58          var [it1] = new type ** [s2];                 \
     59          for (uint32_t it2=0; it2<s2; ++it2)           \
    4960            {                                           \
    50               var [it1][it2][it3] = new type [s4];      \
     61              var [it1][it2] = new type * [s3];         \
     62              for (uint32_t it3=0; it3<s3; ++it3)       \
     63                {                                       \
     64                  var [it1][it2][it3] = new type [s4];  \
     65                }                                       \
    5166            }                                           \
    5267        }                                               \
    53     }
     68    } while (0)
    5469
    5570#define DELETE0(var)                            \
    56   delete var;
    57  
    58 #define DELETE1(var,s1)                          \
    59   delete [] var;
    60 
    61 #define DELETE2(var,s1,s2)                       \
    62   for (uint32_t it1=0; it1<s1; ++it1)            \
     71  do                                            \
     72    {                                           \
     73      delete var;                               \
     74    } while (0)
     75
     76#define DELETE1(var,s1)                         \
     77  do                                            \
     78    {                                           \
     79      delete [] var;                            \
     80    } while (0)
     81
     82#define DELETE2(var,s1,s2)                      \
     83  do                                            \
    6384    {                                            \
    64       delete [] var [it1];                       \
    65     }                                            \
    66   delete [] var;                         
    67  
     85      for (uint32_t it1=0; it1<s1; ++it1)        \
     86        {                                        \
     87          delete [] var [it1];                   \
     88        }                                        \
     89      delete [] var;                             \
     90    } while (0)
     91
    6892#define DELETE3(var,s1,s2,s3)                    \
    69   for (uint32_t it1=0; it1<s1; ++it1)            \
     93  do                                             \
    7094    {                                            \
    71       for (uint32_t it2=0; it2<s2; ++it2)        \
     95      for (uint32_t it1=0; it1<s1; ++it1)        \
    7296        {                                        \
    73           delete [] var [it1][it2];              \
     97          for (uint32_t it2=0; it2<s2; ++it2)    \
     98            {                                    \
     99              delete [] var [it1][it2];          \
     100            }                                    \
     101          delete [] var [it1];                   \
    74102        }                                        \
    75       delete [] var [it1];                       \
    76     }                                            \
    77   delete [] var;
    78  
    79 #define DELETE4(var,s1,s2,s3,s4)                 \
    80   for (uint32_t it1=0; it1<s1; ++it1)            \
    81     {                                            \
    82       for (uint32_t it2=0; it2<s2; ++it2)        \
    83         {                                        \
    84           for (uint32_t it3=0; it3<s3; ++it3)    \
    85             {                                    \
    86               delete [] var [it1][it2][it3];     \
    87             }                                    \
    88           delete [] var [it1][it2];              \
    89         }                                        \
    90       delete [] var [it1];                       \
    91     }                                            \
    92   delete [] var;                                       
     103      delete [] var;                             \
     104    } while (0)
     105
     106#define DELETE4(var,s1,s2,s3,s4)                        \
     107  do                                                    \
     108    {                                                   \
     109      for (uint32_t it1=0; it1<s1; ++it1)               \
     110        {                                               \
     111          for (uint32_t it2=0; it2<s2; ++it2)           \
     112            {                                           \
     113              for (uint32_t it3=0; it3<s3; ++it3)       \
     114                {                                       \
     115                  delete [] var [it1][it2][it3];        \
     116                }                                       \
     117              delete [] var [it1][it2];                 \
     118            }                                           \
     119          delete [] var [it1];                          \
     120        }                                               \
     121      delete [] var;                                    \
     122    } while (0)
    93123
    94124// ======================================================================
     
    108138
    109139#define __ALLOC0_SIGNAL(sig, name, type)        \
    110   {                                             \
    111     sig = new type (name);                      \
    112   }
     140  do                                            \
     141    {                                           \
     142      sig = new type (name);                    \
     143    } while (0)
    113144
    114145#ifdef POSITION
     
    125156
    126157#define ALLOC0_VAL_ACK_IN(  sig, name, type)                            \
    127   {                                                                     \
    128     sig = interface->set_signal_valack_in (name, type);                 \
    129   }                                                                     
     158  do                                                                    \
     159    {                                                                   \
     160      sig = interface->set_signal_valack_in (name, type);               \
     161    } while (0)
     162
    130163#define ALLOC0_VAL_ACK_OUT( sig, name, type)                            \
    131   {                                                                     \
    132     sig = interface->set_signal_valack_out(name, type);                 \
    133   }                                                                     
     164  do                                                                    \
     165    {                                                                   \
     166      sig = interface->set_signal_valack_out(name, type);               \
     167    } while (0)
     168                                                                 
    134169#define ALLOC0_VALACK_IN(     sig, type)                                \
    135   {                                                                     \
    136     sig = interface->set_signal_valack_in (type);                       \
    137   }                                                                     
    138 #define ALLOC0_VALACK_OUT(    sig, type)                                 \
    139   {                                                                     \
    140     sig = interface->set_signal_valack_out(type);                       \
    141   }                                                                     
    142 #define ALLOC0_SIGNAL_IN(  sig, name, type, size)                        \
    143   if (size > 0)                                                         \
    144     {                                                                   \
    145       sig = interface->set_signal_in <type> (name, size);               \
    146     }                                                                   \
    147   else                                                                  \
    148     {                                                                   \
    149       PRINT_SIZE_NUL(_component,interface,name);                        \
    150     }
    151  
    152 #define ALLOC0_SIGNAL_OUT( sig, name, type, size)                        \
    153   if (size > 0)                                                         \
    154     {                                                                   \
    155       sig = interface->set_signal_out<type> (name, size);               \
    156     }                                                                   \
    157   else                                                                  \
    158     {                                                                   \
    159       PRINT_SIZE_NUL(_component,interface,name); \
    160     }
     170  do                                                                    \
     171    {                                                                   \
     172      sig = interface->set_signal_valack_in (type);                     \
     173    } while (0)
     174                                                                   
     175#define ALLOC0_VALACK_OUT(    sig, type)                                \
     176  do                                                                    \
     177    {                                                                   \
     178      sig = interface->set_signal_valack_out(type);                     \
     179    } while (0)
     180                                                                     
     181#define ALLOC0_SIGNAL_IN(  sig, name, type, size)                       \
     182  do                                                                    \
     183    {                                                                   \
     184      if (size > 0)                                                     \
     185        {                                                               \
     186          sig = interface->set_signal_in <type> (name, size);           \
     187        }                                                               \
     188      else                                                              \
     189        {                                                               \
     190          PRINT_SIZE_NUL(_component,interface,name);                    \
     191        }                                                               \
     192    } while (0)
     193
     194#define ALLOC0_SIGNAL_OUT( sig, name, type, size)                       \
     195  do                                                                    \
     196    {                                                                   \
     197      if (size > 0)                                                     \
     198        {                                                               \
     199          sig = interface->set_signal_out<type> (name, size);           \
     200        }                                                               \
     201      else                                                              \
     202        {                                                               \
     203          PRINT_SIZE_NUL(_component,interface,name);                    \
     204        }                                                               \
     205    } while (0)
    161206
    162207#define DELETE0_SIGNAL( sig, size)                                      \
    163   if (size > 0)                                                         \
    164     {                                                                   \
     208  do                                                                    \
     209    {                                                                   \
     210      if (size > 0)                                                     \
     211        {                                                               \
     212          delete sig;                                                   \
     213        }                                                               \
     214    } while (0)
     215
     216#define ALLOC0_FOREIGN_SIGNAL_IN(  sig, interface, name, type, size)    \
     217  do                                                                    \
     218    {                                                                   \
     219      if (size > 0)                                                     \
     220        {                                                               \
     221          std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(name)); \
     222          sig = new SC_IN    (type) (str.c_str());                      \
     223        }                                                               \
     224    } while (0)
     225
     226#define ALLOC0_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size)    \
     227  do                                                                    \
     228    {                                                                   \
     229      if (size > 0)                                                     \
     230        {                                                               \
     231          std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(name)); \
     232          sig = new SC_OUT   (type) (str.c_str());                      \
     233        }                                                               \
     234    } while (0)
     235
     236#define DELETE0_FOREIGN_SIGNAL( sig, size)                              \
     237  do                                                                    \
     238    {                                                                   \
     239      DELETE0_SIGNAL(sig,size);                                         \
     240    } while (0)
     241
     242#define INSTANCE0_FOREIGN_SIGNAL(component, sig, type, name, size)      \
     243  do                                                                    \
     244    {                                                                   \
     245      if (size > 0)                                                     \
     246        {                                                               \
     247          INSTANCE_FOREIGN_PRINT(name);                                 \
     248          _component->set_sc_signal<type>(_name,name,static_cast<void*>(component->sig)); \
     249        }                                                               \
     250    } while (0)
     251
     252#define ALLOC0_SC_SIGNAL(  sig, name, type)                             \
     253  do                                                                    \
     254    {                                                                   \
     255      sig = new sc_signal<type> (name);                                 \
     256      PRINT_SIGNAL_ADDRESS(name,sig);                                   \
     257    } while (0)
     258
     259#define INSTANCE0_SC_SIGNAL(component, sig)                             \
     260  do                                                                    \
     261    {                                                                   \
     262      TEST_SIGNAL(component->sig->name(),component->sig);               \
     263      TEST_SIGNAL(sig           ->name(),sig);                          \
     264      (*(component->sig)) (*(sig));                                     \
     265    } while (0)
     266
     267#define _INSTANCE0_SC_SIGNAL(component, sig1,sig2)                      \
     268  do                                                                    \
     269    {                                                                   \
     270      TEST_SIGNAL(component->sig1->name(),component->sig1);             \
     271      TEST_SIGNAL(sig2           ->name(),sig2);                        \
     272      (*(component->sig1)) (*(sig2));                                   \
     273    } while (0)
     274
     275#define DELETE0_SC_SIGNAL( sig)                                         \
     276  do                                                                    \
     277    {                                                                   \
     278      PRINT_SIGNAL_ADDRESS("",sig);                                     \
    165279      delete sig;                                                       \
    166     }
    167 
    168 #define ALLOC0_FOREIGN_SIGNAL_IN(  sig, interface, name, type, size)    \
    169   if (size > 0)                                                         \
    170     {                                                                   \
    171       std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(name)); \
    172       sig = new SC_IN    (type) (str.c_str());                          \
    173     }
    174 
    175 #define ALLOC0_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size)    \
    176   if (size > 0)                                                         \
    177     {                                                                   \
    178       std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(name)); \
    179       sig = new SC_OUT   (type) (str.c_str());                          \
    180     }
    181 
    182 #define DELETE0_FOREIGN_SIGNAL( sig, size) \
    183   {                                        \
    184     DELETE0_SIGNAL(sig,size);              \
    185   }
    186 
    187 #define INSTANCE0_FOREIGN_SIGNAL(component, sig, type, name, size)      \
    188   if (size > 0)                                                         \
    189     {                                                                   \
    190       INSTANCE_FOREIGN_PRINT(name);                                     \
    191       _component->set_sc_signal<type>(_name,name,static_cast<void*>(component->sig)); \
    192     }
    193 
    194 #define ALLOC0_SC_SIGNAL(  sig, name, type)                             \
    195   sig = new sc_signal<type> (name);                                     \
    196   PRINT_SIGNAL_ADDRESS(name,sig);
    197 
    198 #define INSTANCE0_SC_SIGNAL(component, sig)                    \
    199   {                                                            \
    200     TEST_SIGNAL(component->sig->name(),component->sig);        \
    201     TEST_SIGNAL(sig           ->name(),sig);                   \
    202     (*(component->sig)) (*(sig));                              \
    203   }
    204 
    205 #define _INSTANCE0_SC_SIGNAL(component, sig1,sig2)                      \
    206   {                                                                     \
    207     TEST_SIGNAL(component->sig1->name(),component->sig1);               \
    208     TEST_SIGNAL(sig2           ->name(),sig2);                          \
    209     (*(component->sig1)) (*(sig2));                                     \
    210   }
    211 
    212 #define DELETE0_SC_SIGNAL( sig)                  \
    213   {                                              \
    214     PRINT_SIGNAL_ADDRESS("",sig);                \
    215     delete sig;                                  \
    216   }
     280    } while (0)
    217281
    218282// ----------------------------------------------------------------------
     
    220284// ----------------------------------------------------------------------
    221285
    222 #define __ALLOC1_INTERFACE_BEGIN(name, x1)                                    \
     286#define __ALLOC1_INTERFACE_BEGIN(name, x1)                              \
    223287  INTERFACE_PRINT(name);                                                \
    224288  const std::string interface_name = name;                              \
     
    228292
    229293#define __ALLOC1_SIGNAL_IN( sig, name, type)                            \
    230   {                                                                     \
    231     sig = new SC_IN(type) * [iterator_1];                               \
    232     std::string separator="_";                                          \
    233     for (uint32_t it1=0; it1<iterator_1; it1++)                         \
    234       {                                                                 \
    235         std::string str = "in_"+interface_name+separator+toString(it1)+separator+name; \
    236         sig [it1] = new SC_IN(type) (str.c_str());                      \
    237       }                                                                 \
    238   }
     294  do                                                                    \
     295    {                                                                   \
     296      sig = new SC_IN(type) * [iterator_1];                             \
     297      std::string separator="_";                                        \
     298      for (uint32_t it1=0; it1<iterator_1; it1++)                       \
     299        {                                                               \
     300          std::string str = "in_"+interface_name+separator+toString(it1)+separator+name; \
     301          sig [it1] = new SC_IN(type) (str.c_str());                    \
     302        }                                                               \
     303    } while (0)
     304
    239305
    240306#define __ALLOC1_SIGNAL_OUT( sig, name, type)                           \
    241   {                                                                     \
    242     sig = new SC_OUT(type) * [iterator_1];                              \
    243     std::string separator="_";                                          \
    244     for (uint32_t it1=0; it1<iterator_1; it1++)                         \
    245       {                                                                 \
    246         std::string str = "out_"+interface_name+separator+toString(it1)+separator+name; \
    247         sig [it1] = new SC_OUT(type) (str.c_str());                     \
    248       }                                                                 \
    249   }
     307  do                                                                    \
     308    {                                                                   \
     309      sig = new SC_OUT(type) * [iterator_1];                            \
     310      std::string separator="_";                                        \
     311      for (uint32_t it1=0; it1<iterator_1; it1++)                       \
     312        {                                                               \
     313          std::string str = "out_"+interface_name+separator+toString(it1)+separator+name; \
     314          sig [it1] = new SC_OUT(type) (str.c_str());                   \
     315        }                                                               \
     316    } while (0)
    250317
    251318#ifdef POSITION
     
    264331  }
    265332#else
    266 #define ALLOC1_INTERFACE_BEGIN( name, direction, localisation, str, x1)   \
     333#define ALLOC1_INTERFACE_BEGIN( name, direction, localisation, str, x1) \
    267334  INTERFACE_PRINT(name);                                                \
    268335  uint32_t iterator_1 = 0;                                              \
     
    279346#endif
    280347
    281 #define ALLOC1_INTERFACE_END(x1)                \
    282   delete [] interface;
     348#define ALLOC1_INTERFACE_END(x1)                                        \
     349  do                                                                    \
     350    {                                                                   \
     351      delete [] interface;                                              \
     352    } while (0)
    283353
    284354#define ALLOC1_VAL_ACK_IN( sig, name, type)                             \
    285   {                                                                     \
    286     sig = new SC_IN (Tcontrol_t) * [iterator_1];                        \
    287     for (uint32_t it1=0; it1<iterator_1; it1++)                         \
    288       {                                                                 \
    289         sig [it1] = interface[it1]->set_signal_valack_in (name, type);  \
    290       }                                                                 \
    291   }
     355  do                                                                    \
     356    {                                                                   \
     357      sig = new SC_IN (Tcontrol_t) * [iterator_1];                      \
     358      for (uint32_t it1=0; it1<iterator_1; it1++)                       \
     359        {                                                               \
     360          sig [it1] = interface[it1]->set_signal_valack_in (name, type); \
     361        }                                                               \
     362    } while (0)
     363
    292364#define ALLOC1_VAL_ACK_OUT(sig, name, type)                             \
    293   {                                                                     \
    294     sig = new SC_OUT(Tcontrol_t) * [iterator_1];                        \
    295     for (uint32_t it1=0; it1<iterator_1; it1++)                         \
    296       {                                                                 \
    297         sig [it1] = interface[it1]->set_signal_valack_out(name, type);  \
    298       }                                                                 \
    299   }
     365  do                                                                    \
     366    {                                                                   \
     367      sig = new SC_OUT(Tcontrol_t) * [iterator_1];                      \
     368      for (uint32_t it1=0; it1<iterator_1; it1++)                       \
     369        {                                                               \
     370          sig [it1] = interface[it1]->set_signal_valack_out(name, type); \
     371        }                                                               \
     372    } while (0)
     373
    300374#define ALLOC1_VALACK_IN(    sig, type)                                 \
    301   {                                                                     \
    302     sig = new SC_IN (Tcontrol_t) * [iterator_1];                        \
    303     for (uint32_t it1=0; it1<iterator_1; it1++)                         \
    304       {                                                                 \
    305         sig [it1] = interface[it1]->set_signal_valack_in (type);        \
    306       }                                                                 \
    307   }
     375  do                                                                    \
     376    {                                                                   \
     377      sig = new SC_IN (Tcontrol_t) * [iterator_1];                      \
     378      for (uint32_t it1=0; it1<iterator_1; it1++)                       \
     379        {                                                               \
     380          sig [it1] = interface[it1]->set_signal_valack_in (type);      \
     381        }                                                               \
     382    } while (0)
     383
    308384#define ALLOC1_VALACK_OUT(   sig, type)                                 \
    309   {                                                                     \
    310     sig = new SC_OUT(Tcontrol_t) * [iterator_1];                        \
    311     for (uint32_t it1=0; it1<iterator_1; it1++)                         \
    312       {                                                                 \
    313         sig [it1] = interface[it1]->set_signal_valack_out(type);        \
    314       }                                                                 \
    315   }
     385  do                                                                    \
     386    {                                                                   \
     387      sig = new SC_OUT(Tcontrol_t) * [iterator_1];                      \
     388      for (uint32_t it1=0; it1<iterator_1; it1++)                       \
     389        {                                                               \
     390          sig [it1] = interface[it1]->set_signal_valack_out(type);      \
     391        }                                                               \
     392    } while (0)
     393
    316394#define ALLOC1_SIGNAL_IN( sig, name, type, size)                        \
    317   {                                                                     \
    318     sig = new SC_IN (type) * [iterator_1];                              \
    319     for (uint32_t it1=0; it1<iterator_1; it1++)                         \
    320       {                                                                 \
     395  do                                                                    \
     396    {                                                                   \
     397      sig = new SC_IN (type) * [iterator_1];                            \
     398      for (uint32_t it1=0; it1<iterator_1; it1++)                       \
     399        {                                                               \
     400          if (size > 0)                                                 \
     401            {                                                           \
     402              sig [it1] = interface[it1]->set_signal_in <type> (name, size); \
     403            }                                                           \
     404          else                                                          \
     405            {                                                           \
     406              PRINT_SIZE_NUL(_component,interface[it1],name);           \
     407            }                                                           \
     408        }                                                               \
     409    } while (0)
     410
     411#define ALLOC1_SIGNAL_OUT(sig, name, type, size)                        \
     412  do                                                                    \
     413    {                                                                   \
     414      sig = new SC_OUT(type) * [iterator_1];                            \
     415      for (uint32_t it1=0; it1<iterator_1; it1++)                       \
     416        {                                                               \
     417          if (size > 0)                                                 \
     418            {                                                           \
     419              sig [it1] = interface[it1]->set_signal_out<type> (name, size); \
     420            }                                                           \
     421          else                                                          \
     422            {                                                           \
     423              PRINT_SIZE_NUL(_component,interface[it1],name);           \
     424            }                                                           \
     425        }                                                               \
     426    } while (0)
     427
     428#define DELETE1_SIGNAL(sig, x1, size)                                   \
     429  do                                                                    \
     430    {                                                                   \
     431      for (uint32_t it1=0; it1<x1; it1++)                               \
     432        {                                                               \
     433          if (size > 0)                                                 \
     434            {                                                           \
     435              delete sig[it1];                                          \
     436            }                                                           \
     437        }                                                               \
     438      delete [] sig;                                                    \
     439    } while (0)
     440
     441#define ALLOC1_FOREIGN_SIGNAL_IN(sig, interface, name, type, size,x1)   \
     442  do                                                                    \
     443    {                                                                   \
     444      sig = new SC_IN (type) * [x1];                                    \
     445      for (uint32_t it1=0; it1<x1; it1++)                               \
    321446        if (size > 0)                                                   \
    322447          {                                                             \
    323             sig [it1] = interface[it1]->set_signal_in <type> (name, size); \
     448            std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(name)); \
     449            sig [it1] = new SC_IN (type) (str.c_str());                 \
    324450          }                                                             \
    325         else                                                            \
     451    } while (0)
     452
     453#define ALLOC1_FOREIGN_SIGNAL_OUT(sig, interface, name, type, size,x1)  \
     454  do                                                                    \
     455    {                                                                   \
     456      sig = new SC_OUT (type) * [x1];                                   \
     457      for (uint32_t it1=0; it1<x1; it1++)                               \
     458        if (size > 0)                                                   \
    326459          {                                                             \
    327             PRINT_SIZE_NUL(_component,interface[it1],name);             \
     460            std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(name)); \
     461            sig [it1] = new SC_OUT (type) (str.c_str());                \
     462          }                                                             \
     463    } while (0)
     464
     465#define DELETE1_FOREIGN_SIGNAL( sig, size,x1)                           \
     466  do                                                                    \
     467    {                                                                   \
     468      DELETE1_SIGNAL(sig,x1,size);                                      \
     469    } while (0)
     470
     471#define ALLOC1_SC_SIGNAL( sig, name, type, x1)                          \
     472  do                                                                    \
     473    {                                                                   \
     474      sig = new sc_signal<type> * [x1];                                 \
     475      {                                                                 \
     476        std::string separator="_";                                      \
     477        std::string str;                                                \
     478        for (uint32_t it1=0; it1<x1; it1++)                             \
     479          {                                                             \
     480            str = name+separator+toString(it1);                         \
     481            sig [it1] = new sc_signal<type> (str.c_str());              \
     482            PRINT_SIGNAL_ADDRESS(str.c_str(),sig[it1]);                 \
    328483          }                                                             \
    329484      }                                                                 \
    330   }
    331 
    332 #define ALLOC1_SIGNAL_OUT(sig, name, type, size)                        \
    333   {                                                                     \
    334     sig = new SC_OUT(type) * [iterator_1];                              \
    335     for (uint32_t it1=0; it1<iterator_1; it1++)                         \
    336       {                                                                 \
    337         if (size > 0)                                                   \
    338           {                                                             \
    339             sig [it1] = interface[it1]->set_signal_out<type> (name, size); \
    340           }                                                             \
    341         else                                                            \
    342           {                                                             \
    343             PRINT_SIZE_NUL(_component,interface[it1],name);             \
    344           }                                                             \
    345       }                                                                 \
    346   }
    347 
    348 #define DELETE1_SIGNAL(sig, x1, size)                                   \
    349   {                                                                     \
    350     for (uint32_t it1=0; it1<x1; it1++)                                 \
    351       {                                                                 \
    352         if (size > 0)                                                   \
    353           {                                                             \
    354             delete sig[it1];                                            \
    355           }                                                             \
    356       }                                                                 \
    357     delete [] sig;                                                      \
    358   }
    359 
    360 #define ALLOC1_FOREIGN_SIGNAL_IN(sig, interface, name, type, size,x1)   \
    361   {                                                                     \
    362     sig = new SC_IN (type) * [x1];                                   \
    363     for (uint32_t it1=0; it1<x1; it1++)                                 \
    364       if (size > 0)                                                     \
    365         {                                                               \
    366           std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(name)); \
    367           sig [it1] = new SC_IN (type) (str.c_str());                   \
    368         }                                                               \
    369   }
    370 
    371 #define ALLOC1_FOREIGN_SIGNAL_OUT(sig, interface, name, type, size,x1)  \
    372   {                                                                     \
    373     sig = new SC_OUT (type) * [x1];                                     \
    374     for (uint32_t it1=0; it1<x1; it1++)                                 \
    375       if (size > 0)                                                     \
    376         {                                                               \
    377           std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(name)); \
    378           sig [it1] = new SC_OUT (type) (str.c_str());                  \
    379         }                                                               \
    380   }
    381 
    382 #define DELETE1_FOREIGN_SIGNAL( sig, size,x1)            \
    383   {                                                      \
    384     DELETE1_SIGNAL(sig,x1,size);                         \
    385   }
    386 
    387 #define ALLOC1_SC_SIGNAL( sig, name, type, x1)                          \
    388   sig = new sc_signal<type> * [x1];                                     \
    389   {                                                                     \
    390     std::string separator="_";                                          \
    391     std::string str;                                                    \
    392     for (uint32_t it1=0; it1<x1; it1++)                                 \
    393       {                                                                 \
    394         str = name+separator+toString(it1);                             \
    395         sig [it1] = new sc_signal<type> (str.c_str());                  \
    396         PRINT_SIGNAL_ADDRESS(str.c_str(),sig[it1]);                     \
    397       }                                                                 \
    398   }
    399 
    400 #define INSTANCE1_SC_SIGNAL(component, sig, x1) \
    401   for (uint32_t it1=0; it1<x1; it1++)                                   \
    402     {                                                                   \
    403       TEST_SIGNAL(component->sig [it1]->name(),component->sig [it1]);   \
    404       TEST_SIGNAL(sig            [it1]->name(),sig            [it1]);   \
    405       (*(component->sig[it1])) (*(sig[it1]));                           \
    406     }
    407 
    408 #define _INSTANCE1_SC_SIGNAL(component, sig1, sig2, x1) \
    409   for (uint32_t it1=0; it1<x1; it1++)                                   \
    410     {                                                                   \
    411       TEST_SIGNAL(component->sig1 [it1]->name(),component->sig1 [it1]); \
    412       TEST_SIGNAL(sig2            [it1]->name(),sig2            [it1]); \
    413       (*(component->sig1[it1])) (*(sig2[it1]));                         \
    414     }
     485    } while (0)
     486
     487#define INSTANCE1_SC_SIGNAL(component, sig, x1)                         \
     488  do                                                                    \
     489    {                                                                   \
     490      for (uint32_t it1=0; it1<x1; it1++)                               \
     491        {                                                               \
     492          TEST_SIGNAL(component->sig [it1]->name(),component->sig [it1]); \
     493          TEST_SIGNAL(sig            [it1]->name(),sig            [it1]); \
     494          (*(component->sig[it1])) (*(sig[it1]));                       \
     495        }                                                               \
     496    } while (0)
     497
     498#define _INSTANCE1_SC_SIGNAL(component, sig1, sig2, x1)                 \
     499  do                                                                    \
     500    {                                                                   \
     501      for (uint32_t it1=0; it1<x1; it1++)                               \
     502        {                                                               \
     503          TEST_SIGNAL(component->sig1 [it1]->name(),component->sig1 [it1]); \
     504          TEST_SIGNAL(sig2            [it1]->name(),sig2            [it1]); \
     505          (*(component->sig1[it1])) (*(sig2[it1]));                     \
     506        }                                                               \
     507    } while (0)
    415508
    416509#define DELETE1_SC_SIGNAL(sig, x1)                                      \
    417   {                                                                     \
    418     for (uint32_t it1=0; it1<x1; it1++)                                 \
    419       {                                                                 \
    420         PRINT_SIGNAL_ADDRESS("",sig[it1]);                         \
    421         delete sig[it1];                                                \
    422       }                                                                 \
    423     delete [] sig;                                                      \
    424   }
     510  do                                                                    \
     511    {                                                                   \
     512      for (uint32_t it1=0; it1<x1; it1++)                               \
     513        {                                                               \
     514          PRINT_SIGNAL_ADDRESS("",sig[it1]);                            \
     515          delete sig[it1];                                              \
     516        }                                                               \
     517      delete [] sig;                                                    \
     518    } while (0)
    425519
    426520// ----------------------------------------------------------------------
     
    429523
    430524#ifdef POSITION
    431 #define ALLOC2_INTERFACE_BEGIN( name, direction, localisation, str, x1, x2)   \
     525#define ALLOC2_INTERFACE_BEGIN( name, direction, localisation, str, x1, x2) \
    432526  INTERFACE_PRINT(name);                                                \
    433527  uint32_t iterator_1 = 0;                                              \
     
    449543  }
    450544#else
    451 #define ALLOC2_INTERFACE_BEGIN( name, direction, localisation, str, x1, x2)   \
     545#define ALLOC2_INTERFACE_BEGIN( name, direction, localisation, str, x1, x2) \
    452546  INTERFACE_PRINT(name);                                                \
    453547  uint32_t iterator_1 = 0;                                              \
     
    471565
    472566#define ALLOC2_INTERFACE_END(x1, x2)                                    \
    473   for (uint32_t it1=0; it1<x1; it1++)                                   \
    474     delete [] interface [it1];                                          \
    475   delete [] interface;
     567  do                                                                    \
     568    {                                                                   \
     569      for (uint32_t it1=0; it1<x1; it1++)                               \
     570        delete [] interface [it1];                                      \
     571      delete [] interface;                                              \
     572    } while (0)
    476573
    477574#define _ALLOC2_VAL_ACK_IN( sig, name, type, x1, x2)                    \
    478   {                                                                     \
    479     sig = new SC_IN (Tcontrol_t) ** [x1];                               \
    480     for (uint32_t it1=0; it1<x1; it1++)                                 \
    481       {                                                                 \
    482         sig [it1] = new SC_IN (Tcontrol_t) * [x2];                      \
    483         for (uint32_t it2=0; it2<x2; it2++)                             \
    484           {                                                             \
    485             sig [it1][it2] = interface[it1][it2]->set_signal_valack_in (name, type); \
    486           }                                                             \
    487       }                                                                 \
    488   }
     575  do                                                                    \
     576    {                                                                   \
     577      sig = new SC_IN (Tcontrol_t) ** [x1];                             \
     578      for (uint32_t it1=0; it1<x1; it1++)                               \
     579        {                                                               \
     580          sig [it1] = new SC_IN (Tcontrol_t) * [x2];                    \
     581          for (uint32_t it2=0; it2<x2; it2++)                           \
     582            {                                                           \
     583              sig [it1][it2] = interface[it1][it2]->set_signal_valack_in (name, type); \
     584            }                                                           \
     585        }                                                               \
     586    } while (0)
    489587
    490588#define _ALLOC2_VAL_ACK_OUT( sig, name, type, x1, x2)                   \
    491   {                                                                     \
    492     sig = new SC_OUT (Tcontrol_t) ** [x1];                              \
    493     for (uint32_t it1=0; it1<x1; it1++)                                 \
    494       {                                                                 \
    495         sig [it1] = new SC_OUT (Tcontrol_t) * [x2];                     \
    496         for (uint32_t it2=0; it2<x2; it2++)                             \
    497           {                                                             \
    498             sig [it1][it2] = interface[it1][it2]->set_signal_valack_out (name, type); \
    499           }                                                             \
    500       }                                                                 \
    501   }
     589  do                                                                    \
     590    {                                                                   \
     591      sig = new SC_OUT (Tcontrol_t) ** [x1];                            \
     592      for (uint32_t it1=0; it1<x1; it1++)                               \
     593        {                                                               \
     594          sig [it1] = new SC_OUT (Tcontrol_t) * [x2];                   \
     595          for (uint32_t it2=0; it2<x2; it2++)                           \
     596            {                                                           \
     597              sig [it1][it2] = interface[it1][it2]->set_signal_valack_out (name, type); \
     598            }                                                           \
     599        }                                                               \
     600    } while (0)
    502601
    503602#define _ALLOC2_VALACK_IN(    sig,type, x1, x2)                         \
    504   {                                                                     \
    505     sig = new SC_IN (Tcontrol_t) ** [x1];                               \
    506     for (uint32_t it1=0; it1<x1; it1++)                                 \
    507       {                                                                 \
    508         sig [it1] = new SC_IN (Tcontrol_t) * [x2];                      \
    509         for (uint32_t it2=0; it2<x2; it2++)                             \
    510           {                                                             \
    511             sig [it1][it2] = interface[it1][it2]->set_signal_valack_in (type); \
    512           }                                                             \
    513       }                                                                 \
    514   }
     603  do                                                                    \
     604    {                                                                   \
     605      sig = new SC_IN (Tcontrol_t) ** [x1];                             \
     606      for (uint32_t it1=0; it1<x1; it1++)                               \
     607        {                                                               \
     608          sig [it1] = new SC_IN (Tcontrol_t) * [x2];                    \
     609          for (uint32_t it2=0; it2<x2; it2++)                           \
     610            {                                                           \
     611              sig [it1][it2] = interface[it1][it2]->set_signal_valack_in (type); \
     612            }                                                           \
     613        }                                                               \
     614    } while (0)
    515615
    516616#define _ALLOC2_VALACK_OUT(    sig,type, x1, x2)                        \
    517   {                                                                     \
    518     sig = new SC_OUT (Tcontrol_t) ** [x1];                              \
    519     for (uint32_t it1=0; it1<x1; it1++)                                 \
    520       {                                                                 \
    521         sig [it1] = new SC_OUT (Tcontrol_t) * [x2];                     \
    522         for (uint32_t it2=0; it2<x2; it2++)                             \
    523           {                                                             \
    524             sig [it1][it2] = interface[it1][it2]->set_signal_valack_out (type); \
    525           }                                                             \
    526       }                                                                 \
    527   }
     617  do                                                                    \
     618    {                                                                   \
     619      sig = new SC_OUT (Tcontrol_t) ** [x1];                            \
     620      for (uint32_t it1=0; it1<x1; it1++)                               \
     621        {                                                               \
     622          sig [it1] = new SC_OUT (Tcontrol_t) * [x2];                   \
     623          for (uint32_t it2=0; it2<x2; it2++)                           \
     624            {                                                           \
     625              sig [it1][it2] = interface[it1][it2]->set_signal_valack_out (type); \
     626            }                                                           \
     627        }                                                               \
     628    } while (0)
    528629
    529630#define _ALLOC2_SIGNAL_IN( sig, name, type, size, x1, x2)               \
    530   {                                                                     \
    531     sig = new SC_IN (type) ** [x1];                                     \
    532     for (uint32_t it1=0; it1<x1; it1++)                                 \
    533       {                                                                 \
    534         sig [it1] = new SC_IN (type) * [x2];                            \
    535         for (uint32_t it2=0; it2<x2; it2++)                             \
    536           {                                                             \
    537             if (size > 0)                                               \
    538               {                                                         \
    539                 sig [it1][it2] = interface[it1][it2]->set_signal_in <type> (name, size); \
    540               }                                                         \
    541             else                                                        \
    542               {                                                         \
    543                 PRINT_SIZE_NUL(_component,interface[it1][it2],name);    \
    544               }                                                         \
    545           }                                                             \
    546       }                                                                 \
    547   }
     631  do                                                                    \
     632    {                                                                   \
     633      sig = new SC_IN (type) ** [x1];                                   \
     634      for (uint32_t it1=0; it1<x1; it1++)                               \
     635        {                                                               \
     636          sig [it1] = new SC_IN (type) * [x2];                          \
     637          for (uint32_t it2=0; it2<x2; it2++)                           \
     638            {                                                           \
     639              if (size > 0)                                             \
     640                {                                                       \
     641                  sig [it1][it2] = interface[it1][it2]->set_signal_in <type> (name, size); \
     642                }                                                       \
     643              else                                                      \
     644                {                                                       \
     645                  PRINT_SIZE_NUL(_component,interface[it1][it2],name);  \
     646                }                                                       \
     647            }                                                           \
     648        }                                                               \
     649    } while (0)
    548650
    549651#define _ALLOC2_SIGNAL_OUT( sig, name, type, size, x1, x2)              \
    550   {                                                                     \
    551     sig = new SC_OUT (type) ** [x1];                                    \
    552     for (uint32_t it1=0; it1<x1; it1++)                                 \
    553       {                                                                 \
    554         sig [it1] = new SC_OUT (type) * [x2];                           \
    555         for (uint32_t it2=0; it2<x2; it2++)                             \
    556           {                                                             \
    557             if (size > 0)                                               \
    558               {                                                         \
    559                 sig [it1][it2] = interface[it1][it2]->set_signal_out <type> (name, size); \
    560               }                                                         \
    561             else                                                        \
    562               {                                                         \
    563                 PRINT_SIZE_NUL(_component,interface[it1][it2],name);    \
    564               }                                                         \
    565           }                                                             \
    566       }                                                                 \
    567   }
     652  do                                                                    \
     653    {                                                                   \
     654      sig = new SC_OUT (type) ** [x1];                                  \
     655      for (uint32_t it1=0; it1<x1; it1++)                               \
     656        {                                                               \
     657          sig [it1] = new SC_OUT (type) * [x2];                         \
     658          for (uint32_t it2=0; it2<x2; it2++)                           \
     659            {                                                           \
     660              if (size > 0)                                             \
     661                {                                                       \
     662                  sig [it1][it2] = interface[it1][it2]->set_signal_out <type> (name, size); \
     663                }                                                       \
     664              else                                                      \
     665                {                                                       \
     666                  PRINT_SIZE_NUL(_component,interface[it1][it2],name);  \
     667                }                                                       \
     668            }                                                           \
     669        }                                                               \
     670    } while (0)
    568671
    569672#define ALLOC2_VAL_ACK_IN( sig, name, type      ) _ALLOC2_VAL_ACK_IN( sig, name, type      , iterator_1, iterator_2)
     
    575678
    576679#define DELETE2_SIGNAL(sig, x1,x2, size)                                \
    577   {                                                                     \
    578     for (uint32_t it1=0; it1<x1; it1++)                                 \
     680  do                                                                    \
     681    {                                                                   \
     682      for (uint32_t it1=0; it1<x1; it1++)                               \
     683        {                                                               \
     684          for (uint32_t it2=0; it2<x2; it2++)                           \
     685            {                                                           \
     686              if (size > 0)                                             \
     687                {                                                       \
     688                  delete sig[it1][it2];                                 \
     689                }                                                       \
     690            }                                                           \
     691          delete [] sig[it1];                                           \
     692        }                                                               \
     693      delete [] sig;                                                    \
     694    } while (0)
     695
     696#define ALLOC2_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2) \
     697  do                                                                    \
     698    {                                                                   \
     699      sig = new SC_IN (type) ** [x1];                                   \
     700      for (uint32_t it1=0; it1<x1; it1++)                               \
     701        {                                                               \
     702          sig [it1] = new SC_IN (type) * [x2];                          \
     703          for (uint32_t it2=0; it2<x2; it2++)                           \
     704            if (size > 0)                                               \
     705              {                                                         \
     706                std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(name)); \
     707                sig [it1][it2] = new SC_IN    (type) (str.c_str());     \
     708              }                                                         \
     709        }                                                               \
     710    } while (0)
     711
     712#define ALLOC2_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size, x1, x2) \
     713  do                                                                    \
     714    {                                                                   \
     715      sig = new SC_OUT (type) ** [x1];                                  \
     716      for (uint32_t it1=0; it1<x1; it1++)                               \
     717        {                                                               \
     718          sig [it1] = new SC_OUT (type) * [x2];                         \
     719          for (uint32_t it2=0; it2<x2; it2++)                           \
     720            if (size > 0)                                               \
     721              {                                                         \
     722                std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(name)); \
     723                sig [it1][it2] = new SC_IN    (type) (str.c_str());     \
     724              }                                                         \
     725        }                                                               \
     726    } while (0)
     727
     728#define DELETE2_FOREIGN_SIGNAL( sig, size,x1,x2)            \
     729  do                                                        \
     730    {                                                       \
     731      DELETE2_SIGNAL(sig,x1,x2,size);                       \
     732    } while (0)
     733
     734#define ALLOC2_SC_SIGNAL( sig, name, type, x1, x2)                      \
     735  do                                                                    \
     736    {                                                                   \
     737      sig = new sc_signal<type> ** [x1];                                \
    579738      {                                                                 \
     739        std::string separator="_";                                      \
     740        std::string str;                                                \
     741        for (uint32_t it1=0; it1<x1; it1++)                             \
     742          {                                                             \
     743            sig [it1] = new sc_signal<type> * [x2];                     \
     744            for (uint32_t it2=0; it2<x2; it2++)                         \
     745              {                                                         \
     746                str = name+separator+toString(it1)+separator+toString(it2); \
     747                sig [it1][it2] = new sc_signal<type> (str.c_str());     \
     748                PRINT_SIGNAL_ADDRESS(str.c_str(),sig[it1][it2]);        \
     749              }                                                         \
     750          }                                                             \
     751      }                                                                 \
     752    } while (0)
     753
     754#define INSTANCE2_SC_SIGNAL(component, sig, x1, x2)                     \
     755  do                                                                    \
     756    {                                                                   \
     757      for (uint32_t it1=0; it1<x1; it1++)                               \
    580758        for (uint32_t it2=0; it2<x2; it2++)                             \
    581759          {                                                             \
    582             if (size > 0)                                               \
    583               {                                                         \
    584                 delete sig[it1][it2];                                   \
    585               }                                                         \
     760            TEST_SIGNAL(component->sig  [it1][it2]->name(),component->sig  [it1][it2]); \
     761            TEST_SIGNAL(sig             [it1][it2]->name(),sig             [it1][it2]); \
     762            (*(component->sig[it1][it2])) (*(sig[it1][it2]));           \
    586763          }                                                             \
    587         delete [] sig[it1];                                             \
    588       }                                                                 \
    589     delete [] sig;                                                      \
    590   }
    591 
    592 
    593 #define ALLOC2_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2) \
    594   {                                                                     \
    595     sig = new SC_IN (type) ** [x1];                                     \
    596     for (uint32_t it1=0; it1<x1; it1++)                                 \
    597       {                                                                 \
    598         sig [it1] = new SC_IN (type) * [x2];                            \
    599         for (uint32_t it2=0; it2<x2; it2++)                             \
    600           if (size > 0)                                                 \
    601             {                                                           \
    602               std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(name)); \
    603               sig [it1][it2] = new SC_IN    (type) (str.c_str()); \
    604             }                                                           \
    605       }                                                                 \
    606   }
    607 
    608 #define ALLOC2_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size, x1, x2) \
    609   {                                                                     \
    610     sig = new SC_OUT (type) ** [x1];                                    \
    611     for (uint32_t it1=0; it1<x1; it1++)                                 \
    612       {                                                                 \
    613         sig [it1] = new SC_OUT (type) * [x2];                           \
    614         for (uint32_t it2=0; it2<x2; it2++)                             \
    615           if (size > 0)                                                 \
    616             {                                                           \
    617               std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(name)); \
    618               sig [it1][it2] = new SC_IN    (type) (str.c_str());       \
    619             }                                                           \
    620       }                                                                 \
    621   }
    622 
    623 #define DELETE2_FOREIGN_SIGNAL( sig, size,x1,x2)            \
    624   {                                                         \
    625     DELETE2_SIGNAL(sig,x1,x2,size);                         \
    626   }
    627 
    628 #define ALLOC2_SC_SIGNAL( sig, name, type, x1, x2)                      \
    629   sig = new sc_signal<type> ** [x1];                                    \
    630   {                                                                     \
    631     std::string separator="_";                                          \
    632     std::string str;                                                    \
    633     for (uint32_t it1=0; it1<x1; it1++)                                 \
    634       {                                                                 \
    635         sig [it1] = new sc_signal<type> * [x2];                         \
     764    } while (0)
     765
     766#define _INSTANCE2_SC_SIGNAL(component, sig1, sig2, x1, x2)             \
     767  do                                                                    \
     768    {                                                                   \
     769      for (uint32_t it1=0; it1<x1; it1++)                               \
    636770        for (uint32_t it2=0; it2<x2; it2++)                             \
    637771          {                                                             \
    638             str = name+separator+toString(it1)+separator+toString(it2); \
    639             sig [it1][it2] = new sc_signal<type> (str.c_str());        \
    640             PRINT_SIGNAL_ADDRESS(str.c_str(),sig[it1][it2]);            \
     772            TEST_SIGNAL(component->sig1 [it1][it2]->name(),component->sig1 [it1][it2]); \
     773            TEST_SIGNAL(sig2            [it1][it2]->name(),sig2            [it1][it2]); \
     774            (*(component->sig1[it1][it2])) (*(sig2[it1][it2]));         \
    641775          }                                                             \
    642       }                                                                 \
    643   }
    644 
    645 #define INSTANCE2_SC_SIGNAL(component, sig, x1, x2)                     \
    646   for (uint32_t it1=0; it1<x1; it1++)                                   \
    647     for (uint32_t it2=0; it2<x2; it2++)                                 \
    648       {                                                                 \
    649         TEST_SIGNAL(component->sig  [it1][it2]->name(),component->sig  [it1][it2]); \
    650         TEST_SIGNAL(sig             [it1][it2]->name(),sig             [it1][it2]); \
    651         (*(component->sig[it1][it2])) (*(sig[it1][it2]));               \
    652       }
    653 
    654 #define _INSTANCE2_SC_SIGNAL(component, sig1, sig2, x1, x2)             \
    655   for (uint32_t it1=0; it1<x1; it1++)                                   \
    656     for (uint32_t it2=0; it2<x2; it2++)                                 \
    657       {                                                                 \
    658         TEST_SIGNAL(component->sig1 [it1][it2]->name(),component->sig1 [it1][it2]); \
    659         TEST_SIGNAL(sig2            [it1][it2]->name(),sig2            [it1][it2]); \
    660         (*(component->sig1[it1][it2])) (*(sig2[it1][it2]));             \
    661       }
     776    } while (0)
    662777
    663778#define DELETE2_SC_SIGNAL(sig,x1,x2)                                    \
    664   {                                                                     \
    665     for (uint32_t it1=0; it1<x1; it1++)                                 \
    666       {                                                                 \
    667         for (uint32_t it2=0; it2<x2; it2++)                             \
    668           {                                                             \
    669             PRINT_SIGNAL_ADDRESS("",sig[it1][it2]);                     \
    670             delete sig[it1][it2];                                       \
    671           }                                                             \
    672         delete [] sig[it1];                                             \
    673       }                                                                 \
    674     delete [] sig;                                                      \
    675   }
     779  do                                                                    \
     780    {                                                                   \
     781      for (uint32_t it1=0; it1<x1; it1++)                               \
     782        {                                                               \
     783          for (uint32_t it2=0; it2<x2; it2++)                           \
     784            {                                                           \
     785              PRINT_SIGNAL_ADDRESS("",sig[it1][it2]);                   \
     786              delete sig[it1][it2];                                     \
     787            }                                                           \
     788          delete [] sig[it1];                                           \
     789        }                                                               \
     790      delete [] sig;                                                    \
     791    } while (0)
    676792
    677793// ----------------------------------------------------------------------
     
    734850
    735851#define ALLOC3_INTERFACE_END(x1, x2, x3)                         \
    736   for (uint32_t it1=0; it1<x1; it1++)                                   \
    737     {                                                                   \
    738       for (uint32_t it2=0; it2<x2; it2++)                               \
    739         delete [] interface [it1][it2];                                 \
    740       delete [] interface [it1];                                        \
    741     }                                                                   \
    742   delete [] interface;
     852  do                                                                    \
     853    {                                                                   \
     854      for (uint32_t it1=0; it1<x1; it1++)                               \
     855        {                                                               \
     856          for (uint32_t it2=0; it2<x2; it2++)                           \
     857            delete [] interface [it1][it2];                             \
     858          delete [] interface [it1];                                    \
     859        }                                                               \
     860      delete [] interface;                                              \
     861    } while (0)
    743862
    744863// #define _ALLOC3_VAL_ACK_IN( sig, name, type, x1, x2, x3)
     
    746865
    747866#define _ALLOC3_VALACK_IN(    sig,type, x1, x2, x3)                     \
    748   {                                                                     \
    749     sig = new SC_IN (Tcontrol_t) *** [x1];                              \
    750     for (uint32_t it1=0; it1<x1; it1++)                                 \
    751       {                                                                 \
    752         sig [it1] = new SC_IN (Tcontrol_t) ** [x2];                     \
    753         for (uint32_t it2=0; it2<x2; it2++)                             \
    754           {                                                             \
    755             sig [it1][it2] = new SC_IN (Tcontrol_t) * [x3];             \
    756             for (uint32_t it3=0; it3<x3; it3++)                         \
    757               {                                                         \
    758                 sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_valack_in (type); \
    759               }                                                         \
    760           }                                                             \
    761       }                                                                 \
    762   }
     867  do                                                                    \
     868    {                                                                   \
     869      sig = new SC_IN (Tcontrol_t) *** [x1];                            \
     870      for (uint32_t it1=0; it1<x1; it1++)                               \
     871        {                                                               \
     872          sig [it1] = new SC_IN (Tcontrol_t) ** [x2];                   \
     873          for (uint32_t it2=0; it2<x2; it2++)                           \
     874            {                                                           \
     875              sig [it1][it2] = new SC_IN (Tcontrol_t) * [x3];           \
     876              for (uint32_t it3=0; it3<x3; it3++)                       \
     877                {                                                       \
     878                  sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_valack_in (type); \
     879                }                                                       \
     880            }                                                           \
     881        }                                                               \
     882    } while (0)
    763883
    764884#define _ALLOC3_VALACK_OUT(    sig,type, x1, x2, x3)                    \
    765   {                                                                     \
    766     sig = new SC_OUT (Tcontrol_t) *** [x1];                             \
    767     for (uint32_t it1=0; it1<x1; it1++)                                 \
    768       {                                                                 \
    769         sig [it1] = new SC_OUT (Tcontrol_t) ** [x2];                    \
    770         for (uint32_t it2=0; it2<x2; it2++)                             \
    771           {                                                             \
    772             sig [it1][it2] = new SC_OUT (Tcontrol_t) * [x3];            \
    773             for (uint32_t it3=0; it3<x3; it3++)                         \
    774               {                                                         \
    775                 sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_valack_out (type); \
    776               }                                                         \
    777           }                                                             \
    778       }                                                                 \
    779   }
     885  do                                                                    \
     886    {                                                                   \
     887      sig = new SC_OUT (Tcontrol_t) *** [x1];                           \
     888      for (uint32_t it1=0; it1<x1; it1++)                               \
     889        {                                                               \
     890          sig [it1] = new SC_OUT (Tcontrol_t) ** [x2];                  \
     891          for (uint32_t it2=0; it2<x2; it2++)                           \
     892            {                                                           \
     893              sig [it1][it2] = new SC_OUT (Tcontrol_t) * [x3];          \
     894              for (uint32_t it3=0; it3<x3; it3++)                       \
     895                {                                                       \
     896                  sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_valack_out (type); \
     897                }                                                       \
     898            }                                                           \
     899        }                                                               \
     900    } while (0)
    780901
    781902
    782903#define _ALLOC3_SIGNAL_IN( sig, name, type, size, x1, x2,x3)            \
    783   {                                                                     \
    784     sig = new SC_IN (type) *** [x1];                                    \
    785     for (uint32_t it1=0; it1<x1; it1++)                                 \
    786       {                                                                 \
    787         sig [it1] = new SC_IN (type) ** [x2];                           \
    788         for (uint32_t it2=0; it2<x2; it2++)                             \
    789           {                                                             \
    790             sig [it1][it2] = new SC_IN (type) * [x3];                   \
    791             for (uint32_t it3=0; it3<x3; it3++)                         \
    792               {                                                         \
    793                 if (size > 0)                                           \
    794                   {                                                     \
    795                     sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_in <type> (name, size); \
    796                   }                                                     \
    797                 else                                                    \
    798                   {                                                     \
    799                     PRINT_SIZE_NUL(_component,interface[it1][it2][it3],name); \
    800                   }                                                     \
    801               }                                                         \
    802           }                                                             \
    803       }                                                                 \
    804   }
     904  do                                                                    \
     905    {                                                                   \
     906      sig = new SC_IN (type) *** [x1];                                  \
     907      for (uint32_t it1=0; it1<x1; it1++)                               \
     908        {                                                               \
     909          sig [it1] = new SC_IN (type) ** [x2];                         \
     910          for (uint32_t it2=0; it2<x2; it2++)                           \
     911            {                                                           \
     912              sig [it1][it2] = new SC_IN (type) * [x3];                 \
     913              for (uint32_t it3=0; it3<x3; it3++)                       \
     914                {                                                       \
     915                  if (size > 0)                                         \
     916                    {                                                   \
     917                      sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_in <type> (name, size); \
     918                    }                                                   \
     919                  else                                                  \
     920                    {                                                   \
     921                      PRINT_SIZE_NUL(_component,interface[it1][it2][it3],name); \
     922                    }                                                   \
     923                }                                                       \
     924            }                                                           \
     925        }                                                               \
     926    } while (0)
    805927
    806928#define _ALLOC3_SIGNAL_OUT( sig, name, type, size, x1, x2,x3)           \
    807   {                                                                     \
    808     sig = new SC_OUT (type) *** [x1];                                   \
    809     for (uint32_t it1=0; it1<x1; it1++)                                 \
    810       {                                                                 \
    811         sig [it1] = new SC_OUT (type) ** [x2];                          \
    812         for (uint32_t it2=0; it2<x2; it2++)                             \
    813           {                                                             \
    814             sig [it1][it2] = new SC_OUT (type) * [x3];                  \
    815             for (uint32_t it3=0; it3<x3; it3++)                         \
    816               {                                                         \
    817                 if (size > 0)                                           \
    818                   {                                                     \
    819                     sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_out <type> (name, size); \
    820                   }                                                     \
    821                 else                                                    \
    822                   {                                                     \
    823                     PRINT_SIZE_NUL(_component,interface[it1][it2][it3],name); \
    824                   }                                                     \
    825               }                                                         \
    826           }                                                             \
    827       }                                                                 \
    828   }
     929  do                                                                    \
     930    {                                                                   \
     931      sig = new SC_OUT (type) *** [x1];                                 \
     932      for (uint32_t it1=0; it1<x1; it1++)                               \
     933        {                                                               \
     934          sig [it1] = new SC_OUT (type) ** [x2];                        \
     935          for (uint32_t it2=0; it2<x2; it2++)                           \
     936            {                                                           \
     937              sig [it1][it2] = new SC_OUT (type) * [x3];                \
     938              for (uint32_t it3=0; it3<x3; it3++)                       \
     939                {                                                       \
     940                  if (size > 0)                                         \
     941                    {                                                   \
     942                      sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_out <type> (name, size); \
     943                    }                                                   \
     944                  else                                                  \
     945                    {                                                   \
     946                      PRINT_SIZE_NUL(_component,interface[it1][it2][it3],name); \
     947                    }                                                   \
     948                }                                                       \
     949            }                                                           \
     950        }                                                               \
     951    } while (0)
    829952
    830953// #define ALLOC3_VAL_ACK_IN( sig, name, type      ) _ALLOC3_VAL_ACK_IN( sig, name, type      , iterator_1, iterator_2, iterator_3)
     
    836959
    837960#define DELETE3_SIGNAL(sig, x1, x2, x3, size)                           \
    838   {                                                                     \
    839     for (uint32_t it1=0; it1<x1; it1++)                                 \
    840       {                                                                 \
    841         for (uint32_t it2=0; it2<x2; it2++)                             \
    842           {                                                             \
    843             for (uint32_t it3=0; it3<x3; it3++)                         \
    844               {                                                         \
     961  do                                                                    \
     962    {                                                                   \
     963      for (uint32_t it1=0; it1<x1; it1++)                               \
     964        {                                                               \
     965          for (uint32_t it2=0; it2<x2; it2++)                           \
     966            {                                                           \
     967              for (uint32_t it3=0; it3<x3; it3++)                       \
     968                {                                                       \
     969                  if (size > 0)                                         \
     970                    {                                                   \
     971                      delete sig[it1][it2][it3];                        \
     972                    }                                                   \
     973                }                                                       \
     974              delete [] sig[it1][it2];                                  \
     975            }                                                           \
     976          delete [] sig[it1];                                           \
     977        }                                                               \
     978      delete [] sig;                                                    \
     979    } while (0)
     980
     981#define ALLOC3_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2,x3)     \
     982  do                                                                    \
     983    {                                                                   \
     984      sig = new SC_IN (type) *** [x1];                                  \
     985      for (uint32_t it1=0; it1<x1; it1++)                               \
     986        {                                                               \
     987          sig [it1] = new SC_IN (type) ** [x2];                         \
     988          for (uint32_t it2=0; it2<x2; it2++)                           \
     989            {                                                           \
     990              sig [it1][it2] = new SC_IN (type) * [x3];                 \
     991              for (uint32_t it3=0; it3<x3; it3++)                       \
    845992                if (size > 0)                                           \
    846993                  {                                                     \
    847                     delete sig[it1][it2][it3];                          \
     994                    std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(it3)+"_"+toString(name)); \
     995                    sig [it1][it2][it3] = new SC_IN (type) (str.c_str()); \
     996                  }                                                     \
     997            }                                                           \
     998        }                                                               \
     999    } while (0)
     1000
     1001#define ALLOC3_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size, x1, x2,x3)    \
     1002  do                                                                    \
     1003    {                                                                   \
     1004      sig = new SC_OUT (type) *** [x1];                                 \
     1005      for (uint32_t it1=0; it1<x1; it1++)                               \
     1006        {                                                               \
     1007          sig [it1] = new SC_OUT (type) ** [x2];                        \
     1008          for (uint32_t it2=0; it2<x2; it2++)                           \
     1009            {                                                           \
     1010              sig [it1][it2] = new SC_OUT (type) * [x3];                \
     1011              for (uint32_t it3=0; it3<x3; it3++)                       \
     1012                if (size > 0)                                           \
     1013                  {                                                     \
     1014                    std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(it3)+"_"+toString(name)); \
     1015                    sig [it1][it2][it3] = new SC_OUT(type) (str.c_str()); \
     1016                  }                                                     \
     1017            }                                                           \
     1018        }                                                               \
     1019    } while (0)
     1020
     1021#define DELETE3_FOREIGN_SIGNAL( sig, size,x1,x2,x3)            \
     1022  do                                                           \
     1023    {                                                          \
     1024      DELETE3_SIGNAL(sig,x1,x2,x3,size);                       \
     1025    } while (0)
     1026
     1027#define ALLOC3_SC_SIGNAL( sig, name, type, x1, x2, x3)                  \
     1028  do                                                                    \
     1029    {                                                                   \
     1030      sig = new sc_signal<type> *** [x1];                               \
     1031      {                                                                 \
     1032        std::string separator="_";                                      \
     1033        std::string str;                                                \
     1034        for (uint32_t it1=0; it1<x1; it1++)                             \
     1035          {                                                             \
     1036            sig [it1] = new sc_signal<type> ** [x2];                    \
     1037            for (uint32_t it2=0; it2<x2; it2++)                         \
     1038              {                                                         \
     1039                sig [it1][it2] = new sc_signal<type> * [x3];            \
     1040                for (uint32_t it3=0; it3<x3; it3++)                     \
     1041                  {                                                     \
     1042                    str = name+separator+toString(it1)+separator+toString(it2)+separator+toString(it3); \
     1043                    sig [it1][it2][it3] = new sc_signal<type> (str.c_str()); \
     1044                    PRINT_SIGNAL_ADDRESS(str.c_str(),sig[it1][it2][it3]); \
    8481045                  }                                                     \
    8491046              }                                                         \
    850             delete [] sig[it1][it2];                                    \
    851           }                                                             \
    852         delete [] sig[it1];                                             \
    853       }                                                                 \
    854     delete [] sig;                                                      \
    855   }
    856 
    857 #define ALLOC3_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2,x3)     \
    858   {                                                                     \
    859     sig = new SC_IN (type) *** [x1];                                    \
    860     for (uint32_t it1=0; it1<x1; it1++)                                 \
    861       {                                                                 \
    862         sig [it1] = new SC_IN (type) ** [x2];                           \
    863         for (uint32_t it2=0; it2<x2; it2++)                             \
    864           {                                                             \
    865             sig [it1][it2] = new SC_IN (type) * [x3];                   \
    866             for (uint32_t it3=0; it3<x3; it3++)                         \
    867               if (size > 0)                                             \
    868                 {                                                       \
    869                   std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(it3)+"_"+toString(name)); \
    870                   sig [it1][it2][it3] = new SC_IN (type) (str.c_str()); \
    871                 }                                                       \
    8721047          }                                                             \
    8731048      }                                                                 \
    874   }
    875 
    876 #define ALLOC3_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size, x1, x2,x3)    \
    877   {                                                                     \
    878     sig = new SC_OUT (type) *** [x1];                                   \
    879     for (uint32_t it1=0; it1<x1; it1++)                                 \
    880       {                                                                 \
    881         sig [it1] = new SC_OUT (type) ** [x2];                          \
     1049    } while (0)
     1050
     1051#define INSTANCE3_SC_SIGNAL(component, sig, x1, x2, x3)                 \
     1052  do                                                                    \
     1053    {                                                                   \
     1054      for (uint32_t it1=0; it1<x1; it1++)                               \
    8821055        for (uint32_t it2=0; it2<x2; it2++)                             \
    883           {                                                             \
    884             sig [it1][it2] = new SC_OUT (type) * [x3];                  \
    885             for (uint32_t it3=0; it3<x3; it3++)                        \
    886               if (size > 0)                                            \
    887                 {                                                      \
    888                   std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(it3)+"_"+toString(name)); \
    889                   sig [it1][it2][it3] = new SC_OUT(type) (str.c_str()); \
    890                 }                                                       \
    891           }                                                             \
    892       }                                                                 \
    893   }
    894 
    895 #define DELETE3_FOREIGN_SIGNAL( sig, size,x1,x2,x3)            \
    896   {                                                            \
    897     DELETE3_SIGNAL(sig,x1,x2,x3,size);                         \
    898   }
    899 
    900 #define ALLOC3_SC_SIGNAL( sig, name, type, x1, x2, x3)                  \
    901   sig = new sc_signal<type> *** [x1];                                   \
    902   {                                                                     \
    903     std::string separator="_";                                          \
    904     std::string str;                                                    \
    905     for (uint32_t it1=0; it1<x1; it1++)                                 \
    906       {                                                                 \
    907          sig [it1] = new sc_signal<type> ** [x2];                       \
    908          for (uint32_t it2=0; it2<x2; it2++)                            \
    909            {                                                            \
    910               sig [it1][it2] = new sc_signal<type> * [x3];              \
     1056          for (uint32_t it3=0; it3<x3; it3++)                           \
     1057            {                                                           \
     1058              TEST_SIGNAL(component->sig  [it1][it2][it3]->name(),component->sig  [it1][it2][it3]); \
     1059              TEST_SIGNAL(sig             [it1][it2][it3]->name(),sig             [it1][it2][it3]); \
     1060              (*(component->sig[it1][it2][it3])) (*(sig[it1][it2][it3])); \
     1061            }                                                          \
     1062    } while (0)
     1063
     1064#define _INSTANCE3_SC_SIGNAL(component, sig1, sig2, x1, x2, x3)         \
     1065  do                                                                    \
     1066    {                                                                   \
     1067      for (uint32_t it1=0; it1<x1; it1++)                               \
     1068        for (uint32_t it2=0; it2<x2; it2++)                             \
     1069          for (uint32_t it3=0; it3<x3; it3++)                           \
     1070            {                                                           \
     1071              TEST_SIGNAL(component->sig1 [it1][it2][it3]->name(),component->sig1 [it1][it2][it3]); \
     1072              TEST_SIGNAL(sig2            [it1][it2][it3]->name(),sig2            [it1][it2][it3]); \
     1073              (*(component->sig1[it1][it2][it3])) (*(sig2[it1][it2][it3])); \
     1074            }                                                           \
     1075    } while (0)
     1076
     1077#define DELETE3_SC_SIGNAL(sig,x1,x2,x3)                                 \
     1078  do                                                                    \
     1079                                                                     \
     1080      for (uint32_t it1=0; it1<x1; it1++)                               \
     1081        {                                                               \
     1082          for (uint32_t it2=0; it2<x2; it2++)                           \
     1083            {                                                           \
    9111084              for (uint32_t it3=0; it3<x3; it3++)                       \
    9121085                {                                                       \
    913                   str = name+separator+toString(it1)+separator+toString(it2)+separator+toString(it3); \
    914                   sig [it1][it2][it3] = new sc_signal<type> (str.c_str()); \
    915                   PRINT_SIGNAL_ADDRESS(str.c_str(),sig[it1][it2][it3]); \
     1086                  PRINT_SIGNAL_ADDRESS("",sig[it1][it2][it3]);          \
     1087                  delete sig[it1][it2][it3];                            \
    9161088                }                                                       \
    917            }                                                            \
    918       }                                                                 \
    919   }
    920 
    921 #define INSTANCE3_SC_SIGNAL(component, sig, x1, x2, x3)                 \
    922   for (uint32_t it1=0; it1<x1; it1++)                                   \
    923     for (uint32_t it2=0; it2<x2; it2++)                                 \
    924       for (uint32_t it3=0; it3<x3; it3++)                               \
    925         {                                                               \
    926           TEST_SIGNAL(component->sig  [it1][it2][it3]->name(),component->sig  [it1][it2][it3]); \
    927           TEST_SIGNAL(sig             [it1][it2][it3]->name(),sig             [it1][it2][it3]); \
    928           (*(component->sig[it1][it2][it3])) (*(sig[it1][it2][it3]));   \
    929         }
    930 
    931 #define _INSTANCE3_SC_SIGNAL(component, sig1, sig2, x1, x2, x3)         \
    932   for (uint32_t it1=0; it1<x1; it1++)                                   \
    933     for (uint32_t it2=0; it2<x2; it2++)                                 \
    934       for (uint32_t it3=0; it3<x3; it3++)                               \
    935         {                                                               \
    936           TEST_SIGNAL(component->sig1 [it1][it2][it3]->name(),component->sig1 [it1][it2][it3]); \
    937           TEST_SIGNAL(sig2            [it1][it2][it3]->name(),sig2            [it1][it2][it3]); \
    938           (*(component->sig1[it1][it2][it3])) (*(sig2[it1][it2][it3])); \
    939         }
    940 
    941 #define DELETE3_SC_SIGNAL(sig,x1,x2,x3)                                 \
    942   {                                                                     \
    943     for (uint32_t it1=0; it1<x1; it1++)                                 \
    944       {                                                                 \
    945         for (uint32_t it2=0; it2<x2; it2++)                             \
    946           {                                                             \
    947             for (uint32_t it3=0; it3<x3; it3++)                         \
    948               {                                                         \
    949                 PRINT_SIGNAL_ADDRESS("",sig[it1][it2][it3]);            \
    950                 delete sig[it1][it2][it3];                              \
    951               }                                                         \
    952             delete [] sig[it1][it2];                                    \
    953           }                                                             \
    954         delete [] sig[it1];                                             \
    955       }                                                                 \
    956     delete [] sig;                                                      \
    957   }
     1089              delete [] sig[it1][it2];                                  \
     1090            }                                                           \
     1091          delete [] sig[it1];                                           \
     1092        }                                                               \
     1093      delete [] sig;                                                    \
     1094    } while (0)
    9581095
    9591096#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Types.h

    r124 r128  
    1616
    1717  // ***** general
     18  typedef uint32_t           Tcounter_t; // universal counter
     19  typedef uint32_t           Tptr_t;     // universal pointer
    1820  typedef uint32_t           Tinstruction_t;
    1921  typedef bool               Tcontrol_t;
    2022  typedef uint8_t            Texception_t;
    2123  typedef uint8_t            Tcontext_t;
    22   typedef uint16_t           Tpacket_t;
     24  typedef Tptr_t             Tpacket_t;
    2325  typedef uint8_t            Toperation_t;
    2426  typedef uint8_t            Ttype_t;
    25   typedef uint32_t           Tcounter_t; // universal counter
    26   typedef uint32_t           Tptr_t;     // universal pointer
    2727  typedef uint32_t           Tspr_t;
    2828  typedef uint16_t           Tspr_address_t;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h

    r127 r128  
    1010#define MORPHEO_MAJOR_VERSION "0"
    1111#define MORPHEO_MINOR_VERSION "2"
    12 #define MORPHEO_REVISION      "127"
     12#define MORPHEO_REVISION      "128"
    1313#define MORPHEO_CODENAME      "Castor"
    1414
    15 #define MORPHEO_DATE_DAY      "17
     15#define MORPHEO_DATE_DAY      "26
    1616#define MORPHEO_DATE_MONTH    "06"
    1717#define MORPHEO_DATE_YEAR     "2009"
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp

    r113 r128  
    2929      throw (ERRORMORPHEO (FUNCTION,"Signal \""+_name+"\", can't map with signal \""+signal_dest->get_name()+"\", because the second signal is not already allocate."));
    3030
     31    // Test if type is compatible
     32    if (_type_info != signal_dest->_type_info)
     33      throw (ERRORMORPHEO (FUNCTION,toString(_("Signal \"%s\" can't been linked with signal \"%s\" : incompatible type (%s != %s)."),
     34                                             _name.c_str(),
     35                                             signal_dest->get_name().c_str(),
     36                                             toString(_type_info).c_str(),
     37                                             toString(signal_dest->_type_info).c_str())));
     38
    3139    // List of all case
    3240    //
     
    3947
    4048    // list valid case
     49
    4150    if (not (    signal_dest_is_port and (((signal_src->_direction == IN ) and (signal_dest->_direction == IN      )) or
    4251                                          ((signal_src->_direction == OUT) and (signal_dest->_direction == OUT     )))) and
  • trunk/IPs/systemC/processor/Morpheo/Files/Instance_x1_w8_1.cfg

    r124 r128  
    102102      <parameter name="dir_bht_nb_shifter"                  value="1024" />
    103103      <parameter name="dir_have_pht"                        value="1"  />
    104       <parameter name="dir_pht_size_counter"                value="3"  />
     104      <parameter name="dir_pht_size_counter"                value="2"  />
    105105      <parameter name="dir_pht_nb_counter"                  value="4096" />
    106106      <parameter name="dir_pht_size_address_share"          value="0"  />
  • trunk/IPs/systemC/processor/Morpheo/Files/Instance_x1_w8_2.cfg

    r124 r128  
    3131    <parameter name="rename_select_nb_front_end_select"     value="1"  />
    3232    <parameter name="nb_general_register"                   value="512"/>
    33     <parameter name="nb_special_register"                   value="128"/>
     33    <parameter name="nb_special_register"                   value="256"/>
    3434    <parameter name="nb_reg_free"                           value="16" />
    3535    <parameter name="nb_rename_unit_bank"                   value="16" />
     
    102102      <parameter name="dir_bht_nb_shifter"                  value="1024" />
    103103      <parameter name="dir_have_pht"                        value="1"  />
    104       <parameter name="dir_pht_size_counter"                value="3"  />
     104      <parameter name="dir_pht_size_counter"                value="2"  />
    105105      <parameter name="dir_pht_nb_counter"                  value="4096" />
    106106      <parameter name="dir_pht_size_address_share"          value="0"  />
  • trunk/IPs/systemC/processor/Morpheo/Files/Instance_x4_w8_1.cfg

    r124 r128  
    3131    <parameter name="rename_select_nb_front_end_select"     value="1"  />
    3232    <parameter name="nb_general_register"                   value="512"/>
    33     <parameter name="nb_special_register"                   value="128"/>
     33    <parameter name="nb_special_register"                   value="256"/>
    3434    <parameter name="nb_reg_free"                           value="16" />
    3535    <parameter name="nb_rename_unit_bank"                   value="16" />
     
    4949  </write_bloc>                                             
    5050
    51   <load_store_unit id="0">                                 
    52     <parameter name="size_store_queue"                      value="16" />
    53     <parameter name="size_load_queue"                       value="32" />
    54     <parameter name="size_speculative_access_queue"         value="4" />
    55     <parameter name="nb_port_check"                         value="4" />
     51  <load_store_unit id="0,1,2,3">                                 
     52    <parameter name="size_store_queue"                      value="4" />
     53    <parameter name="size_load_queue"                       value="8" />
     54    <parameter name="size_speculative_access_queue"         value="2" />
     55    <parameter name="nb_port_check"                         value="1" />
    5656    <parameter name="speculative_load"                      value="2" />
    5757    <parameter name="nb_bypass_memory"                      value="0" />
     
    9898                                                           
    9999    <predictor id="0">                                     
    100       <parameter name="dir_have_bht"                        value="1"  />
    101       <parameter name="dir_bht_size_shifter"                value="10" />
    102       <parameter name="dir_bht_nb_shifter"                  value="1024" />
     100      <parameter name="dir_have_bht"                        value="0"  />
    103101      <parameter name="dir_have_pht"                        value="1"  />
    104       <parameter name="dir_pht_size_counter"                value="3"  />
     102      <parameter name="dir_pht_size_counter"                value="2"  />
    105103      <parameter name="dir_pht_nb_counter"                  value="4096" />
    106104      <parameter name="dir_pht_size_address_share"          value="0"  />
    107     </predictor>                                           
    108     <predictor id="1">                                     
    109       <parameter name="dir_have_bht"                        value="1" />
    110       <parameter name="dir_bht_size_shifter"                value="12" />
    111       <parameter name="dir_bht_nb_shifter"                  value="1" />
    112       <parameter name="dir_have_pht"                        value="1" />
    113       <parameter name="dir_pht_size_counter"                value="2" />
    114       <parameter name="dir_pht_nb_counter"                  value="4096" />
    115       <parameter name="dir_pht_size_address_share"          value="0" />
    116     </predictor>                                           
    117     <predictor id="2">                                     
    118       <parameter name="dir_have_bht"                        value="1" />
    119       <parameter name="dir_bht_size_shifter"                value="12" />
    120       <parameter name="dir_bht_nb_shifter"                  value="1" />
    121       <parameter name="dir_have_pht"                        value="1" />
    122       <parameter name="dir_pht_size_counter"                value="2" />
    123       <parameter name="dir_pht_nb_counter"                  value="4096" />
    124       <parameter name="dir_pht_size_address_share"          value="0" />
    125105    </predictor>                                           
    126106
     
    152132    <parameter name="nb_read_unit"                          value="11" />
    153133    <parameter name="nb_write_unit"                         value="11" />
    154     <parameter name="nb_execute_unit"                       value="11" />
     134    <parameter name="nb_execute_unit"                       value="14" />
    155135    <parameter name="nb_gpr_bank"                           value="1" />
    156136    <parameter name="nb_gpr_port_read_by_bank"              value="22" />
     
    172152  <parameter name="icache_port_load_balancing"              value="1" />
    173153                                                           
    174   <parameter name="nb_dcache_port"                          value="1" />
     154  <parameter name="nb_dcache_port"                          value="4" />
    175155  <parameter name="dcache_port_priority"                    value="1" />
    176156  <parameter name="dcache_port_load_balancing"              value="1" />
     
    216196
    217197  <link name="link_load_store_unit_with_thread"        src="0"     dest="0"   />
    218   <link name="link_load_store_unit_with_thread"        src="1"     dest="0"   />
    219   <link name="link_load_store_unit_with_thread"        src="2"     dest="0"   />
    220   <link name="link_load_store_unit_with_thread"        src="3"     dest="0"   />
     198  <link name="link_load_store_unit_with_thread"        src="1"     dest="1"   />
     199  <link name="link_load_store_unit_with_thread"        src="2"     dest="2"   />
     200  <link name="link_load_store_unit_with_thread"        src="3"     dest="3"   />
    221201
    222202  <link name="link_execute_unit_with_load_store_unit"  src="0"     dest="0.0"/>
    223   <link name="link_execute_unit_with_functionnal_unit" src="0"     dest="0.1"/>
    224   <link name="link_execute_unit_with_functionnal_unit" src="1"     dest="0.2"/>
    225   <link name="link_execute_unit_with_functionnal_unit" src="2"     dest="0.3"/>
    226   <link name="link_execute_unit_with_functionnal_unit" src="3"     dest="0.4"/>
    227   <link name="link_execute_unit_with_functionnal_unit" src="4"     dest="0.5"/>
    228   <link name="link_execute_unit_with_functionnal_unit" src="5"     dest="0.6"/>
    229   <link name="link_execute_unit_with_functionnal_unit" src="6"     dest="0.7"/>
    230   <link name="link_execute_unit_with_functionnal_unit" src="7"     dest="0.8"/>
    231   <link name="link_execute_unit_with_functionnal_unit" src="8"     dest="0.9"/>
    232   <link name="link_execute_unit_with_functionnal_unit" src="9"     dest="0.10"/>
     203  <link name="link_execute_unit_with_load_store_unit"  src="1"     dest="0.1"/>
     204  <link name="link_execute_unit_with_load_store_unit"  src="2"     dest="0.2"/>
     205  <link name="link_execute_unit_with_load_store_unit"  src="3"     dest="0.3"/>
     206
     207  <link name="link_execute_unit_with_functionnal_unit" src="0"     dest="0.4"/>
     208  <link name="link_execute_unit_with_functionnal_unit" src="1"     dest="0.5"/>
     209  <link name="link_execute_unit_with_functionnal_unit" src="2"     dest="0.6"/>
     210  <link name="link_execute_unit_with_functionnal_unit" src="3"     dest="0.7"/>
     211  <link name="link_execute_unit_with_functionnal_unit" src="4"     dest="0.8"/>
     212  <link name="link_execute_unit_with_functionnal_unit" src="5"     dest="0.9"/>
     213  <link name="link_execute_unit_with_functionnal_unit" src="6"     dest="0.10"/>
     214  <link name="link_execute_unit_with_functionnal_unit" src="7"     dest="0.11"/>
     215  <link name="link_execute_unit_with_functionnal_unit" src="8"     dest="0.12"/>
     216  <link name="link_execute_unit_with_functionnal_unit" src="9"     dest="0.13"/>
    233217
    234218  <link name="link_icache_port_with_thread"            src="0"     dest="0"   />
     
    238222
    239223  <link name="link_dcache_port_with_load_store_unit"   src="0.0"   dest="0"   />
     224  <link name="link_dcache_port_with_load_store_unit"   src="1.0"   dest="1"   />
     225  <link name="link_dcache_port_with_load_store_unit"   src="2.0"   dest="2"   />
     226  <link name="link_dcache_port_with_load_store_unit"   src="3.0"   dest="3"   />
    240227
    241228  <link name="table_dispatch"                          src="0.0.0" dest="1"   />
     
    350337  <link name="link_read_bloc_and_load_store_unit"      src="10.0"  dest="0"   />
    351338
     339  <link name="link_read_bloc_and_load_store_unit"      src="0.1"   dest="1"   />
     340  <link name="link_read_bloc_and_load_store_unit"      src="1.1"   dest="0"   />
     341  <link name="link_read_bloc_and_load_store_unit"      src="2.1"   dest="0"   />
     342  <link name="link_read_bloc_and_load_store_unit"      src="3.1"   dest="0"   />
     343  <link name="link_read_bloc_and_load_store_unit"      src="4.1"   dest="0"   />
     344  <link name="link_read_bloc_and_load_store_unit"      src="5.1"   dest="0"   />
     345  <link name="link_read_bloc_and_load_store_unit"      src="6.1"   dest="0"   />
     346  <link name="link_read_bloc_and_load_store_unit"      src="7.1"   dest="0"   />
     347  <link name="link_read_bloc_and_load_store_unit"      src="8.1"   dest="0"   />
     348  <link name="link_read_bloc_and_load_store_unit"      src="9.1"   dest="0"   />
     349  <link name="link_read_bloc_and_load_store_unit"      src="10.1"  dest="0"   />
     350
     351  <link name="link_read_bloc_and_load_store_unit"      src="0.2"   dest="1"   />
     352  <link name="link_read_bloc_and_load_store_unit"      src="1.2"   dest="0"   />
     353  <link name="link_read_bloc_and_load_store_unit"      src="2.2"   dest="0"   />
     354  <link name="link_read_bloc_and_load_store_unit"      src="3.2"   dest="0"   />
     355  <link name="link_read_bloc_and_load_store_unit"      src="4.2"   dest="0"   />
     356  <link name="link_read_bloc_and_load_store_unit"      src="5.2"   dest="0"   />
     357  <link name="link_read_bloc_and_load_store_unit"      src="6.2"   dest="0"   />
     358  <link name="link_read_bloc_and_load_store_unit"      src="7.2"   dest="0"   />
     359  <link name="link_read_bloc_and_load_store_unit"      src="8.2"   dest="0"   />
     360  <link name="link_read_bloc_and_load_store_unit"      src="9.2"   dest="0"   />
     361  <link name="link_read_bloc_and_load_store_unit"      src="10.2"  dest="0"   />
     362
     363  <link name="link_read_bloc_and_load_store_unit"      src="0.3"   dest="1"   />
     364  <link name="link_read_bloc_and_load_store_unit"      src="1.3"   dest="0"   />
     365  <link name="link_read_bloc_and_load_store_unit"      src="2.3"   dest="0"   />
     366  <link name="link_read_bloc_and_load_store_unit"      src="3.3"   dest="0"   />
     367  <link name="link_read_bloc_and_load_store_unit"      src="4.3"   dest="0"   />
     368  <link name="link_read_bloc_and_load_store_unit"      src="5.3"   dest="0"   />
     369  <link name="link_read_bloc_and_load_store_unit"      src="6.3"   dest="0"   />
     370  <link name="link_read_bloc_and_load_store_unit"      src="7.3"   dest="0"   />
     371  <link name="link_read_bloc_and_load_store_unit"      src="8.3"   dest="0"   />
     372  <link name="link_read_bloc_and_load_store_unit"      src="9.3"   dest="0"   />
     373  <link name="link_read_bloc_and_load_store_unit"      src="10.3"  dest="0"   />
     374
    352375  <link name="link_read_bloc_and_functionnal_unit"     src="0.0"   dest="1"   />
    353376  <link name="link_read_bloc_and_functionnal_unit"     src="1.0"   dest="1"   />
     
    482505  <link name="link_write_bloc_and_load_store_unit"     src="10.0"  dest="0"   />
    483506
     507  <link name="link_write_bloc_and_load_store_unit"     src="0.1"   dest="1"   />
     508  <link name="link_write_bloc_and_load_store_unit"     src="1.1"   dest="0"   />
     509  <link name="link_write_bloc_and_load_store_unit"     src="2.1"   dest="0"   />
     510  <link name="link_write_bloc_and_load_store_unit"     src="3.1"   dest="0"   />
     511  <link name="link_write_bloc_and_load_store_unit"     src="4.1"   dest="0"   />
     512  <link name="link_write_bloc_and_load_store_unit"     src="5.1"   dest="0"   />
     513  <link name="link_write_bloc_and_load_store_unit"     src="6.1"   dest="0"   />
     514  <link name="link_write_bloc_and_load_store_unit"     src="7.1"   dest="0"   />
     515  <link name="link_write_bloc_and_load_store_unit"     src="8.1"   dest="0"   />
     516  <link name="link_write_bloc_and_load_store_unit"     src="9.1"   dest="0"   />
     517  <link name="link_write_bloc_and_load_store_unit"     src="10.1"  dest="0"   />
     518
     519  <link name="link_write_bloc_and_load_store_unit"     src="0.2"   dest="1"   />
     520  <link name="link_write_bloc_and_load_store_unit"     src="1.2"   dest="0"   />
     521  <link name="link_write_bloc_and_load_store_unit"     src="2.2"   dest="0"   />
     522  <link name="link_write_bloc_and_load_store_unit"     src="3.2"   dest="0"   />
     523  <link name="link_write_bloc_and_load_store_unit"     src="4.2"   dest="0"   />
     524  <link name="link_write_bloc_and_load_store_unit"     src="5.2"   dest="0"   />
     525  <link name="link_write_bloc_and_load_store_unit"     src="6.2"   dest="0"   />
     526  <link name="link_write_bloc_and_load_store_unit"     src="7.2"   dest="0"   />
     527  <link name="link_write_bloc_and_load_store_unit"     src="8.2"   dest="0"   />
     528  <link name="link_write_bloc_and_load_store_unit"     src="9.2"   dest="0"   />
     529  <link name="link_write_bloc_and_load_store_unit"     src="10.2"  dest="0"   />
     530
     531  <link name="link_write_bloc_and_load_store_unit"     src="0.3"   dest="1"   />
     532  <link name="link_write_bloc_and_load_store_unit"     src="1.3"   dest="0"   />
     533  <link name="link_write_bloc_and_load_store_unit"     src="2.3"   dest="0"   />
     534  <link name="link_write_bloc_and_load_store_unit"     src="3.3"   dest="0"   />
     535  <link name="link_write_bloc_and_load_store_unit"     src="4.3"   dest="0"   />
     536  <link name="link_write_bloc_and_load_store_unit"     src="5.3"   dest="0"   />
     537  <link name="link_write_bloc_and_load_store_unit"     src="6.3"   dest="0"   />
     538  <link name="link_write_bloc_and_load_store_unit"     src="7.3"   dest="0"   />
     539  <link name="link_write_bloc_and_load_store_unit"     src="8.3"   dest="0"   />
     540  <link name="link_write_bloc_and_load_store_unit"     src="9.3"   dest="0"   />
     541  <link name="link_write_bloc_and_load_store_unit"     src="10.3"  dest="0"   />
     542
    484543  <link name="link_write_bloc_and_functionnal_unit"    src="0.0"   dest="0"   />
    485544  <link name="link_write_bloc_and_functionnal_unit"    src="1.0"   dest="1"   />
  • trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.sim

    r127 r128  
    1515  <parameter  name="directory_vhdl"                         value="."       />
    1616  <parameter  name="directory_position"                     value="."       />
    17   <parameter  name="directory_log"                          value="/tmp/"   />
     17  <parameter  name="directory_log"                          value="/dsk/l1/misc/Morpheo/"   />
    1818
    1919  <parameter  name="statistics_cycle_start"                 value="1000000" />
     
    2525  <parameter  name="simulation_file_with_date"              value="1"       />
    2626
    27   <parameter  name="debug_level"                            value="3"       />
     27  <parameter  name="debug_level"                            value="0"       />
    2828  <parameter  name="debug_cycle_start"                      value="0"       />
    2929  <parameter  name="debug_cycle_stop"                       value="20000000"/>
  • trunk/IPs/systemC/processor/Morpheo/Files/debug.sim

    r127 r128  
    1515  <parameter  name="directory_vhdl"                         value="."       />
    1616  <parameter  name="directory_position"                     value="."       />
    17   <parameter  name="directory_log"                          value="/tmp/"   />
     17  <parameter  name="directory_log"                          value="/dsk/l1/misc/Morpheo/"   />
    1818
    19   <parameter  name="statistics_cycle_start"                 value="100"     />
     19  <parameter  name="statistics_cycle_start"                 value="5"       />
    2020  <parameter  name="statistics_period"                      value="0"       />
    2121                                                           
     
    2727  <parameter  name="debug_level"                            value="3"       />
    2828  <parameter  name="debug_cycle_start"                      value="0"       />
    29   <parameter  name="debug_cycle_stop"                       value="50"     />
     29  <parameter  name="debug_cycle_stop"                       value="100"     />
    3030  <parameter  name="debug_nb_cycle"                         value="200000"  />
    3131
    3232  <parameter  name="debug_log_file_generate"                value="0"       />
    3333  <parameter  name="debug_idle_cycle"                       value="200"     />
    34   <parameter  name="debug_idle_time"                        value="5"       />
     34  <parameter  name="debug_idle_time"                        value="20"       />
    3535
    36   <component  name="Comparator"                             model="systemc" debug="0" />
    37   <component  name="Counter"                                model="systemc" debug="0" />
    38   <component  name="Divider"                                model="systemc" debug="0" />
    39   <component  name="Multiplier"                             model="systemc" debug="0" />
    40   <component  name="Priority"                               model="systemc" debug="0" />
    41   <component  name="Queue_Control"                          model="systemc" debug="0" />         
    42   <component  name="Queue"                                  model="systemc" debug="0" />
    43   <component  name="RegisterFile_Monolithic"                model="systemc" debug="0" />
    44   <component  name="RegisterFile_Multi_Banked"              model="systemc" debug="0" />
    45   <component  name="RegisterFile"                           model="systemc" debug="0" />
    46   <component  name="Select_Priority_Fixed"                  model="systemc" debug="0" />
    47   <component  name="Select"                                 model="systemc" debug="0" />
    48   <component  name="Shifter"                                model="systemc" debug="0" />
    49   <component  name="Sort"                                   model="systemc" debug="0" />
    50   <component  name="Victim_Pseudo_LRU"                      model="systemc" debug="0" />
    51   <component  name="Victim"                                 model="systemc" debug="0" />
    52   <component  name="Execute_loop_Glue"                      model="systemc" debug="0" />
    53   <component  name="Functionnal_unit"                       model="systemc" debug="0" />
    54   <component  name="Load_store_unit"                        model="systemc" debug="0" />
    55   <component  name="Read_queue"                             model="systemc" debug="0" />
    56   <component  name="Reservation_station"                    model="systemc" debug="0" />
    57   <component  name="Read_unit"                              model="systemc" debug="0" />
    58   <component  name="Execute_queue"                          model="systemc" debug="0" />
    59   <component  name="Write_queue"                            model="systemc" debug="0" />
    60   <component  name="Write_unit"                             model="systemc" debug="0" />
    61   <component  name="Execution_unit_to_Write_unit"           model="systemc" debug="0" />
    62   <component  name="Read_unit_to_Execution_unit"            model="systemc" debug="0" />
    63   <component  name="Register_unit_Glue"                     model="systemc" debug="0" />
    64   <component  name="Register_unit"                          model="systemc" debug="0" />
    65   <component  name="Execute_loop"                           model="systemc" debug="0" />
     36  <component  name="Comparator"                             model="systemc" debug="1" />
     37  <component  name="Counter"                                model="systemc" debug="1" />
     38  <component  name="Divider"                                model="systemc" debug="1" />
     39  <component  name="Multiplier"                             model="systemc" debug="1" />
     40  <component  name="Priority"                               model="systemc" debug="1" />
     41  <component  name="Queue_Control"                          model="systemc" debug="1" />         
     42  <component  name="Queue"                                  model="systemc" debug="1" />
     43  <component  name="RegisterFile_Monolithic"                model="systemc" debug="1" />
     44  <component  name="RegisterFile_Multi_Banked"              model="systemc" debug="1" />
     45  <component  name="RegisterFile"                           model="systemc" debug="1" />
     46  <component  name="Select_Priority_Fixed"                  model="systemc" debug="1" />
     47  <component  name="Select"                                 model="systemc" debug="1" />
     48  <component  name="Shifter"                                model="systemc" debug="1" />
     49  <component  name="Sort"                                   model="systemc" debug="1" />
     50  <component  name="Victim_Pseudo_LRU"                      model="systemc" debug="1" />
     51  <component  name="Victim"                                 model="systemc" debug="1" />
     52  <component  name="Execute_loop_Glue"                      model="systemc" debug="1" />
     53  <component  name="Functionnal_unit"                       model="systemc" debug="1" />
     54  <component  name="Load_store_unit"                        model="systemc" debug="1" />
     55  <component  name="Read_queue"                             model="systemc" debug="1" />
     56  <component  name="Reservation_station"                    model="systemc" debug="1" />
     57  <component  name="Read_unit"                              model="systemc" debug="1" />
     58  <component  name="Execute_queue"                          model="systemc" debug="1" />
     59  <component  name="Write_queue"                            model="systemc" debug="1" />
     60  <component  name="Write_unit"                             model="systemc" debug="1" />
     61  <component  name="Execution_unit_to_Write_unit"           model="systemc" debug="1" />
     62  <component  name="Read_unit_to_Execution_unit"            model="systemc" debug="1" />
     63  <component  name="Register_unit_Glue"                     model="systemc" debug="1" />
     64  <component  name="Register_unit"                          model="systemc" debug="1" />
     65  <component  name="Execute_loop"                           model="systemc" debug="1" />
    6666  <component  name="Commit_unit"                            model="systemc" debug="1" />
    6767  <component  name="Issue_queue"                            model="systemc" debug="1" />
    68   <component  name="OOO_Engine_Glue"                        model="systemc" debug="0" />
     68  <component  name="OOO_Engine_Glue"                        model="systemc" debug="1" />
    6969  <component  name="Reexecute_unit"                         model="systemc" debug="1" />
    70   <component  name="Load_Store_pointer_unit"                model="systemc" debug="0" />
    71   <component  name="Dependency_checking_unit"               model="systemc" debug="0" />
    72   <component  name="Free_List_unit"                         model="systemc" debug="0" />
    73   <component  name="Register_Address_Translation_unit"      model="systemc" debug="0" />
    74   <component  name="Register_translation_unit_Glue"         model="systemc" debug="0" />
    75   <component  name="Stat_List_unit"                         model="systemc" debug="0" />
    76   <component  name="Register_translation_unit"              model="systemc" debug="0" />
    77   <component  name="Rename_unit_Glue"                       model="systemc" debug="0" />
    78   <component  name="Rename_select"                          model="systemc" debug="0" />
    79   <component  name="Rename_unit"                            model="systemc" debug="0" />
    80   <component  name="Special_Register_unit"                  model="systemc" debug="0" />
    81   <component  name="OOO_Engine"                             model="systemc" debug="0" />
     70  <component  name="Load_Store_pointer_unit"                model="systemc" debug="1" />
     71  <component  name="Dependency_checking_unit"               model="systemc" debug="1" />
     72  <component  name="Free_List_unit"                         model="systemc" debug="1" />
     73  <component  name="Register_Address_Translation_unit"      model="systemc" debug="1" />
     74  <component  name="Register_translation_unit_Glue"         model="systemc" debug="1" />
     75  <component  name="Stat_List_unit"                         model="systemc" debug="1" />
     76  <component  name="Register_translation_unit"              model="systemc" debug="1" />
     77  <component  name="Rename_unit_Glue"                       model="systemc" debug="1" />
     78  <component  name="Rename_select"                          model="systemc" debug="1" />
     79  <component  name="Rename_unit"                            model="systemc" debug="1" />
     80  <component  name="Special_Register_unit"                  model="systemc" debug="1" />
     81  <component  name="OOO_Engine"                             model="systemc" debug="1" />
    8282  <component  name="Context_State"                          model="systemc" debug="1" />
    8383  <component  name="Decod"                                  model="systemc" debug="1" />
    8484  <component  name="Decod_queue"                            model="systemc" debug="1" />
    85   <component  name="Decod_unit"                             model="systemc" debug="0" />
    86   <component  name="Front_end_Glue"                         model="systemc" debug="0" />
    87   <component  name="Address_management"                     model="systemc" debug="0" />
     85  <component  name="Decod_unit"                             model="systemc" debug="1" />
     86  <component  name="Front_end_Glue"                         model="systemc" debug="1" />
     87  <component  name="Address_management"                     model="systemc" debug="1" />
    8888  <component  name="Ifetch_queue"                           model="systemc" debug="1" />
    89   <component  name="Ifetch_unit_Glue"                       model="systemc" debug="0" />
    90   <component  name="Ifetch_unit"                            model="systemc" debug="0" />
    91   <component  name="Branch_Target_Buffer_Glue"              model="systemc" debug="0" />
    92   <component  name="Branch_Target_Buffer_Register"          model="systemc" debug="0" />
    93   <component  name="Branch_Target_Buffer"                   model="systemc" debug="0" />
    94   <component  name="Direction_Glue"                         model="systemc" debug="0" />
    95   <component  name="Direction"                              model="systemc" debug="0" />
    96   <component  name="Two_Level_Branch_Predictor"             model="systemc" debug="0" />
    97   <component  name="Meta_Predictor_Glue"                    model="systemc" debug="0" />
    98   <component  name="Meta_Predictor"                         model="systemc" debug="0" />
    99   <component  name="Prediction_unit_Glue"                   model="systemc" debug="0" />
    100   <component  name="Return_Address_Stack"                   model="systemc" debug="0" />
     89  <component  name="Ifetch_unit_Glue"                       model="systemc" debug="1" />
     90  <component  name="Ifetch_unit"                            model="systemc" debug="1" />
     91  <component  name="Branch_Target_Buffer_Glue"              model="systemc" debug="1" />
     92  <component  name="Branch_Target_Buffer_Register"          model="systemc" debug="1" />
     93  <component  name="Branch_Target_Buffer"                   model="systemc" debug="1" />
     94  <component  name="Direction_Glue"                         model="systemc" debug="1" />
     95  <component  name="Direction"                              model="systemc" debug="1" />
     96  <component  name="Two_Level_Branch_Predictor"             model="systemc" debug="1" />
     97  <component  name="Meta_Predictor_Glue"                    model="systemc" debug="1" />
     98  <component  name="Meta_Predictor"                         model="systemc" debug="1" />
     99  <component  name="Prediction_unit_Glue"                   model="systemc" debug="1" />
     100  <component  name="Return_Address_Stack"                   model="systemc" debug="1" />
    101101  <component  name="Update_Prediction_Table"                model="systemc" debug="1" />
    102   <component  name="Prediction_unit"                        model="systemc" debug="0" />
    103   <component  name="Front_end"                              model="systemc" debug="0" />
     102  <component  name="Prediction_unit"                        model="systemc" debug="1" />
     103  <component  name="Front_end"                              model="systemc" debug="1" />
    104104  <component  name="Icache_Access"                          model="systemc" debug="1" />
    105   <component  name="Dcache_Access"                          model="systemc" debug="0" />
    106   <component  name="Core_Glue"                              model="systemc" debug="0" />
    107   <component  name="Core"                                   model="systemc" debug="0" />
    108   <component  name="TopLevel"                               model="systemc" debug="0" />
     105  <component  name="Dcache_Access"                          model="systemc" debug="1" />
     106  <component  name="Core_Glue"                              model="systemc" debug="1" />
     107  <component  name="Core"                                   model="systemc" debug="1" />
     108  <component  name="TopLevel"                               model="systemc" debug="1" />
    109109
    110   <component  name="Behavioural"                            model="systemc" debug="0" />
    111   <component  name="Interface"                              model="systemc" debug="0" />
    112   <component  name="Allocation"                             model="systemc" debug="0" />
     110  <component  name="Behavioural"                            model="systemc" debug="1" />
     111  <component  name="Interface"                              model="systemc" debug="1" />
     112  <component  name="Allocation"                             model="systemc" debug="1" />
    113113
    114114</parameters>
  • trunk/IPs/systemC/processor/Morpheo/Script/distexe.sh

    r126 r128  
    55#-----------------------------------------------------------
    66
    7 VERSION="1.0"
     7declare    VERSION="1.0"
     8declare -i SLEEP=3
    89
    910# Need : test, echo, cd, dirname, basename, ssh, ps aux
     
    106107   
    107108    header;
    108     echo "  * {"$(my_date)"} <${HOSTNAME}> file : ${FILE_CMD}";
    109     echo "  * {"$(my_date)"} <${HOSTNAME}> path : ${PATH_EXE}";
     109
     110    echo "  * {"$(my_date)"} <${HOSTNAME}> file  : ${FILE_CMD}";
     111    echo "  * {"$(my_date)"} <${HOSTNAME}> path  : ${PATH_EXE}";
     112    echo "  * {"$(my_date)"} <${HOSTNAME}> sleep : ${SLEEP}";
    110113
    111114    local hosts="${DISTEXE_HOSTS}";
     
    133136        local -i res=1
    134137
    135         while test ${res} -ne 0; do
     138        while true; do
    136139            res=$(ps aux | grep -c "${commands[${cpt}]}");
     140
     141            if test ${res} -eq 0; then
     142                break;
     143            fi;
     144
     145            # wait (to not have 100% cpu)
     146            sleep ${SLEEP};
    137147        done
    138148
  • trunk/IPs/systemC/processor/Morpheo/Script/execute.sh

    r127 r128  
    8989
    9090    local -i NB_DIGIT=0;
    91     local -i x=${#COMMAND[*]};
     91    local -i NB_COMMAND=${#COMMAND[*]};
     92    local -i x=${NB_COMMAND};
    9293
    9394    while test ${x} -ne 0; do
     
    113114
    114115        # test if this number is valid
    115         if test ${CPT} -ge ${#COMMAND[*]}; then
    116             CPT=${#COMMAND[*]};
     116        if test ${CPT} -ge ${NB_COMMAND}; then
     117            CPT=${NB_COMMAND};
    117118        fi;
    118119
     
    129130
    130131        # test if this number is valid
    131         if test ${CPT} -eq ${#COMMAND[*]}; then
     132        if test ${CPT} -eq ${NB_COMMAND}; then
    132133            break;
    133134        fi;
     
    138139
    139140#           echo "  * {"$(my_date)"} <${ID}> execute command [${NUM}] : ${COMMAND[${CPT}]}";
    140             echo "  * {"$(my_date)"} <${ID}> command [${NUM}] : execute";
     141            echo "  * {"$(my_date)"} <${ID}> command [${NUM}/${NB_COMMAND}] : execute";
    141142            local PATH_CURRENT=${PWD};
    142143
     
    154155            ./${OUTPUT_FILE_CMD}      &>  ${OUTPUT_FILE_OUT};
    155156            cd    ${PATH_CURRENT}     &> /dev/null;
    156             echo "  * {"$(my_date)"} <${ID}> command [${NUM}] : done";
     157            echo "  * {"$(my_date)"} <${ID}> command [${NUM}/${NB_COMMAND}] : done";
    157158        fi;
    158159    done;
Note: See TracChangeset for help on using the changeset viewer.