Changeset 108


Ignore:
Timestamp:
Feb 12, 2009, 12:55:06 PM (15 years ago)
Author:
rosiere
Message:

1) decod_queue : add reg_LAST_SLOT.
2) Commit : insert on event -> to pop decod_queue. Head test : add information (speculative or not)
3) Context State / UPT : Branch miss and Load miss in same cycle.
4) Free List : Bank is on LSB not MSB.
5) Platforms : move data

Location:
trunk
Files:
7 added
90 edited
65 copied
1 moved

Legend:

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

    r101 r108  
    5959    cout << "------------------------------------------------------" << endl;
    6060
    61     Instance * instance = new Instance ("../../../Files/Instance_scalar_1.cfg",
     61    Instance * instance = new Instance ("../../../Files/Instance_debug.cfg",
    6262                                        generator1,
    6363                                        _get_custom_information
     
    6868  }
    6969
    70   {
    71     cout << "------------------------------------------------------" << endl;
    72 
    73     Instance * instance = new Instance ("../../../Files/Instance_scalar_2.cfg",
    74                                         generator1,
    75                                         _get_custom_information
    76                                         );
    77     instance->toFile("data_out");
    78    
    79     delete instance;
    80   }
    81 
    82   {
    83     cout << "------------------------------------------------------" << endl;
    84 
    85     Instance * instance = new Instance ("../../../Files/Instance_scalar_3.cfg",
    86                                         generator1,
    87                                         _get_custom_information
    88                                         );
    89     instance->toFile("data_out");
    90    
    91     delete instance;
    92   }
    93 
    94   {
    95     cout << "------------------------------------------------------" << endl;
    96 
    97     Instance * instance = new Instance ("../../../Files/Instance_scalar_4.cfg",
    98                                         generator1,
    99                                         _get_custom_information
    100                                         );
    101     instance->toFile("data_out");
    102    
    103     delete instance;
    104   }
    10570
    10671  delete configuration1;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Simulator_fromFile.cpp

    r88 r108  
    4545        XML_t * xml = vect[i];
    4646
    47         // Test node
    48         testNodeName   (xml,"parameter");
    49         testSingleton  (xml,true);       
     47        std::string child_name = xml->getName();
    5048
    51         // Take attributes of this tag
    52 
    53         attributes_t attributes = xml->getAttributes();
    54 
    55 //         std::cout << "Node [" << name           << "]" << std::endl;
    56 //         std::cout << "  * nb attributes : " << xml->getAttributes().size()  << std::endl;
    57 
    58         attribute_t value_name  = getAttribute(xml,attributes,"name" );
    59         attribute_t value       = getAttribute(xml,attributes,"value");
    60 
    61         testAttributesEmpty(xml,attributes);
    62 
    63         // Insert in array
    64         Parameter_affectation * param = new Parameter_affectation(value_name,
    65                                                                   value     );
    66 
    67         insert(param);
     49        //--------------------------------------------
     50        // Child : Parameter
     51        //--------------------------------------------
     52        if (child_name == "parameter")
     53          {
     54            // testNodeName   (xml,"parameter");
     55            testSingleton  (xml,true);       
     56           
     57            // Take attributes of this tag
     58           
     59            attributes_t attributes = xml->getAttributes();
     60           
     61            //         std::cout << "Node [" << name           << "]" << std::endl;
     62            //         std::cout << "  * nb attributes : " << xml->getAttributes().size()  << std::endl;
     63           
     64            attribute_t value_name  = getAttribute(xml,attributes,"name" );
     65            attribute_t value       = getAttribute(xml,attributes,"value");
     66           
     67            testAttributesEmpty(xml,attributes);
     68           
     69            // Insert in array
     70            Parameter_affectation * param = new Parameter_affectation(value_name,
     71                                                                      value     );
     72           
     73            insert(param);
     74          }
     75        //--------------------------------------------
     76        // Child : Simulation
     77        //--------------------------------------------
     78        else
     79          {
     80            testNodeName   (xml,"simulation");
     81            testSingleton  (xml,true);
     82          }
    6883      }
    6984         
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Parameters_msg_error.cpp

    r81 r108  
    2828
    2929    if (_size_queue < _nb_inst_retire)
    30       test.error("The reservation_station can't have more retire port than entry in the queue.");
     30      test.error(toString(_("The reservation_station can't have more retire port (%d) than entry in the queue (%d).\n"),_nb_inst_retire,_size_queue));
    3131
    3232    log_printf(FUNC,Reservation_station,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Types.h

    r105 r108  
    3333      CONTEXT_STATE_KO_MISS_LOAD_ADDR     , // update address manager
    3434      CONTEXT_STATE_KO_MISS_LOAD_WAITEND  , // wait end of event (miss load))
     35      CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR   , // update address manager
     36      CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND, // wait end of event (miss branch)
    3537//    CONTEXT_STATE_KO_MSYNC              , // wait completion of all memory operation
    3638//    CONTEXT_STATE_KO_MSYNC_ISSUE        , // issue msync operation
     
    6466      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_ADDR    : return "context_state_ko_miss_branch_addr"   ; break;
    6567      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_WAITEND : return "context_state_ko_miss_branch_waitend"; break;
     68      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR    : return "context_state_ko_miss_branch_and_load_addr"   ; break;
     69      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND : return "context_state_ko_miss_branch_and_load_waitend"; break;
    6670      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_LOAD_ADDR      : return "context_state_ko_miss_load_addr"     ; break;
    6771      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_LOAD_WAITEND   : return "context_state_ko_miss_load_waitend"  ; break;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMoore.cpp

    r105 r108  
    3333        Tcontrol_t val              = ((state == CONTEXT_STATE_KO_EXCEP_ADDR      ) or
    3434                                       (state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) or
     35                                       (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR) or
    3536                                       (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR  ) or
    3637                                       (state == CONTEXT_STATE_KO_PSYNC_ADDR      ) or
     
    5354          {
    5455          case CONTEXT_STATE_KO_EXCEP_ADDR      : (type = EVENT_TYPE_EXCEPTION              ); break;
     56          case CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR:
    5557          case CONTEXT_STATE_KO_MISS_BRANCH_ADDR: (type = EVENT_TYPE_BRANCH_MISS_SPECULATION); break;
    5658          case CONTEXT_STATE_KO_MISS_LOAD_ADDR  : (type = EVENT_TYPE_LOAD_MISS_SPECULATION  ); break;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp

    r106 r108  
    8282                  break;
    8383                }
     84              case CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND :
     85                {
     86                  // Wait end of all instruction
     87                  if (inst_all == 0)
     88                   
     89//                  state = CONTEXT_STATE_OK; // @@@ TODO : make MISS fast (miss decod)
     90                    state = CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR;
     91                  break;
     92                }
    8493              case CONTEXT_STATE_KO_EXCEP_SPR    :
    8594                {
     
    93102                }
    94103              case CONTEXT_STATE_KO_MISS_LOAD_ADDR    :
     104                {
     105                  // nothing, wait the update of internal register (pc)
     106                  break;
     107                }
     108              case CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR    :
    95109                {
    96110                  // nothing, wait the update of internal register (pc)
     
    209223
    210224              // priority : miss > excep > spr/sync
    211               uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR   ) or
    212                                        (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR     ) or
    213                                        (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND) or
    214                                        (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND  ))?2:((state == EVENT_TYPE_EXCEPTION)?1:0);
     225              uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR            ) or
     226                                       (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR              ) or
     227                                       (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR   ) or
     228                                       (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND         ) or
     229                                       (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND           ) or
     230                                       (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND))?2:((state == EVENT_TYPE_EXCEPTION)?1:0);
    215231              uint8_t    priority1  = 2; // miss
    216232
     
    272288             
    273289              // miss > excep > spr/sync
    274               uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR   ) or
    275                                        (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR     ) or
    276                                        (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND) or
    277                                        (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND  ))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
     290              uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR            ) or
     291                                       (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR              ) or
     292                                       (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR   ) or
     293                                       (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND         ) or
     294                                       (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND           ) or
     295                                       (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
    278296              uint8_t    priority1  = (state == EVENT_TYPE_EXCEPTION)?1:0;
    279297
     
    405423           
    406424            // miss > excep > spr/sync
    407             uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR   ) or
    408                                      (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR     ) or
    409                                      (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND) or
    410                                      (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND  ))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
     425              uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR            ) or
     426                                       (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR              ) or
     427                                       (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR   ) or
     428                                       (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND         ) or
     429                                       (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND           ) or
     430                                       (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
    411431            uint8_t    priority1  = (state == EVENT_TYPE_EXCEPTION)?1:2; // else load_miss_speculation (EVENT_TYPE_MISS_SPECULATION)
    412432
     
    437457                  {
    438458                  case EVENT_TYPE_EXCEPTION               : {state_next = CONTEXT_STATE_KO_EXCEP;             break;}
    439                   case EVENT_TYPE_LOAD_MISS_SPECULATION   : {state_next = CONTEXT_STATE_KO_MISS_LOAD_WAITEND; break;}
     459                  case EVENT_TYPE_LOAD_MISS_SPECULATION   :
     460                    {
     461                      // Test if previous branch occure
     462                      if ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR            ) or
     463                          (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND         ) or
     464                          (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR   ) or
     465                          (state == CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND))
     466                        state_next = CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_WAITEND;
     467                      else
     468                        state_next = CONTEXT_STATE_KO_MISS_LOAD_WAITEND;
     469                      break;
     470                    }
    440471                  case EVENT_TYPE_BRANCH_MISS_SPECULATION :
    441472                  case EVENT_TYPE_SPR_ACCESS              :
     
    480511                  }
    481512                case CONTEXT_STATE_KO_MISS_BRANCH_ADDR:
     513
    482514//                   {
    483515//                     reg_STATE [i] = CONTEXT_STATE_KO_MISS_WAITEND; //@@@ TODO : make MISS fast (miss decod)
     
    489521                  {
    490522                    reg_STATE [i] = CONTEXT_STATE_OK;
     523                    break;
     524                  }
     525                case CONTEXT_STATE_KO_MISS_BRANCH_AND_LOAD_ADDR:
     526                  {
     527                    reg_STATE [i] = CONTEXT_STATE_KO_MISS_LOAD_ADDR;
    491528                    break;
    492529                  }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp

    r105 r108  
    7171  ALLOC1_SC_SIGNAL(out_DECOD_NO_EXECUTE                   ,"out_DECOD_NO_EXECUTE                   ",Tcontrol_t         ,_param->_nb_inst_decod);
    7272  ALLOC1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT                ,"out_DECOD_IS_DELAY_SLOT                ",Tcontrol_t         ,_param->_nb_inst_decod);
     73#ifdef DEBUG
     74  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS                      ,"out_DECOD_ADDRESS                      ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     75#endif
    7376  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT                 ,"out_DECOD_ADDRESS_NEXT                 ",Tgeneral_data_t    ,_param->_nb_inst_decod);
    7477  ALLOC1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT                 ,"out_DECOD_HAS_IMMEDIAT                 ",Tcontrol_t         ,_param->_nb_inst_decod);
     
    148151  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod);
    149152  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod);
     153#ifdef DEBUG
     154  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_ADDRESS                      ,_param->_nb_inst_decod);
     155#endif
    150156  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_ADDRESS_NEXT                 ,_param->_nb_inst_decod);
    151157  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_HAS_IMMEDIAT                 ,_param->_nb_inst_decod);
     
    450456  delete [] out_DECOD_NO_EXECUTE                   ;
    451457  delete [] out_DECOD_IS_DELAY_SLOT                ;
     458#ifdef DEBUG
     459  delete [] out_DECOD_ADDRESS                      ;
     460#endif
    452461  delete [] out_DECOD_ADDRESS_NEXT                 ;
    453462  delete [] out_DECOD_HAS_IMMEDIAT                 ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h

    r105 r108  
    8888  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_NO_EXECUTE                   ;//[nb_inst_decod]
    8989  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_IS_DELAY_SLOT                ;//[nb_inst_decod]
     90#ifdef DEBUG
     91  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_ADDRESS                      ;//[nb_inst_decod]
     92#endif
    9093  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_ADDRESS_NEXT                 ;//[nb_inst_decod]
    9194  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_HAS_IMMEDIAT                 ;//[nb_inst_decod]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_allocation.cpp

    r105 r108  
    8989      ALLOC1_SIGNAL_OUT(out_DECOD_NO_EXECUTE   ,"no_execute"   ,Tcontrol_t        ,1                                   );
    9090      ALLOC1_SIGNAL_OUT(out_DECOD_IS_DELAY_SLOT,"is_delay_slot",Tcontrol_t        ,1                                   );
     91#ifdef DEBUG
     92      ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS      ,"address"      ,Tgeneral_data_t   ,_param->_size_instruction_address   );
     93#endif
    9194      ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS_NEXT ,"address_next" ,Tgeneral_data_t   ,_param->_size_instruction_address   );
    9295      ALLOC1_SIGNAL_OUT(out_DECOD_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t        ,1                                   );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_deallocation.cpp

    r105 r108  
    4949        DELETE1_SIGNAL(out_DECOD_NO_EXECUTE   ,_param->_nb_inst_decod,1                                   );
    5050        DELETE1_SIGNAL(out_DECOD_IS_DELAY_SLOT,_param->_nb_inst_decod,1                                   );
     51#ifdef DEBUG
     52        DELETE1_SIGNAL(out_DECOD_ADDRESS      ,_param->_nb_inst_decod,_param->_size_instruction_address   );
     53#endif
    5154        DELETE1_SIGNAL(out_DECOD_ADDRESS_NEXT ,_param->_nb_inst_decod,_param->_size_instruction_address   );
    5255        DELETE1_SIGNAL(out_DECOD_HAS_IMMEDIAT ,_param->_nb_inst_decod,1                                   );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp

    r107 r108  
    4343
    4444    Tcontrol_t can_continue      [_param->_nb_context];
    45     Tcontrol_t can_continue_next [_param->_nb_context];   
     45//     Tcontrol_t can_continue_next [_param->_nb_context];
     46//     Tcontrol_t have_decod_branch [_param->_nb_context];
    4647
    4748    for (uint32_t i=0; i<_param->_nb_context; i++)
     
    5253       
    5354        can_continue                      [i] = PORT_READ(in_CONTEXT_DECOD_ENABLE [i]);
    54         can_continue_next                 [i] = PORT_READ(in_CONTEXT_DECOD_ENABLE [i]);
     55//      can_continue_next                 [i] = PORT_READ(in_CONTEXT_DECOD_ENABLE [i]);
     56//         have_decod_branch                 [i] = false;
    5557      }
    5658   
     
    7981                log_printf(TRACE,Decod,FUNCTION,"    * decod_ack [%d] : %d",i,PORT_READ(in_DECOD_ACK [i]));
    8082
    81                 can_continue [x] = can_continue_next [x];
     83//              can_continue [x] = can_continue_next [x];
    8284
    8385                decod_val  [i]    = true;                        // fetch_val and decod_enable
     
    139141                PORT_WRITE(out_DECOD_NO_EXECUTE    [i], _decod_instruction->_no_execute    );
    140142                PORT_WRITE(out_DECOD_IS_DELAY_SLOT [i], _decod_instruction->_is_delay_slot );
    141 //              PORT_WRITE(out_DECOD_ADDRESS       [i], addr);
     143#ifdef DEBUG
     144                PORT_WRITE(out_DECOD_ADDRESS       [i], addr);
     145#endif
    142146//                 if ((type == TYPE_BRANCH) and
    143147//                     ((_decod_instruction->_branch_condition = BRANCH_CONDITION_FLAG_SET) or
     
    193197               
    194198                    //can_continue_next [x] = PORT_READ(in_PREDICT_CAN_CONTINUE [i]); // can continue is set if direction is "not take" (also, continue is sequential order)
    195                     can_continue_next [x] = false; // one branch per context, the DS don't execute
     199                    can_continue [x] = false; // one branch per context, the DS don't execute
     200//                  can_continue_next [x] = false; // one branch per context, the DS don't execute
     201//                     have_decod_branch [x] = true;
    196202                  }
    197203
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/test.cpp

    r105 r108  
    6060  ALLOC1_SC_SIGNAL( in_DECOD_IN_NO_EXECUTE     ," in_DECOD_IN_NO_EXECUTE    ",Tcontrol_t         ,_param->_nb_inst_decod);
    6161  ALLOC1_SC_SIGNAL( in_DECOD_IN_IS_DELAY_SLOT  ," in_DECOD_IN_IS_DELAY_SLOT ",Tcontrol_t         ,_param->_nb_inst_decod);
     62#ifdef DEBUG
     63  ALLOC1_SC_SIGNAL( in_DECOD_IN_ADDRESS        ," in_DECOD_IN_ADDRESS       ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     64#endif
    6265  ALLOC1_SC_SIGNAL( in_DECOD_IN_ADDRESS_NEXT   ," in_DECOD_IN_ADDRESS_NEXT  ",Tgeneral_data_t    ,_param->_nb_inst_decod);
    6366  ALLOC1_SC_SIGNAL( in_DECOD_IN_HAS_IMMEDIAT   ," in_DECOD_IN_HAS_IMMEDIAT  ",Tcontrol_t         ,_param->_nb_inst_decod);
     
    8487  ALLOC1_SC_SIGNAL(out_DECOD_OUT_NO_EXECUTE    ,"out_DECOD_OUT_NO_EXECUTE   ",Tcontrol_t         ,_param->_nb_inst_decod);
    8588  ALLOC1_SC_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,"out_DECOD_OUT_IS_DELAY_SLOT",Tcontrol_t         ,_param->_nb_inst_decod);
     89#ifdef DEBUG
     90  ALLOC1_SC_SIGNAL(out_DECOD_OUT_ADDRESS       ,"out_DECOD_OUT_ADDRESS      ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     91#endif
    8692  ALLOC1_SC_SIGNAL(out_DECOD_OUT_ADDRESS_NEXT  ,"out_DECOD_OUT_ADDRESS_NEXT ",Tgeneral_data_t    ,_param->_nb_inst_decod);
    8793  ALLOC1_SC_SIGNAL(out_DECOD_OUT_HAS_IMMEDIAT  ,"out_DECOD_OUT_HAS_IMMEDIAT ",Tcontrol_t         ,_param->_nb_inst_decod);
     
    125131  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_NO_EXECUTE     ,_param->_nb_inst_decod);
    126132  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_IS_DELAY_SLOT  ,_param->_nb_inst_decod);
     133#ifdef DEBUG
     134  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_ADDRESS        ,_param->_nb_inst_decod);
     135#endif
    127136  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_ADDRESS_NEXT   ,_param->_nb_inst_decod);
    128137  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_HAS_IMMEDIAT   ,_param->_nb_inst_decod);
     
    151160  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_NO_EXECUTE    ,_param->_nb_inst_decod);
    152161  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod);
     162#ifdef DEBUG
     163  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_ADDRESS       ,_param->_nb_inst_decod);
     164#endif
    153165  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_ADDRESS_NEXT  ,_param->_nb_inst_decod);
    154166  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_HAS_IMMEDIAT  ,_param->_nb_inst_decod);
     
    304316  DELETE1_SC_SIGNAL( in_DECOD_IN_NO_EXECUTE     ,_param->_nb_inst_decod);
    305317  DELETE1_SC_SIGNAL( in_DECOD_IN_IS_DELAY_SLOT  ,_param->_nb_inst_decod);
     318#ifdef DEBUG
     319  DELETE1_SC_SIGNAL( in_DECOD_IN_ADDRESS        ,_param->_nb_inst_decod);
     320#endif
    306321  DELETE1_SC_SIGNAL( in_DECOD_IN_ADDRESS_NEXT   ,_param->_nb_inst_decod);
    307322  DELETE1_SC_SIGNAL( in_DECOD_IN_HAS_IMMEDIAT   ,_param->_nb_inst_decod);
     
    328343  DELETE1_SC_SIGNAL(out_DECOD_OUT_NO_EXECUTE    ,_param->_nb_inst_decod);
    329344  DELETE1_SC_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod);
     345#ifdef DEBUG
     346  DELETE1_SC_SIGNAL(out_DECOD_OUT_ADDRESS       ,_param->_nb_inst_decod);
     347#endif
    330348  DELETE1_SC_SIGNAL(out_DECOD_OUT_ADDRESS_NEXT  ,_param->_nb_inst_decod);
    331349  DELETE1_SC_SIGNAL(out_DECOD_OUT_HAS_IMMEDIAT  ,_param->_nb_inst_decod);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Decod_queue.h

    r105 r108  
    7575  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_IN_NO_EXECUTE     ;//[nb_inst_decod]
    7676  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_IN_IS_DELAY_SLOT  ;//[nb_inst_decod]
     77#ifdef DEBUG
     78  public    : SC_IN (Tgeneral_data_t    )  **  in_DECOD_IN_ADDRESS        ;//[nb_inst_decod]
     79#endif
    7780  public    : SC_IN (Tgeneral_data_t    )  **  in_DECOD_IN_ADDRESS_NEXT   ;//[nb_inst_decod]
    7881  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_IN_HAS_IMMEDIAT   ;//[nb_inst_decod]
     
    100103  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_OUT_NO_EXECUTE    ;//[nb_inst_decod]
    101104  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_OUT_IS_DELAY_SLOT ;//[nb_inst_decod]
     105#ifdef DEBUG
     106  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_OUT_ADDRESS       ;//[nb_inst_decod]
     107#endif
    102108  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_OUT_ADDRESS_NEXT  ;//[nb_inst_decod]
    103109  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_OUT_HAS_IMMEDIAT  ;//[nb_inst_decod]
     
    129135  private   : std::list<decod_queue_entry_t*>* reg_QUEUE                  ;
    130136  private   : uint32_t                       * reg_NB_INST                ;//[nb_context]
    131    
     137  private   : uint32_t                         reg_LAST_SLOT              ;
     138
    132139    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    133140  private   : Tcontrol_t                     * internal_DECOD_IN_ACK      ;//[nb_inst_decod]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Types.h

    r105 r108  
    3030  public : Tcontrol_t         * _no_execute     ;
    3131  public : Tcontrol_t         * _is_delay_slot  ;
     32#ifdef DEBUG
     33  public : Tgeneral_data_t    * _address        ;
     34#endif
    3235  public : Tgeneral_data_t    * _address_next   ;
    3336  public : Tcontrol_t         * _has_immediat   ;
     
    5659      _no_execute     = new Tcontrol_t         [_nb_inst];
    5760      _is_delay_slot  = new Tcontrol_t         [_nb_inst];
     61#ifdef DEBUG
     62      _address        = new Tgeneral_data_t    [_nb_inst];
     63#endif
    5864      _address_next   = new Tgeneral_data_t    [_nb_inst];
    5965      _has_immediat   = new Tcontrol_t         [_nb_inst];
     
    8591      delete [] _no_execute     ;
    8692      delete [] _is_delay_slot  ;
     93#ifdef DEBUG
     94      delete [] _address        ;
     95#endif
    8796      delete [] _address_next   ;
    8897      delete [] _has_immediat   ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_allocation.cpp

    r105 r108  
    6767      ALLOC1_SIGNAL_IN ( in_DECOD_IN_NO_EXECUTE     ,"no_execute"   ,Tcontrol_t         ,1                                   );
    6868      ALLOC1_SIGNAL_IN ( in_DECOD_IN_IS_DELAY_SLOT  ,"is_delay_slot",Tcontrol_t         ,1                                   );
     69#ifdef DEBUG
     70      ALLOC1_SIGNAL_IN ( in_DECOD_IN_ADDRESS        ,"address"      ,Tgeneral_data_t    ,_param->_size_instruction_address   );
     71#endif
    6972      ALLOC1_SIGNAL_IN ( in_DECOD_IN_ADDRESS_NEXT   ,"address_next" ,Tgeneral_data_t    ,_param->_size_instruction_address   );
    7073      ALLOC1_SIGNAL_IN ( in_DECOD_IN_HAS_IMMEDIAT   ,"has_immediat" ,Tcontrol_t         ,1                                   );
     
    9699      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_NO_EXECUTE     ,"no_execute"   ,Tcontrol_t         ,1                                   );
    97100      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_IS_DELAY_SLOT  ,"is_delay_slot",Tcontrol_t         ,1                                   );
     101#ifdef DEBUG
     102      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_ADDRESS        ,"address"      ,Tgeneral_data_t    ,_param->_size_instruction_address   );
     103#endif
    98104      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_ADDRESS_NEXT   ,"address_next" ,Tgeneral_data_t    ,_param->_size_instruction_address   );
    99105      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_HAS_IMMEDIAT   ,"has_immediat" ,Tcontrol_t         ,1                                   );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_deallocation.cpp

    r105 r108  
    3737        DELETE1_SIGNAL( in_DECOD_IN_NO_EXECUTE     ,_param->_nb_inst_decod,1                                   );
    3838        DELETE1_SIGNAL( in_DECOD_IN_IS_DELAY_SLOT  ,_param->_nb_inst_decod,1                                   );
     39#ifdef DEBUG
     40        DELETE1_SIGNAL( in_DECOD_IN_ADDRESS        ,_param->_nb_inst_decod,_param->_size_instruction_address   );
     41#endif
    3942        DELETE1_SIGNAL( in_DECOD_IN_ADDRESS_NEXT   ,_param->_nb_inst_decod,_param->_size_instruction_address   );
    4043        DELETE1_SIGNAL( in_DECOD_IN_HAS_IMMEDIAT   ,_param->_nb_inst_decod,1                                   );
     
    6164        DELETE1_SIGNAL(out_DECOD_OUT_NO_EXECUTE    ,_param->_nb_inst_decod,1                                   );
    6265        DELETE1_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod,1                                   );
     66#ifdef DEBUG
     67        DELETE1_SIGNAL(out_DECOD_OUT_ADDRESS       ,_param->_nb_inst_decod,_param->_size_instruction_address   );
     68#endif
    6369        DELETE1_SIGNAL(out_DECOD_OUT_ADDRESS_NEXT  ,_param->_nb_inst_decod,_param->_size_instruction_address   );
    6470        DELETE1_SIGNAL(out_DECOD_OUT_HAS_IMMEDIAT  ,_param->_nb_inst_decod,1                                   );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp

    r106 r108  
    3535    if (not reg_QUEUE->empty())
    3636      for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    37         if (reg_QUEUE->front()->_val [i])
    38           {
    39             log_printf(TRACE,Decod_queue,FUNCTION,_("  * Queue is not empty, slot [%d] is valid."),i);
     37        {
     38          uint32_t index = reg_LAST_SLOT + i;
    4039
    41             Tcontext_t context         = reg_QUEUE->front()->_context_id    [i];
    42             Tdepth_t   depth           = reg_QUEUE->front()->_depth         [i];
    43             Tdepth_t   depth_min       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0;
    44             Tdepth_t   depth_max       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX [context]):0;
    45             Tcontrol_t depth_full      = PORT_READ(in_DEPTH_FULL[context]);
     40          // Stop
     41          if (index >= _param->_nb_inst_decod)
     42            break;
    4643
    47             // is a valid instruction ?
    48             // If DEPTH_CURRENT :
    49             // equal at     DEPTH_MIN            -> not speculative
    50             // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss
    51             //     include ]DEPTH_MIN:DEPTH_MAX] -> speculative
     44          if (reg_QUEUE->front()->_val [index])
     45            {
     46              log_printf(TRACE,Decod_queue,FUNCTION,_("  * Queue is not empty, slot [%d] is valid."),i);
     47             
     48              Tcontext_t context         = reg_QUEUE->front()->_context_id    [index];
     49              Tdepth_t   depth           = reg_QUEUE->front()->_depth         [index];
     50              Tdepth_t   depth_min       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0;
     51              Tdepth_t   depth_max       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX [context]):0;
     52              Tcontrol_t depth_full      = PORT_READ(in_DEPTH_FULL[context]);
    5253
    53             // All case
    54             // ....... min ...X... max ....... OK
    55             // ....... min ....... max ...X... KO
    56             // ...X... min ....... max ....... KO
    57             // ....... max ....... min ...X... OK
    58             // ...X... max ....... min ....... OK
    59             // ....... max ...X... min ....... KO
     54              // is a valid instruction ?
     55              // If DEPTH_CURRENT :
     56              // equal at     DEPTH_MIN            -> not speculative
     57              // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss
     58              //     include ]DEPTH_MIN:DEPTH_MAX] -> speculative
     59             
     60              // All case
     61              // ....... min ...X... max ....... OK
     62              // ....... min ....... max ...X... KO
     63              // ...X... min ....... max ....... KO
     64              // ....... max ....... min ...X... OK
     65              // ...X... max ....... min ....... OK
     66              // ....... max ...X... min ....... KO
     67             
     68              Tcontrol_t   is_valid      = ((depth == depth_min) or
     69                                            depth_full or
     70                                            ((depth_min <= depth_max)?
     71                                             ((depth >= depth_min) and (depth <=depth_max)):
     72                                             ((depth >= depth_min) or  (depth <=depth_max))));
     73              //Tcontrol_t is_valid        = ((depth == depth_min) or
     74              //                              ((depth_min < depth_max)?
     75              //                               (depth<=depth_max):
     76              //                               ((depth > depth_min) or (depth <= depth_max))));
     77              //Tcontrol_t is_valid        = depth <= depth_max;
    6078
    61             Tcontrol_t   is_valid      = ((depth == depth_min) or
    62                                           depth_full or
    63                                           ((depth_min <= depth_max)?
    64                                            ((depth >= depth_min) and (depth <=depth_max)):
    65                                            ((depth >= depth_min) or  (depth <=depth_max))));
    66 //          Tcontrol_t is_valid        = ((depth == depth_min) or
    67 //                                           ((depth_min < depth_max)?
    68 //                                            (depth<=depth_max):
    69 //                                            ((depth > depth_min) or (depth <= depth_max))));
    70 //          Tcontrol_t is_valid        = depth <= depth_max;
    71 
    72             log_printf(TRACE,Decod_queue,FUNCTION,"    * is_valid : %d",is_valid);
    73             log_printf(TRACE,Decod_queue,FUNCTION,"      * context      : %d",context);
    74             log_printf(TRACE,Decod_queue,FUNCTION,"      * depth        : %d",depth);
    75             log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_min    : %d",depth_min);
    76             log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_max    : %d",depth_max);
    77             log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_full   : %d",depth_full);
    78             log_printf(TRACE,Decod_queue,FUNCTION,"      * address_next : 0x%x (0x%x)",reg_QUEUE->front()->_address_next[i],reg_QUEUE->front()->_address_next[i]<<2);
    79             internal_DECOD_OUT_VAL [i] = 1; // in all case, val is set (entry is not empty, and instruction is valid)
    80             if (is_valid)
    81               {
    82                 val                    [i] = 1;
    83                 internal_DECOD_OUT_ACK [i] = PORT_READ(in_DECOD_OUT_ACK [i]);
    84               }
    85             else
    86               {
    87                 // Consume the instruction (to erase)
    88                 internal_DECOD_OUT_ACK [i] = 1;
    89               }
    90           }
     79              log_printf(TRACE,Decod_queue,FUNCTION,"    * is_valid : %d",is_valid);
     80              log_printf(TRACE,Decod_queue,FUNCTION,"      * context      : %d",context);
     81              log_printf(TRACE,Decod_queue,FUNCTION,"      * depth        : %d",depth);
     82              log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_min    : %d",depth_min);
     83              log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_max    : %d",depth_max);
     84              log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_full   : %d",depth_full);
     85#ifdef DEBUG
     86              log_printf(TRACE,Decod_queue,FUNCTION,"      * address      : 0x%x (0x%x)",reg_QUEUE->front()->_address     [index],reg_QUEUE->front()->_address     [index]<<2);
     87#endif
     88              log_printf(TRACE,Decod_queue,FUNCTION,"      * address_next : 0x%x (0x%x)",reg_QUEUE->front()->_address_next[index],reg_QUEUE->front()->_address_next[index]<<2);
     89              internal_DECOD_OUT_VAL [index] = 1; // in all case, val is set (entry is not empty, and instruction is valid)
     90              if (is_valid)
     91                {
     92                  val                    [i]     = 1;
     93                  internal_DECOD_OUT_ACK [index] = PORT_READ(in_DECOD_OUT_ACK [i]);
     94                }
     95              else
     96                {
     97                  // Consume the instruction (to erase)
     98                  internal_DECOD_OUT_ACK [index] = 1;
     99                }
     100            }
     101      }
    91102
    92103    for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    93104      {
    94105        log_printf(TRACE,Decod_queue,FUNCTION,"  * DECOD_OUT_VAL : %d",val [i]);
    95 
    96         PORT_WRITE(out_DECOD_OUT_VAL [i],val [i]);
     106       
     107        PORT_WRITE(out_DECOD_OUT_VAL [i],val [i]);
    97108      }
    98109
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMoore.cpp

    r105 r108  
    4444      for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    4545        {
     46          uint32_t index = reg_LAST_SLOT + i;
     47
     48          // Stop
     49          if (index >= _param->_nb_inst_decod)
     50            break;
     51
    4652          if (_param->_have_port_context_id)
    47           PORT_WRITE(out_DECOD_OUT_CONTEXT_ID    [i],reg_QUEUE->front()->_context_id    [i]);
     53          PORT_WRITE(out_DECOD_OUT_CONTEXT_ID    [i],reg_QUEUE->front()->_context_id    [index]);
    4854          if (_param->_have_port_depth)
    49           PORT_WRITE(out_DECOD_OUT_DEPTH         [i],reg_QUEUE->front()->_depth         [i]);
    50           PORT_WRITE(out_DECOD_OUT_TYPE          [i],reg_QUEUE->front()->_type          [i]);
    51           PORT_WRITE(out_DECOD_OUT_OPERATION     [i],reg_QUEUE->front()->_operation     [i]);
    52           PORT_WRITE(out_DECOD_OUT_NO_EXECUTE    [i],reg_QUEUE->front()->_no_execute    [i]);
    53           PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE->front()->_is_delay_slot [i]);
    54           PORT_WRITE(out_DECOD_OUT_ADDRESS_NEXT  [i],reg_QUEUE->front()->_address_next  [i]);
    55           PORT_WRITE(out_DECOD_OUT_HAS_IMMEDIAT  [i],reg_QUEUE->front()->_has_immediat  [i]);
    56           PORT_WRITE(out_DECOD_OUT_IMMEDIAT      [i],reg_QUEUE->front()->_immediat      [i]);
    57           PORT_WRITE(out_DECOD_OUT_READ_RA       [i],reg_QUEUE->front()->_read_ra       [i]);
    58           PORT_WRITE(out_DECOD_OUT_NUM_REG_RA    [i],reg_QUEUE->front()->_num_reg_ra    [i]);
    59           PORT_WRITE(out_DECOD_OUT_READ_RB       [i],reg_QUEUE->front()->_read_rb       [i]);
    60           PORT_WRITE(out_DECOD_OUT_NUM_REG_RB    [i],reg_QUEUE->front()->_num_reg_rb    [i]);
    61           PORT_WRITE(out_DECOD_OUT_READ_RC       [i],reg_QUEUE->front()->_read_rc       [i]);
    62           PORT_WRITE(out_DECOD_OUT_NUM_REG_RC    [i],reg_QUEUE->front()->_num_reg_rc    [i]);
    63           PORT_WRITE(out_DECOD_OUT_WRITE_RD      [i],reg_QUEUE->front()->_write_rd      [i]);
    64           PORT_WRITE(out_DECOD_OUT_NUM_REG_RD    [i],reg_QUEUE->front()->_num_reg_rd    [i]);
    65           PORT_WRITE(out_DECOD_OUT_WRITE_RE      [i],reg_QUEUE->front()->_write_re      [i]);
    66           PORT_WRITE(out_DECOD_OUT_NUM_REG_RE    [i],reg_QUEUE->front()->_num_reg_re    [i]);
    67           PORT_WRITE(out_DECOD_OUT_EXCEPTION_USE [i],reg_QUEUE->front()->_exception_use [i]);
    68           PORT_WRITE(out_DECOD_OUT_EXCEPTION     [i],reg_QUEUE->front()->_exception     [i]);
     55          PORT_WRITE(out_DECOD_OUT_DEPTH         [i],reg_QUEUE->front()->_depth         [index]);
     56          PORT_WRITE(out_DECOD_OUT_TYPE          [i],reg_QUEUE->front()->_type          [index]);
     57          PORT_WRITE(out_DECOD_OUT_OPERATION     [i],reg_QUEUE->front()->_operation     [index]);
     58          PORT_WRITE(out_DECOD_OUT_NO_EXECUTE    [i],reg_QUEUE->front()->_no_execute    [index]);
     59          PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE->front()->_is_delay_slot [index]);
     60#ifdef DEBUG
     61          PORT_WRITE(out_DECOD_OUT_ADDRESS       [i],reg_QUEUE->front()->_address       [index]);
     62#endif
     63          PORT_WRITE(out_DECOD_OUT_ADDRESS_NEXT  [i],reg_QUEUE->front()->_address_next  [index]);
     64          PORT_WRITE(out_DECOD_OUT_HAS_IMMEDIAT  [i],reg_QUEUE->front()->_has_immediat  [index]);
     65          PORT_WRITE(out_DECOD_OUT_IMMEDIAT      [i],reg_QUEUE->front()->_immediat      [index]);
     66          PORT_WRITE(out_DECOD_OUT_READ_RA       [i],reg_QUEUE->front()->_read_ra       [index]);
     67          PORT_WRITE(out_DECOD_OUT_NUM_REG_RA    [i],reg_QUEUE->front()->_num_reg_ra    [index]);
     68          PORT_WRITE(out_DECOD_OUT_READ_RB       [i],reg_QUEUE->front()->_read_rb       [index]);
     69          PORT_WRITE(out_DECOD_OUT_NUM_REG_RB    [i],reg_QUEUE->front()->_num_reg_rb    [index]);
     70          PORT_WRITE(out_DECOD_OUT_READ_RC       [i],reg_QUEUE->front()->_read_rc       [index]);
     71          PORT_WRITE(out_DECOD_OUT_NUM_REG_RC    [i],reg_QUEUE->front()->_num_reg_rc    [index]);
     72          PORT_WRITE(out_DECOD_OUT_WRITE_RD      [i],reg_QUEUE->front()->_write_rd      [index]);
     73          PORT_WRITE(out_DECOD_OUT_NUM_REG_RD    [i],reg_QUEUE->front()->_num_reg_rd    [index]);
     74          PORT_WRITE(out_DECOD_OUT_WRITE_RE      [i],reg_QUEUE->front()->_write_re      [index]);
     75          PORT_WRITE(out_DECOD_OUT_NUM_REG_RE    [i],reg_QUEUE->front()->_num_reg_re    [index]);
     76          PORT_WRITE(out_DECOD_OUT_EXCEPTION_USE [i],reg_QUEUE->front()->_exception_use [index]);
     77          PORT_WRITE(out_DECOD_OUT_EXCEPTION     [i],reg_QUEUE->front()->_exception     [index]);
    6978        }
    7079
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_transition.cpp

    r105 r108  
    3131        for (uint32_t i=0; i<_param->_nb_context; i++)
    3232          reg_NB_INST [i]=0;
     33
     34        reg_LAST_SLOT = 0;
    3335      }
    3436    else
     
    6264                entry->_no_execute    [i] = PORT_READ(in_DECOD_IN_NO_EXECUTE    [i]);
    6365                entry->_is_delay_slot [i] = PORT_READ(in_DECOD_IN_IS_DELAY_SLOT [i]);
     66#ifdef DEBUG
     67                entry->_address       [i] = PORT_READ(in_DECOD_IN_ADDRESS       [i]);
     68#endif
    6469                entry->_address_next  [i] = PORT_READ(in_DECOD_IN_ADDRESS_NEXT  [i]);
    6570                entry->_has_immediat  [i] = PORT_READ(in_DECOD_IN_HAS_IMMEDIAT  [i]);
     
    9095        if (not reg_QUEUE->empty())
    9196          {
    92             bool find = false;
     97            bool find = false;
    9398           
    9499            for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    95100              {
    96101                // Test transaction : if ok then invalid slot
     102                // In order by rename logic
    97103                if (internal_DECOD_OUT_VAL [i] and internal_DECOD_OUT_ACK[i])
    98104                  {
    99105                    log_printf(TRACE,Decod_queue,FUNCTION,_("  * DECOD_OUT [%d]"),i);
    100106               
     107#ifdef DEBUG_TEST
     108                    if (reg_LAST_SLOT != i)
     109                      throw ERRORMORPHEO(FUNCTION,toString(_("reg_LAST_SLOT (%d) is different at decod_out port (%d)."),reg_LAST_SLOT,i));
     110#endif
     111                    reg_LAST_SLOT ++;
     112
    101113                    reg_QUEUE->front()->_val [i] = 0;
    102114
     
    108120                  }
    109121                // Test if slot is (again) valid, if yes, then have less one instruction in the entry
    110                 find |= reg_QUEUE->front()->_val [i];
     122                find |= reg_QUEUE->front()->_val [i];
    111123              }
    112124           
    113             // test if can free the entry
    114             if (not find) // no valid instruction in current slot
     125            // test if can free the entry : test if have consume all entry
     126            if (not find) // no valid instruction in current slot
    115127              {
    116128                log_printf(TRACE,Decod_queue,FUNCTION,_("    * POP  queue"));
     
    119131                delete reg_QUEUE->front();
    120132                reg_QUEUE->pop_front();
     133
     134                reg_LAST_SLOT = 0;
    121135              }
    122136          }
     
    125139#if defined(DEBUG) and defined(DEBUG_Decod_queue) and (DEBUG >= DEBUG_TRACE)
    126140    log_printf(TRACE,Decod_queue,FUNCTION,"  * Dump decod_queue");
     141    log_printf(TRACE,Decod_queue,FUNCTION,"    * reg_LAST_SLOT : %d",reg_LAST_SLOT);
    127142    uint32_t x=0;
    128143    for (std::list<decod_queue_entry_t*>::iterator it=reg_QUEUE->begin();
     
    144159                         ,(*it)->_no_execute    [i]
    145160                         ,(*it)->_is_delay_slot [i]
    146                          ,(*it)->_address_next  [i]
    147                          ,(*it)->_address_next  [i]<<2
     161                         ,(*it)->_address       [i]
     162                         ,(*it)->_address       [i]<<2
    148163                         ,(*it)->_has_immediat  [i]
    149164                         ,(*it)->_immediat      [i]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/test.cpp

    r105 r108  
    7373  ALLOC1_SC_SIGNAL(out_DECOD_NO_EXECUTE                   ,"out_DECOD_NO_EXECUTE                   ",Tcontrol_t         ,_param->_nb_inst_decod);
    7474  ALLOC1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT                ,"out_DECOD_IS_DELAY_SLOT                ",Tcontrol_t         ,_param->_nb_inst_decod);
     75#ifdef DEBUG
     76  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS                      ,"out_DECOD_ADDRESS                      ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     77#endif
    7578  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT                 ,"out_DECOD_ADDRESS_NEXT                 ",Tgeneral_data_t    ,_param->_nb_inst_decod);
    7679  ALLOC1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT                 ,"out_DECOD_HAS_IMMEDIAT                 ",Tcontrol_t         ,_param->_nb_inst_decod);
     
    159162  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod);
    160163  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod);
     164#ifdef DEBUG
     165  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_ADDRESS                      ,_param->_nb_inst_decod);
     166#endif
    161167  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_ADDRESS_NEXT                 ,_param->_nb_inst_decod);
    162168  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_HAS_IMMEDIAT                 ,_param->_nb_inst_decod);
     
    490496  DELETE1_SC_SIGNAL(out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod);
    491497  DELETE1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod);
     498#ifdef DEBUG
     499  DELETE1_SC_SIGNAL(out_DECOD_ADDRESS                      ,_param->_nb_inst_decod);
     500#endif
    492501  DELETE1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT                 ,_param->_nb_inst_decod);
    493502  DELETE1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT                 ,_param->_nb_inst_decod);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/include/Decod_unit.h

    r105 r108  
    8787  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_NO_EXECUTE                   ;//[nb_inst_decod]
    8888  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_IS_DELAY_SLOT                ;//[nb_inst_decod]
     89#ifdef DEBUG
     90  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_ADDRESS                      ;//[nb_inst_decod]
     91#endif
    8992  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_ADDRESS_NEXT                 ;//[nb_inst_decod]
    9093  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_HAS_IMMEDIAT                 ;//[nb_inst_decod]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_allocation.cpp

    r105 r108  
    8989      ALLOC1_SIGNAL_OUT(out_DECOD_NO_EXECUTE   ,"no_execute"   ,Tcontrol_t        ,1                                   );
    9090      ALLOC1_SIGNAL_OUT(out_DECOD_IS_DELAY_SLOT,"is_delay_slot",Tcontrol_t        ,1                                   );
     91#ifdef DEBUG
     92      ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS      ,"address"      ,Tgeneral_data_t   ,_param->_size_instruction_address   );
     93#endif
    9194      ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS_NEXT ,"address_next" ,Tgeneral_data_t   ,_param->_size_instruction_address   );
    9295      ALLOC1_SIGNAL_OUT(out_DECOD_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t        ,1                                   );
     
    293296          COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_IS_DELAY_SLOT",
    294297                                   dest, "in_DECOD_IN_"+toString(i)+"_IS_DELAY_SLOT");
     298#ifdef DEBUG
     299          COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_ADDRESS"      ,
     300                                   dest, "in_DECOD_IN_"+toString(i)+"_ADDRESS"      );
     301#endif
    295302          COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_ADDRESS_NEXT" ,
    296303                                   dest, "in_DECOD_IN_"+toString(i)+"_ADDRESS_NEXT" );
     
    435442      // in_DECOD_IN_NO_EXECUTE     - component decod
    436443      // in_DECOD_IN_IS_DELAY_SLOT  - component decod
     444      // in_DECOD_IN_ADDRESS        - component decod
    437445      // in_DECOD_IN_ADDRESS_NEXT   - component decod
    438446      // in_DECOD_IN_HAS_IMMEDIAT   - component decod
     
    478486          PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_IS_DELAY_SLOT",
    479487                              dest,"out_DECOD_"    +toString(i)+"_IS_DELAY_SLOT");
     488#ifdef DEBUG
     489          PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_ADDRESS"      ,
     490                              dest,"out_DECOD_"    +toString(i)+"_ADDRESS"      );
     491#endif
    480492          PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_ADDRESS_NEXT" ,
    481493                              dest,"out_DECOD_"    +toString(i)+"_ADDRESS_NEXT" );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_deallocation.cpp

    r105 r108  
    4848        DELETE1_SIGNAL(out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod,1                                   );
    4949        DELETE1_SIGNAL(out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod,1                                   );
     50#ifdef DEBUG
     51        DELETE1_SIGNAL(out_DECOD_ADDRESS                      ,_param->_nb_inst_decod,_param->_size_instruction_address   );
     52#endif
    5053        DELETE1_SIGNAL(out_DECOD_ADDRESS_NEXT                 ,_param->_nb_inst_decod,_param->_size_instruction_address   );
    5154        DELETE1_SIGNAL(out_DECOD_HAS_IMMEDIAT                 ,_param->_nb_inst_decod,1                                   );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/config-context_1-decod_unit_1.cfg

    r88 r108  
    882       2       +1      # size_depth                 [0] [nb_context]
    994       4       +1      # nb_branch_speculated       [0] [nb_context]
     104       4       +1      # size_nb_inst_decod
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/config-context_4-decod_unit_1.cfg

    r88 r108  
    17172       2       +1      # nb_branch_speculated       [2] [nb_context]
    18188       8       +1      # nb_branch_speculated       [3] [nb_context]
     194       4       +1      # size_nb_inst_decod
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/config-context_4-decod_unit_2-a.cfg

    r88 r108  
    18182       2       +1      # nb_branch_speculated       [2] [nb_context]
    19198       8       +1      # nb_branch_speculated       [3] [nb_context]
     204       4       +1      # size_nb_inst_decod
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/config-context_4-decod_unit_2-b.cfg

    r88 r108  
    18182       2       +1      # nb_branch_speculated       [2] [nb_context]
    19198       8       +1      # nb_branch_speculated       [3] [nb_context]
     204       4       +1      # size_nb_inst_decod
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/config-context_4-decod_unit_4.cfg

    r88 r108  
    20202       2       +1      # nb_branch_speculated       [2] [nb_context]
    21218       8       +1      # nb_branch_speculated       [3] [nb_context]
     224       4       +1      # size_nb_inst_decod
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/config-min.cfg

    r88 r108  
    880       0       +1      # size_depth                 [0] [nb_context]
    991       1       +1      # nb_branch_speculated       [0] [nb_context]
     101       1       +1      # size_nb_inst_decod
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/src/main.cpp

    r88 r108  
    88#include "Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/include/test.h"
    99
    10 #define NB_PARAMS 4
     10#define NB_PARAMS 5
    1111
    1212void usage (int argc, char * argv[])
     
    2222  err (_(" * size_depth                 [nb_context]    (uint32_t)\n"));
    2323  err (_(" * nb_branch_speculated       [nb_context]    (uint32_t)\n"));
     24  err (_(" * size_nb_inst_decod                         (uint32_t)\n"));
    2425
    2526  exit (1);
     
    6970    _nb_branch_speculated [i] = fromString<uint32_t>(argv[x++]);
    7071
     72  uint32_t   _size_nb_inst_decod         = fromString<uint32_t>(argv[x++]);
     73
    7174  std::vector<uint32_t> * _translate_context_id_from_decod_unit = new std::vector<uint32_t> [_nb_decod_unit];
    7275
     
    8790         _size_depth                           ,
    8891         _nb_branch_speculated                 ,
     92         _size_nb_inst_decod                   ,
    8993         true // is_toplevel
    9094        );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/src/test.cpp

    r101 r108  
    104104  ALLOC2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH_VAL                   ,"out_CONTEXT_DECOD_UNIT_DEPTH_VAL                   ",Tcontrol_t,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    105105  ALLOC2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH                       ,"out_CONTEXT_DECOD_UNIT_DEPTH                       ",Tdepth_t  ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
     106
     107  ALLOC1_SC_SIGNAL(out_NB_INST_DECOD_ALL                              ,"out_NB_INST_DECOD_ALL                              ",Tcounter_t,_param->_nb_context);
     108  ALLOC1_SC_SIGNAL( in_NB_INST_DECOD_UNIT_DECOD_ALL                   ," in_NB_INST_DECOD_UNIT_DECOD_ALL                   ",Tcounter_t,_param->_nb_context);
     109  ALLOC1_SC_SIGNAL(out_NB_INST_CONTEXT_STATE_DECOD_ALL                ,"out_NB_INST_CONTEXT_STATE_DECOD_ALL                ",Tcounter_t,_param->_nb_context);
    106110 
    107111  /********************************************************
     
    182186        }
    183187
     188  INSTANCE1_SC_SIGNAL(_Front_end_Glue,out_NB_INST_DECOD_ALL                                ,_param->_nb_context);
     189  INSTANCE1_SC_SIGNAL(_Front_end_Glue, in_NB_INST_DECOD_UNIT_DECOD_ALL                     ,_param->_nb_context);
     190  INSTANCE1_SC_SIGNAL(_Front_end_Glue,out_NB_INST_CONTEXT_STATE_DECOD_ALL                  ,_param->_nb_context);
     191
    184192  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
    185193   
     
    282290  DELETE2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH_VAL                     ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    283291  DELETE2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH                         ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
     292
     293  DELETE1_SC_SIGNAL(out_NB_INST_DECOD_ALL                                ,_param->_nb_context);
     294  DELETE1_SC_SIGNAL( in_NB_INST_DECOD_UNIT_DECOD_ALL                     ,_param->_nb_context);
     295  DELETE1_SC_SIGNAL(out_NB_INST_CONTEXT_STATE_DECOD_ALL                  ,_param->_nb_context);
    284296    }
    285297#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/include/Front_end_Glue.h

    r101 r108  
    133133  public    : SC_OUT(Tcontrol_t           ) *** out_CONTEXT_DECOD_UNIT_DEPTH_VAL                      ;//[nb_decod_unit][nb_decod_unit_context]
    134134  public    : SC_OUT(Tdepth_t             ) *** out_CONTEXT_DECOD_UNIT_DEPTH                          ;//[nb_decod_unit][nb_decod_unit_context]
     135
     136    // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     137  public    : SC_OUT(Tcounter_t           ) ** out_NB_INST_DECOD_ALL                                  ;//[nb_context]
     138
     139  public    : SC_IN (Tcounter_t           ) **  in_NB_INST_DECOD_UNIT_DECOD_ALL                       ;//[nb_context]
     140
     141  public    : SC_OUT(Tcounter_t           ) ** out_NB_INST_CONTEXT_STATE_DECOD_ALL                    ;//[nb_context]
     142
    135143
    136144    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     
    177185  public  : void        genMealy_event            (void);
    178186  public  : void        genMealy_depth            (void);
     187  public  : void        genMealy_nb_inst          (void);
    179188#endif                                         
    180189
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/include/Parameters.h

    r88 r108  
    5454                        uint32_t              * size_depth                           ,
    5555                        uint32_t              * nb_branch_speculated                 ,
     56                        uint32_t                size_nb_inst_decod                   ,
    5657                        uint32_t                is_toplevel=false);
    5758//   public : Parameters  (Parameters & param) ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue.cpp

    r101 r108  
    176176# endif     
    177177     
     178        log_printf(INFO,Front_end_Glue,FUNCTION,_("<%s> : Method - genMealy_nb_inst"),_name.c_str());
     179
     180        SC_METHOD (genMealy_nb_inst);
     181        dont_initialize ();
     182//      sensitive << (*(in_CLOCK)).neg(); // don't need internal register
     183        for (uint32_t i=0; i<_param->_nb_context; ++i)
     184            sensitive << (*( in_NB_INST_DECOD_UNIT_DECOD_ALL [i]));
     185
     186# ifdef SYSTEMCASS_SPECIFIC
     187        // List dependency information
     188# endif   
    178189       
    179190#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_allocation.cpp

    r101 r108  
    155155      _ALLOC2_SIGNAL_OUT(out_CONTEXT_DECOD_UNIT_DEPTH                          ,"DECOD_UNIT_DEPTH"              ,Tdepth_t             ,_param->_size_depth  ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    156156    }
    157    
     157
     158    // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     159    {
     160      ALLOC1_INTERFACE("nb_inst",OUT,EAST,_("nb inst"),_param->_nb_context);
     161
     162      ALLOC1_SIGNAL_OUT(out_NB_INST_DECOD_ALL                                  ,"DECOD_ALL"                     ,Tcounter_t           ,_param->_size_nb_inst_decod);
     163      ALLOC1_SIGNAL_IN ( in_NB_INST_DECOD_UNIT_DECOD_ALL                       ,"DECOD_UNIT_DECOD_ALL"          ,Tcounter_t           ,_param->_size_nb_inst_decod);
     164      ALLOC1_SIGNAL_OUT(out_NB_INST_CONTEXT_STATE_DECOD_ALL                    ,"CONTEXT_STATE_DECOD_ALL"       ,Tcounter_t           ,_param->_size_nb_inst_decod);
     165    }
     166
    158167    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    159168
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_deallocation.cpp

    r101 r108  
    8787        DELETE2_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH_VAL                     ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],1);
    8888        DELETE2_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH                         ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth);
     89
     90        DELETE1_SIGNAL(out_NB_INST_DECOD_ALL                                ,_param->_nb_context,_param->_size_nb_inst_decod);
     91        DELETE1_SIGNAL( in_NB_INST_DECOD_UNIT_DECOD_ALL                     ,_param->_nb_context,_param->_size_nb_inst_decod);
     92        DELETE1_SIGNAL(out_NB_INST_CONTEXT_STATE_DECOD_ALL                  ,_param->_nb_context,_param->_size_nb_inst_decod);
    8993      }
    9094    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Parameters.cpp

    r88 r108  
    2828                          uint32_t              * size_depth                           ,
    2929                          uint32_t              * nb_branch_speculated                 ,
     30                          uint32_t                size_nb_inst_decod                   ,
    3031                          uint32_t                is_toplevel):
    3132    morpheo::behavioural::Parameters()
     
    5556        _size_instruction_address = size_address;
    5657        _size_depth               = max<uint32_t>(size_depth,_nb_context);
    57        
     58        _size_nb_inst_decod       = size_nb_inst_decod;
     59
    5860        _have_port_context_id     = _size_context_id > 0;
    5961        _have_port_depth          = _size_depth > 0;
  • 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

    r98 r108  
    2828      {
    2929        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"  * PREDICT [%d]",i);
     30
     31        Tcontrol_t val          = PORT_READ(in_PREDICT_VAL          [i]);
     32        Tcontrol_t register_ack = PORT_READ(in_PREDICT_REGISTER_ACK [i]);
     33        Tcontrol_t sort_val     = (_param->_have_port_victim)?PORT_READ(in_PREDICT_SORT_VAL   [i]):true;
     34        Tcontrol_t victim_ack   = (_param->_have_port_victim)?PORT_READ(in_PREDICT_VICTIM_ACK [i]):true;
     35
     36        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * val          : %d",val         );
     37        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * register_ack : %d",register_ack);
     38        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * sort_val     : %d",sort_val    );
     39        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * victim_ack   : %d",victim_ack  );
     40       
    3041        Tptr_t          index       = (_param->_have_port_victim)?PORT_READ(in_PREDICT_SORT_INDEX [i]):0;
    31         Tcontrol_t      hit         = PORT_READ(in_PREDICT_REGISTER_HIT         [i][index]);
     42        Tcontrol_t      hit         = // (_param->_have_port_victim)?sort_val:
     43                                      PORT_READ(in_PREDICT_REGISTER_HIT [i][index]);
    3244        Tgeneral_data_t address_src = PORT_READ(in_PREDICT_REGISTER_ADDRESS_SRC [i][index]);
    3345
     
    4456        PORT_WRITE(out_PREDICT_IS_ACCURATE  [i],PORT_READ(in_PREDICT_REGISTER_IS_ACCURATE   [i][index]));
    4557
    46         Tcontrol_t val          = PORT_READ(in_PREDICT_VAL          [i]);
    47         Tcontrol_t register_ack = PORT_READ(in_PREDICT_REGISTER_ACK [i]);
    48         Tcontrol_t sort_val     = (_param->_have_port_victim)?PORT_READ(in_PREDICT_SORT_VAL   [i]):true;
    49         Tcontrol_t victim_ack   = (_param->_have_port_victim)?PORT_READ(in_PREDICT_VICTIM_ACK [i]):true;
    50 
    51         log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * val          : %d",val         );
    52         log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * register_ack : %d",register_ack);
    53         log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * sort_val     : %d",sort_val    );
    54         log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * victim_ack   : %d",victim_ack  );
    55        
    5658        PORT_WRITE(out_PREDICT_ACK            [i], (
    5759//                                                  val          and
    5860                                                    register_ack and
    59                                                     sort_val     and
     61//                                                  sort_val     and
    6062                                                    victim_ack
    6163                                                    ));
     
    6365                                                    val          and
    6466//                                                  register_ack and
    65                                                     sort_val     and
     67//                                                  sort_val     and
    6668                                                    victim_ack
    6769                                                    ));
     
    7173        PORT_WRITE(out_PREDICT_VICTIM_VAL     [i], (
    7274                                                    val          and
    73                                                     register_ack and
    74                                                     sort_val     // and
     75                                                    register_ack // and
     76//                                                  sort_val    and
    7577//                                                  victim_ack
    7678                                                    ));
  • 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_genMealy_predict.cpp

    r88 r108  
    5454            //  * context is the same
    5555            //  * address_src must be higher that the address, because the address lower is previous the current pc.
     56            //  * prediction is no accurate is address_dest is not valid.
    5657            PORT_WRITE(out_PREDICT_HIT          [i][j],hit);
    5758            PORT_WRITE(out_PREDICT_ADDRESS_SRC  [i][j],reg_BTB[num_bank][j]._address_src );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_allocation.cpp

    r88 r108  
    224224                                       dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_ADDRESS_SRC");
    225225
    226               // out_OUTPUT_VAL     -> glue
    227               // out_OUTPUT_INDEX   -> glue
    228               // out_OUTPUT_ADDRESS -> no exist
    229226            }
    230         }
     227
     228          // 1 output
     229          // out_OUTPUT_VAL     -> glue
     230          // out_OUTPUT_INDEX   -> glue
     231          // out_OUTPUT_ADDRESS -> no exist
     232        }
    231233
    232234        //================================================================
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp

    r107 r108  
    126126                      if (reg_UPT_BOTTOM [i] != reg_UPT_TOP [i])
    127127                        reg_UPT_EMPTY [i] = false;
     128
     129                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_TOP             : %d",reg_UPT_TOP            [i]);
     130                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_TOP_EVENT       : %d",reg_UPT_TOP_EVENT      [i]);
     131                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_UPDATE          : %d",reg_UPT_UPDATE         [i]);
     132                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_EMPTY           : %d",reg_UPT_EMPTY          [i]);
    128133                    }
    129134
     
    210215              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * miss_decod    : %d",miss_decod);
    211216              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * upt_ptr_write : %d",upt_ptr_write);
    212              
     217
    213218              if (miss_ifetch or miss_decod)
    214219                {
     
    218223                    throw ERRORMORPHEO(FUNCTION,_("Decod : invalid event state."));
    219224#endif
    220                  
    221225                  if (reg_UFPT_NB_NEED_UPDATE [context] == 0)
    222226                    {
     
    312316              reg_UPT_EMPTY   [context] = false;
    313317//            reg_UPT_UPDATE  [context] = reg_UPT_TOP [context];
     318
     319//               if (miss_ifetch or miss_decod)
     320//                 reg_UPT_TOP_EVENT [context] = reg_UPT_TOP [context];
    314321            }
    315 
    316         // ===================================================================
    317         // =====[ BRANCH_COMPLETE ]===========================================
    318         // ===================================================================
    319        
    320         // The branch is complete
    321         //   * Hit  prediction :
    322         //     * update status
    323         //   * Miss prediction :
    324         for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
    325           if (PORT_READ(in_BRANCH_COMPLETE_VAL[i]) and internal_BRANCH_COMPLETE_ACK [i])
    326             {
    327               Tcontext_t context   = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0;
    328               Tdepth_t   depth     = (_param->_have_port_depth     )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
    329               Tcontrol_t miss      = internal_BRANCH_COMPLETE_MISS_PREDICTION [i];
    330               Tcontrol_t good_take = internal_BRANCH_COMPLETE_TAKE            [i];
    331               Taddress_t good_addr = internal_BRANCH_COMPLETE_ADDRESS_DEST    [i];
    332 
    333               log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * BRANCH_COMPLETE[%d] - Accepted",i);
    334               log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * context    : %d",context);
    335               log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * depth      : %d",depth);
    336               log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * miss       : %d",miss);
    337              
    338               if (miss)
    339                 {
    340                   // Have a miss !!!
    341                   // Flush UPFT
    342                   flush_UFPT [context] = true;
    343                  
    344                   // Flush UPT
    345                   uint32_t top        = reg_UPT_TOP [context];
    346                   uint32_t new_update = ((top==0)?_param->_size_upt_queue[context]:top)-1;
    347 
    348                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * top        : %d",top);
    349                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * new_update : %d",new_update);
    350 
    351                   for (uint32_t j=(depth+1)%_param->_size_upt_queue[context];
    352                                 j!=top;
    353                                 j=(j+1)%_param->_size_upt_queue[context])
    354                     reg_UPDATE_PREDICTION_TABLE [context][j]._state = UPDATE_PREDICTION_STATE_EVENT;
    355                  
    356                  
    357 //                reg_UPT_BOTTOM    [context];
    358                   reg_UPT_TOP       [context] = depth;
    359                   reg_UPT_TOP_EVENT [context] = top;
    360 
    361                   if (reg_UPT_BOTTOM [context] == reg_UPT_TOP [context])
    362                     reg_UPT_EMPTY [context] = true;
    363 
    364 #ifdef DEBUG_TEST
    365                   if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END)
    366                     throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state."));
    367 #endif
    368                  
    369                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_KO (branch_complete, ifetch hit)",context,depth);
    370                   reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_KO;
    371                  
    372                   Taddress_t    address_src         = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src;
    373                   event_state_t event_state         = reg_EVENT_STATE [context];
    374                   bool          previous_update_ras = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or
    375                                                        (event_state == EVENT_STATE_MISS_FLUSH_UPT          ) or
    376                                                        (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or
    377                                                        (event_state == EVENT_STATE_EVENT_FLUSH_UPT));
    378 //                   bool          update_ras          = (new_update != depth);
    379 
    380 //                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * update_ras : %d",update_ras);
    381 
    382                   if (reg_UFPT_NB_NEED_UPDATE [context] > 0)
    383                     {
    384                       log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT (branch_complete - miss)",context);
    385                       reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT;
    386                     }
    387                   else
    388                     {
    389 //                       if (not previous_update_ras)
    390                         {
    391                           // have ras prediction ?
    392                           log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UPT (branch_complete - miss)",context);
    393 
    394                           reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UPT;
    395              
    396                         }
    397                     }
    398 
    399                   if (not previous_update_ras)
    400                     {
    401                       reg_UPT_UPDATE [context]  = new_update;
    402                     }
    403                   // else no update
    404 
    405                   reg_EVENT_DEPTH           [context] = depth;
    406                   reg_EVENT_ADDRESS_SRC     [context] = address_src; // delay_slot is compute in Context_State
    407                   reg_EVENT_ADDRESS_DEST_VAL[context] = good_take;
    408                   reg_EVENT_ADDRESS_DEST    [context] = good_addr;
    409                 }
    410               else
    411                 {
    412                   // Hit case
    413 
    414 #ifdef DEBUG_TEST
    415                   if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END)
    416                     throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state."));
    417 #endif
    418                    
    419                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_OK (branch_complete, ifetch hit)",context,depth);
    420                   reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_OK;
    421                 }
    422 
    423               // In all case : update good_take
    424               reg_UPDATE_PREDICTION_TABLE [context][depth]._good_take    = good_take;
    425 
    426               // Write address_dest if need read register
    427               Tbranch_condition_t condition = reg_UPDATE_PREDICTION_TABLE [context][depth]._condition;
    428              
    429               if ((condition == BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK) or
    430                   (condition == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK   ) or
    431                   (condition == BRANCH_CONDITION_READ_STACK                       ) )
    432                 reg_UPDATE_PREDICTION_TABLE [context][depth]._address_dest = good_addr;
    433             }
    434322
    435323        // ===================================================================
     
    599487        }
    600488
     489
     490        // ===================================================================
     491        // =====[ BRANCH_COMPLETE ]===========================================
     492        // ===================================================================
     493       
     494        // The branch is complete
     495        //   * Hit  prediction :
     496        //     * update status
     497        //   * Miss prediction :
     498        for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
     499          if (PORT_READ(in_BRANCH_COMPLETE_VAL[i]) and internal_BRANCH_COMPLETE_ACK [i])
     500            {
     501              Tcontext_t context   = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0;
     502              Tdepth_t   depth     = (_param->_have_port_depth     )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
     503              Tcontrol_t miss      = internal_BRANCH_COMPLETE_MISS_PREDICTION [i];
     504              Tcontrol_t good_take = internal_BRANCH_COMPLETE_TAKE            [i];
     505              Taddress_t good_addr = internal_BRANCH_COMPLETE_ADDRESS_DEST    [i];
     506
     507              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * BRANCH_COMPLETE[%d] - Accepted",i);
     508              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * context    : %d",context);
     509              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * depth      : %d",depth);
     510              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * miss       : %d",miss);
     511             
     512              if (miss)
     513                {
     514                  // Have a miss !!!
     515                  // Flush UPFT
     516                  flush_UFPT [context] = true;
     517                 
     518                  // Flush UPT
     519                  uint32_t top        = reg_UPT_TOP [context];
     520                  uint32_t new_update = ((top==0)?_param->_size_upt_queue[context]:top)-1;
     521
     522                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * top        : %d",top);
     523                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * new_update : %d",new_update);
     524
     525                  for (uint32_t j=(depth+1)%_param->_size_upt_queue[context];
     526                                j!=top;
     527                                j=(j+1)%_param->_size_upt_queue[context])
     528                    reg_UPDATE_PREDICTION_TABLE [context][j]._state = UPDATE_PREDICTION_STATE_EVENT;
     529                 
     530                 
     531//                reg_UPT_BOTTOM    [context];
     532                  reg_UPT_TOP       [context] = depth;
     533                  reg_UPT_TOP_EVENT [context] = top;
     534
     535                  if (reg_UPT_BOTTOM [context] == reg_UPT_TOP [context])
     536                    reg_UPT_EMPTY [context] = true;
     537
     538#ifdef DEBUG_TEST
     539                  if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END)
     540                    throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state."));
     541#endif
     542                 
     543                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_KO (branch_complete, ifetch hit)",context,depth);
     544                  reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_KO;
     545                 
     546                  Taddress_t    address_src         = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src;
     547                  event_state_t event_state         = reg_EVENT_STATE [context];
     548                  bool          previous_update_ras = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or
     549                                                       (event_state == EVENT_STATE_MISS_FLUSH_UPT          ) or
     550                                                       (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or
     551                                                       (event_state == EVENT_STATE_EVENT_FLUSH_UPT));
     552//                   bool          update_ras          = (new_update != depth);
     553
     554//                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * update_ras : %d",update_ras);
     555                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * previous_update_ras : %d",previous_update_ras);
     556
     557                  if (reg_UFPT_NB_NEED_UPDATE [context] > 0)
     558                    {
     559                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT (branch_complete - miss)",context);
     560                      reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT;
     561                    }
     562                  else
     563                    {
     564//                       if (not previous_update_ras)
     565                        {
     566                          // have ras prediction ?
     567                          log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UPT (branch_complete - miss)",context);
     568
     569                          reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UPT;
     570             
     571                        }
     572                    }
     573
     574                  if (not previous_update_ras)
     575                    {
     576                      reg_UPT_UPDATE [context]  = new_update;
     577                    }
     578                  // else no update
     579
     580                  reg_EVENT_DEPTH           [context] = depth;
     581                  reg_EVENT_ADDRESS_SRC     [context] = address_src; // delay_slot is compute in Context_State
     582                  reg_EVENT_ADDRESS_DEST_VAL[context] = good_take;
     583                  reg_EVENT_ADDRESS_DEST    [context] = good_addr;
     584                }
     585              else
     586                {
     587                  // Hit case
     588
     589// #ifdef DEBUG_TEST
     590//                   if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END)
     591//                     throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state."));
     592// #endif
     593
     594                  if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state == UPDATE_PREDICTION_STATE_WAIT_END)
     595                    {
     596                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_OK (branch_complete, ifetch hit)",context,depth);
     597                      reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_OK;
     598                    }
     599                }
     600
     601              // In all case : update good_take
     602              reg_UPDATE_PREDICTION_TABLE [context][depth]._good_take    = good_take;
     603
     604              // Write address_dest if need read register
     605              Tbranch_condition_t condition = reg_UPDATE_PREDICTION_TABLE [context][depth]._condition;
     606             
     607              if ((condition == BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK) or
     608                  (condition == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK   ) or
     609                  (condition == BRANCH_CONDITION_READ_STACK                       ) )
     610                reg_UPDATE_PREDICTION_TABLE [context][depth]._address_dest = good_addr;
     611            }
     612
    601613        // ===================================================================
    602614        // =====[ BRANCH_EVENT ]==============================================
     
    695707                    uint32_t bottom     = reg_UPT_BOTTOM [i];
    696708                    uint32_t new_update = ((top==0)?_param->_size_upt_queue[i]:top)-1;
    697                     uint32_t full       = ((depth == top) and (top == bottom) and not reg_UPT_EMPTY [i]);
     709                    bool     full       = ((depth == top) and (top == bottom) and not reg_UPT_EMPTY [i]);
     710//                     bool     empty      = reg_UPT_EMPTY [i];
     711
    698712                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * top        : %d",top);
    699713                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * depth      : %d",depth);
    700714                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * new_update : %d",new_update);
    701715
    702                     // Test empty
    703                     if (not reg_UPT_EMPTY [i])
     716                    event_state_t event_state         = reg_EVENT_STATE [i];
     717                    bool          previous_update_ras = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or
     718                                                         (event_state == EVENT_STATE_MISS_FLUSH_UPT          ) or
     719                                                         (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or
     720                                                         (event_state == EVENT_STATE_EVENT_FLUSH_UPT));
     721
     722                    bool find = false; // have slot to update ???
     723
     724                    // flush all slot after the event
     725                    for (uint32_t j=(depth+1)%_param->_size_upt_queue[i];
     726                         j!=top;
     727                         j=(j+1)%_param->_size_upt_queue[i])
     728                      if ((reg_UPDATE_PREDICTION_TABLE [i][j]._state != UPDATE_PREDICTION_STATE_END) and
     729                          (reg_UPDATE_PREDICTION_TABLE [i][j]._state != UPDATE_PREDICTION_STATE_EMPTY))
     730                        {
     731                          find = true;
     732                          reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EVENT;
     733                        }
     734                   
     735                    if ((reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END) and
     736                        (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_EMPTY))
    704737                      {
    705 #ifdef DEBUG_TEST
    706                         if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END)
    707                           throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state."));
    708 #endif
     738                        find = true;
    709739                        reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_EVENT;
    710 
     740                      }
     741
     742                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * find       : %d",find);
     743                   
     744                    // Test if have update slot
     745                    if (find)
     746                      {
    711747                        // flush all slot after the event
    712748                        for (uint32_t j=(depth+1)%_param->_size_upt_queue[i];
     
    714750                             j=(j+1)%_param->_size_upt_queue[i])
    715751                          reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EVENT;
     752
     753                        reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_EVENT;
     754                       
     755                        // reg_UPT_BOTTOM    [i];
     756                        // TODO : special case : event is an exception on branch, also depth is not valid
     757                        reg_UPT_TOP       [i] = depth; // depth is again valid
     758                        reg_UPT_TOP_EVENT [i] = top;
     759                       
     760                        if (bottom == reg_UPT_TOP [i])
     761                          reg_UPT_EMPTY [i] = true;
    716762                      }
     763
     764                    bool          update_ras = find and ((top != depth) or full);
     765                   
     766                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * update_ras : %d",update_ras);
     767                   
     768                    if (not previous_update_ras and update_ras)
     769                      reg_UPT_UPDATE [i]  = new_update;
    717770             
    718 //                  reg_UPT_BOTTOM    [i];
    719                     // TODO : special case : event is an exception on branch, also depth is not valid
    720                     reg_UPT_TOP       [i] = depth; // depth is again valid
    721                     reg_UPT_TOP_EVENT [i] = top;
    722 
    723                     if (bottom == reg_UPT_TOP [i])
    724                       reg_UPT_EMPTY [i] = true;
    725 
    726                     reg_EVENT_VAL     [i] = true;
    727                     reg_EVENT_UPT_PTR [i] = depth;
    728                     event_state_t event_state         = reg_EVENT_STATE [i];
    729                     bool          previous_update_ras = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or
    730                                                          (event_state == EVENT_STATE_MISS_FLUSH_UPT          ) or
    731                                                          (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or
    732                                                          (event_state == EVENT_STATE_EVENT_FLUSH_UPT));
    733                     bool          update_ras          = (top != depth) or full;
    734 
    735                     log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * update_ras : %d",update_ras);
    736                    
    737771                    // new state :
    738772                    //   * test if ufpt is empty
     
    741775                    //            * ok : nothing
    742776                    //            * ko : flush upt
     777                    reg_EVENT_VAL     [i] = true;
     778                    reg_EVENT_UPT_PTR [i] = depth;
     779
    743780                    if (reg_UFPT_NB_NEED_UPDATE [i] > 0)
    744781                      {
     
    766803                        else
    767804                          {
     805                            // special case : nothing
     806                            reg_EVENT_VAL     [i] = false;
     807
    768808                            reg_EVENT_STATE [i] = EVENT_STATE_OK;
    769809                          }
    770810                      }
    771                    
    772                     if (not previous_update_ras and update_ras)
    773                       {
    774                         reg_UPT_UPDATE [i]  = new_update;
    775                       }
     811
    776812                    // else no update
    777813                   
     
    817853                {
    818854                  for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; ++j)
    819                     {
    820                       reg_UFPT_NB_UPDATE [i] ++;
    821                       reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state = UPDATE_FETCH_PREDICTION_STATE_EVENT;
    822                     }
     855                    // EMPTY : no event
     856                    // END   : already update
     857                    // EVENT : previous event
     858                    if (reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state == UPDATE_FETCH_PREDICTION_STATE_WAIT_DECOD)
     859                      {
     860                        reg_UFPT_NB_UPDATE [i] ++;
     861                        reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state = UPDATE_FETCH_PREDICTION_STATE_EVENT;
     862                      }
    823863
    824864                  // TOP is next write slot : last slot is TOP-1
     
    862902        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_STATE           : %s"  ,toString(reg_EVENT_STATE [i]).c_str());
    863903        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_DEPTH           : %d"  ,reg_EVENT_DEPTH           [i]);
    864         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_ADDRESS_SRC     : %.8x",reg_EVENT_ADDRESS_SRC     [i]);
     904        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_ADDRESS_SRC     : %.8x (%.8x)",reg_EVENT_ADDRESS_SRC     [i],reg_EVENT_ADDRESS_SRC     [i]<<2);
    865905        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_ADDRESS_DEST_VAL: %d"  ,reg_EVENT_ADDRESS_DEST_VAL[i]);
    866         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_ADDRESS_DEST    : %.8x",reg_EVENT_ADDRESS_DEST    [i]);
     906        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_ADDRESS_DEST    : %.8x (%.8x)",reg_EVENT_ADDRESS_DEST    [i],reg_EVENT_ADDRESS_DEST    [i]<<2);
    867907
    868908        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * Update_Fetch_Prediction_Table   [%d]",i);
     
    914954      }
    915955#endif
     956
     957#ifdef DEBUG_TEST
     958    for (uint32_t i=0; i<_param->_nb_context; i++)
     959      {
     960        if (reg_UFPT_NB_NEED_UPDATE [i] > _param->_size_ufpt_queue[i])
     961          throw ERRORMORPHEO(FUNCTION,toString(_("reg_UFPT_NB_NEED_UPDATE [%d] (%d) is > at size_ufpt_queue (%d).\n"),i,reg_UFPT_NB_NEED_UPDATE [i],_param->_size_ufpt_queue[i]));
     962        if (reg_UFPT_NB_UPDATE [i] > _param->_size_ufpt_queue[i])
     963          throw ERRORMORPHEO(FUNCTION,toString(_("reg_UFPT_NB_UPDATE [%d] (%d) is > at size_ufpt_queue (%d).\n"),i,reg_UFPT_NB_UPDATE [i],_param->_size_ufpt_queue[i]));
     964      }
     965#endif
     966
    916967      }
    917968
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/src/test.cpp

    r105 r108  
    6868  ALLOC1_SC_SIGNAL(out_DECOD_NO_EXECUTE               ,"out_DECOD_NO_EXECUTE               ",Tcontrol_t           ,_param->_sum_inst_decod);
    6969  ALLOC1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT            ,"out_DECOD_IS_DELAY_SLOT            ",Tcontrol_t           ,_param->_sum_inst_decod);
     70#ifdef DEBUG
     71  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS                  ,"out_DECOD_ADDRESS                  ",Tgeneral_data_t      ,_param->_sum_inst_decod);
     72#endif
    7073  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT             ,"out_DECOD_ADDRESS_NEXT             ",Tgeneral_data_t      ,_param->_sum_inst_decod);
    7174  ALLOC1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT             ,"out_DECOD_HAS_IMMEDIAT             ",Tcontrol_t           ,_param->_sum_inst_decod);
     
    116119  ALLOC1_SC_SIGNAL( in_NB_INST_COMMIT_ALL             ," in_NB_INST_COMMIT_ALL             ",Tcounter_t           ,_param->_nb_context);
    117120  ALLOC1_SC_SIGNAL( in_NB_INST_COMMIT_MEM             ," in_NB_INST_COMMIT_MEM             ",Tcounter_t           ,_param->_nb_context);
     121  ALLOC1_SC_SIGNAL(out_NB_INST_DECOD_ALL              ,"out_NB_INST_DECOD_ALL              ",Tcounter_t           ,_param->_nb_context);
    118122  ALLOC1_SC_SIGNAL(out_DEPTH_MIN                      ,"out_DEPTH_MIN                      ",Tdepth_t             ,_param->_nb_context);
    119123  ALLOC1_SC_SIGNAL(out_DEPTH_MAX                      ,"out_DEPTH_MAX                      ",Tdepth_t             ,_param->_nb_context);
     
    156160  INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_NO_EXECUTE               ,_param->_sum_inst_decod);
    157161  INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_IS_DELAY_SLOT            ,_param->_sum_inst_decod);
     162#ifdef DEBUG
     163  INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_ADDRESS                  ,_param->_sum_inst_decod);
     164#endif
    158165  INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_ADDRESS_NEXT             ,_param->_sum_inst_decod);
    159166  INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_HAS_IMMEDIAT             ,_param->_sum_inst_decod);
     
    208215  INSTANCE1_SC_SIGNAL(_Front_end, in_NB_INST_COMMIT_ALL             ,_param->_nb_context);
    209216  INSTANCE1_SC_SIGNAL(_Front_end, in_NB_INST_COMMIT_MEM             ,_param->_nb_context);
     217  INSTANCE1_SC_SIGNAL(_Front_end,out_NB_INST_DECOD_ALL              ,_param->_nb_context);
    210218  if (_param->_have_port_depth)
    211219    {
     
    317325  DELETE1_SC_SIGNAL(out_DECOD_NO_EXECUTE               ,_param->_sum_inst_decod);
    318326  DELETE1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT            ,_param->_sum_inst_decod);
     327#ifdef DEBUG
     328  DELETE1_SC_SIGNAL(out_DECOD_ADDRESS                  ,_param->_sum_inst_decod);
     329#endif
    319330  DELETE1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT             ,_param->_sum_inst_decod);
    320331  DELETE1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT             ,_param->_sum_inst_decod);
     
    365376  DELETE1_SC_SIGNAL( in_NB_INST_COMMIT_ALL             ,_param->_nb_context);
    366377  DELETE1_SC_SIGNAL( in_NB_INST_COMMIT_MEM             ,_param->_nb_context);
     378  DELETE1_SC_SIGNAL(out_NB_INST_DECOD_ALL              ,_param->_nb_context);
    367379  DELETE1_SC_SIGNAL(out_DEPTH_MIN                      ,_param->_nb_context);
    368380  DELETE1_SC_SIGNAL(out_DEPTH_MAX                      ,_param->_nb_context);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/include/Front_end.h

    r105 r108  
    9494  public    : SC_OUT(Tcontrol_t           ) ** out_DECOD_NO_EXECUTE                ;//[sum_inst_decod]
    9595  public    : SC_OUT(Tcontrol_t           ) ** out_DECOD_IS_DELAY_SLOT             ;//[sum_inst_decod]
     96#ifdef DEBUG
     97  public    : SC_OUT(Tgeneral_data_t      ) ** out_DECOD_ADDRESS                   ;//[sum_inst_decod]
     98#endif
    9699  public    : SC_OUT(Tgeneral_data_t      ) ** out_DECOD_ADDRESS_NEXT              ;//[sum_inst_decod]
    97100  public    : SC_OUT(Tcontrol_t           ) ** out_DECOD_HAS_IMMEDIAT              ;//[sum_inst_decod]
     
    152155  public    : SC_IN (Tcounter_t           ) **  in_NB_INST_COMMIT_ALL               ;//[nb_context]
    153156  public    : SC_IN (Tcounter_t           ) **  in_NB_INST_COMMIT_MEM               ;//[nb_context]
     157  public    : SC_OUT(Tcounter_t           ) ** out_NB_INST_DECOD_ALL                ;//[nb_context]
    154158                                                                                   
    155159    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_allocation.cpp

    r105 r108  
    9797      ALLOC1_SIGNAL_OUT (out_DECOD_NO_EXECUTE                 ,"NO_EXECUTE"       ,Tcontrol_t           ,1                                   );
    9898      ALLOC1_SIGNAL_OUT (out_DECOD_IS_DELAY_SLOT              ,"IS_DELAY_SLOT"    ,Tcontrol_t           ,1                                   );
     99#ifdef DEBUG
     100      ALLOC1_SIGNAL_OUT (out_DECOD_ADDRESS                    ,"ADDRESS"          ,Tgeneral_data_t      ,_param->_size_instruction_address   );
     101#endif
    99102      ALLOC1_SIGNAL_OUT (out_DECOD_ADDRESS_NEXT               ,"ADDRESS_NEXT"     ,Tgeneral_data_t      ,_param->_size_instruction_address   );
    100103      ALLOC1_SIGNAL_OUT (out_DECOD_HAS_IMMEDIAT               ,"HAS_IMMEDIAT"     ,Tcontrol_t           ,1                                   );
     
    175178      ALLOC1_SIGNAL_IN  ( in_NB_INST_COMMIT_ALL               ,"COMMIT_ALL"       ,Tcounter_t           ,_param->_size_nb_inst_commit);
    176179      ALLOC1_SIGNAL_IN  ( in_NB_INST_COMMIT_MEM               ,"COMMIT_MEM"       ,Tcounter_t           ,_param->_size_nb_inst_commit);
     180      ALLOC1_SIGNAL_OUT (out_NB_INST_DECOD_ALL                ,"DECOD_ALL"        ,Tcounter_t           ,_param->_size_nb_inst_decod );
    177181    }
    178182
     
    699703          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_IS_DELAY_SLOT",
    700704                              dest,"out_DECOD_"+toString(x)+"_IS_DELAY_SLOT");
     705#ifdef DEBUG
     706          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_ADDRESS"      ,
     707                              dest,"out_DECOD_"+toString(x)+"_ADDRESS"      );
     708#endif
    701709          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_ADDRESS_NEXT" ,
    702710                              dest,"out_DECOD_"+toString(x)+"_ADDRESS_NEXT" );
     
    809817          uint32_t y=(_param->_translate_context_id_from_decod_unit[i])[j];
    810818
    811           dest = _name+"_context_state";
     819          dest = _name+"_glue";
    812820#ifdef POSITION
    813821          _component->interface_map (src ,"nb_inst_"+toString(j),
     
    815823#endif
    816824
    817           COMPONENT_MAP(_component,src ,"out_NB_INST_"+toString(j)+"_DECOD_ALL",
    818                                    dest, "in_NB_INST_"+toString(y)+"_DECOD_ALL");
     825          COMPONENT_MAP(_component,src ,"out_NB_INST_"+toString(j)+           "_DECOD_ALL",
     826                                   dest, "in_NB_INST_"+toString(y)+"_DECOD_UNIT_DECOD_ALL");
    819827        }
    820828
     
    965973
    966974      // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    967       //   in_NB_INST_DECOD_ALL                  - component_decod_unit
    968 
    969975      for (uint32_t i=0; i<_param->_nb_context; ++i)
    970976        {
    971977          dest = _name;
    972978#ifdef POSITION
    973           _component->interface_map (src ,"nb_inst",
    974                                      dest,"nb_inst");
     979          _component->interface_map (src ,"nb_inst_"+toString(i),
     980                                     dest,"nb_inst_"+toString(i));
    975981#endif
    976982         
     
    979985          PORT_MAP(_component,src , "in_NB_INST_"+toString(i)+"_COMMIT_MEM",
    980986                              dest, "in_NB_INST_"+toString(i)+"_COMMIT_MEM");
     987
     988          dest = _name+"_glue";
     989#ifdef POSITION
     990          _component->interface_map (src ,"nb_inst_"+toString(i),
     991                                     dest,"nb_inst_"+toString(i));
     992#endif
     993         
     994          COMPONENT_MAP(_component,src , "in_NB_INST_"+toString(i)+              "_DECOD_ALL",
     995                                   dest,"out_NB_INST_"+toString(i)+"_CONTEXT_STATE_DECOD_ALL");
    981996      }
    982997
     
    12181233      //  out_CONTEXT_DECOD_UNIT_DEPTH_VAL                      - component_decod_unit
    12191234      //  out_CONTEXT_DECOD_UNIT_DEPTH                          - component_decod_unit
     1235
     1236      // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1237      for (uint32_t i=0; i<_param->_nb_context; ++i)
     1238        {
     1239          dest = _name;
     1240#ifdef POSITION
     1241          _component->interface_map (src ,"nb_inst_"+toString(i),
     1242                                     dest,"nb_inst_"+toString(i));
     1243#endif
     1244         
     1245          PORT_MAP(_component,src ,"out_NB_INST_"+toString(i)+"_DECOD_ALL",
     1246                              dest,"out_NB_INST_"+toString(i)+"_DECOD_ALL");
     1247
     1248      //   in_NB_INST_DECOD_UNIT_DECOD_ALL                      - component_decod_unit
     1249      //  out_NB_INST_CONTEXT_STATE_DECOD_ALL                   - component_context_state
     1250        }
    12201251    }
    12211252   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_deallocation.cpp

    r105 r108  
    4949        DELETE1_SIGNAL(out_DECOD_NO_EXECUTE                 ,_param->_sum_inst_decod,1                                   );
    5050        DELETE1_SIGNAL(out_DECOD_IS_DELAY_SLOT              ,_param->_sum_inst_decod,1                                   );
     51#ifdef DEBUG
     52        DELETE1_SIGNAL(out_DECOD_ADDRESS                    ,_param->_sum_inst_decod,_param->_size_instruction_address   );
     53#endif
    5154        DELETE1_SIGNAL(out_DECOD_ADDRESS_NEXT               ,_param->_sum_inst_decod,_param->_size_instruction_address   );
    5255        DELETE1_SIGNAL(out_DECOD_HAS_IMMEDIAT               ,_param->_sum_inst_decod,1                                   );
     
    102105        DELETE1_SIGNAL( in_NB_INST_COMMIT_ALL               ,_param->_nb_context,_param->_size_nb_inst_commit);
    103106        DELETE1_SIGNAL( in_NB_INST_COMMIT_MEM               ,_param->_nb_context,_param->_size_nb_inst_commit);
     107        DELETE1_SIGNAL(out_NB_INST_DECOD_ALL                ,_param->_nb_context,_param->_size_nb_inst_decod);
    104108
    105109        DELETE1_SIGNAL(out_DEPTH_MIN                        ,_param->_nb_context,_param->_size_depth  );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Parameters.cpp

    r106 r108  
    109109      _array_size_nb_inst_decod [i] = log2(_size_decod_queue[i]+1);
    110110
     111    uint32_t size_nb_inst_decod         = max<uint32_t>(_array_size_nb_inst_decod,_nb_decod_unit);
     112
    111113    _param_ifetch_unit = new behavioural::core::multi_front_end::front_end::ifetch_unit::Parameters * [_nb_context];
    112114    for (uint32_t i=0; i<_nb_context; ++i)
     
    236238       size_instruction_address              ,
    237239       _array_size_depth                     ,
    238        _upt_size_queue                        //_nb_branch_speculated
     240       _upt_size_queue                       ,//_nb_branch_speculated
     241       size_nb_inst_decod
    239242       );
    240243
     
    244247        _size_instruction_address   = size_instruction_address;
    245248        _size_general_data          = size_general_data;
    246         _size_nb_inst_decod         = max<uint32_t>(_array_size_nb_inst_decod,_nb_decod_unit);
     249        _size_nb_inst_decod         = size_nb_inst_decod;
    247250        _size_nb_inst_commit        = size_nb_inst_commit;
    248251        _size_depth                 = max<uint32_t>(_array_size_depth,_nb_context);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/config_min.cfg

    r88 r108  
    11111       1       +1      # nb_inst_branch_complete
    12120       0       +1      # nb_branch_speculated    [0][0] [nb_front_end][nb_context]
     131       1       +1      # size_nb_inst_decod
    131432      32      +1      # size_general_data       
    14151       1       +1      # size_store_queue_ptr   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/config_mono_rename_unit.cfg

    r88 r108  
    11111       1       +1      # nb_inst_branch_complete
    12120       0       +1      # nb_branch_speculated    [0][0] [nb_front_end][nb_context]
     131       1       +1      # size_nb_inst_decod
    131432      32      +1      # size_general_data       
    14151       1       +1      # size_store_queue_ptr   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/src/main.cpp

    r88 r108  
    88#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/include/test.h"
    99
    10 #define NB_PARAMS 15
     10#define NB_PARAMS 16
    1111
    1212void usage (int argc, char * argv[])
     
    2525  err (_(" * nb_inst_branch_complete                            (uint32_t         )\n"));
    2626  err (_(" * nb_branch_speculated    [nb_front_end][nb_context] (uint32_t         )\n"));
     27  err (_(" * size_nb_inst_decod                                 (uint32_t         )\n"));
    2728  err (_(" * size_general_data                                  (uint32_t         )\n"));
    2829  err (_(" * size_store_queue_ptr                               (uint32_t         )\n"));
     
    8889    }
    8990
     91  uint32_t          _size_nb_inst_decod      = fromString<uint32_t         >(argv[x++]);
    9092  uint32_t          _size_general_data       = fromString<uint32_t         >(argv[x++]);
    9193  uint32_t          _size_store_queue_ptr    = fromString<uint32_t         >(argv[x++]);
     
    112114         _nb_inst_branch_complete ,
    113115         _nb_branch_speculated    ,
     116         _size_nb_inst_decod      ,
    114117         _size_general_data       ,
    115118         _size_store_queue_ptr    ,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/src/test.cpp

    r105 r108  
    6868  ALLOC2_SC_SIGNAL( in_INSERT_NO_EXECUTE              ," in_INSERT_NO_EXECUTE              ",Tcontrol_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    6969  ALLOC2_SC_SIGNAL( in_INSERT_IS_DELAY_SLOT           ," in_INSERT_IS_DELAY_SLOT           ",Tcontrol_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     70#ifdef DEBUG
     71  ALLOC2_SC_SIGNAL( in_INSERT_ADDRESS                 ," in_INSERT_ADDRESS                 ",Taddress_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     72#endif
    7073  ALLOC2_SC_SIGNAL( in_INSERT_ADDRESS_NEXT            ," in_INSERT_ADDRESS_NEXT            ",Taddress_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    7174  ALLOC2_SC_SIGNAL( in_INSERT_EXCEPTION               ," in_INSERT_EXCEPTION               ",Texception_t      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    167170  ALLOC2_SC_SIGNAL(out_NB_INST_COMMIT_ALL             ,"out_NB_INST_COMMIT_ALL             ",Tcounter_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
    168171  ALLOC2_SC_SIGNAL(out_NB_INST_COMMIT_MEM             ,"out_NB_INST_COMMIT_MEM             ",Tcounter_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
     172  ALLOC2_SC_SIGNAL( in_NB_INST_DECOD_ALL              ," in_NB_INST_DECOD_ALL              ",Tcounter_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
    169173  ALLOC2_SC_SIGNAL( in_DEPTH_MIN                      ," in_DEPTH_MIN                      ",Tdepth_t          ,_param->_nb_front_end,_param->_nb_context[it1]);
    170174  ALLOC2_SC_SIGNAL( in_DEPTH_MAX                      ," in_DEPTH_MAX                      ",Tdepth_t          ,_param->_nb_front_end,_param->_nb_context[it1]);
     
    206210  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_IS_DELAY_SLOT           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    207211  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_NO_EXECUTE              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     212#ifdef DEBUG
     213  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_ADDRESS                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     214#endif
    208215  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_ADDRESS_NEXT            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    209216  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_EXCEPTION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    317324  INSTANCE2_SC_SIGNAL(_Commit_unit,out_NB_INST_COMMIT_ALL             ,_param->_nb_front_end,_param->_nb_context[it1]);
    318325  INSTANCE2_SC_SIGNAL(_Commit_unit,out_NB_INST_COMMIT_MEM             ,_param->_nb_front_end,_param->_nb_context[it1]);
     326  INSTANCE2_SC_SIGNAL(_Commit_unit, in_NB_INST_DECOD_ALL              ,_param->_nb_front_end,_param->_nb_context[it1]);
    319327 
    320328  if (_param->_have_port_depth)
     
    617625  DELETE2_SC_SIGNAL( in_INSERT_NO_EXECUTE              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    618626  DELETE2_SC_SIGNAL( in_INSERT_IS_DELAY_SLOT           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     627#ifdef DEBUG
     628  DELETE2_SC_SIGNAL( in_INSERT_ADDRESS                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     629#endif
    619630  DELETE2_SC_SIGNAL( in_INSERT_ADDRESS_NEXT            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    620631  DELETE2_SC_SIGNAL( in_INSERT_EXCEPTION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    714725  DELETE2_SC_SIGNAL(out_NB_INST_COMMIT_ALL             ,_param->_nb_front_end,_param->_nb_context[it1]);
    715726  DELETE2_SC_SIGNAL(out_NB_INST_COMMIT_MEM             ,_param->_nb_front_end,_param->_nb_context[it1]);
     727  DELETE2_SC_SIGNAL( in_NB_INST_DECOD_ALL              ,_param->_nb_front_end,_param->_nb_context[it1]);
    716728  DELETE2_SC_SIGNAL( in_DEPTH_MIN                      ,_param->_nb_front_end,_param->_nb_context[it1]);
    717729  DELETE2_SC_SIGNAL( in_DEPTH_MAX                      ,_param->_nb_front_end,_param->_nb_context[it1]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h

    r105 r108  
    8383  public    : SC_IN (Tcontrol_t         ) ***  in_INSERT_NO_EXECUTE                ;//[nb_rename_unit][nb_inst_insert]
    8484  public    : SC_IN (Tcontrol_t         ) ***  in_INSERT_IS_DELAY_SLOT             ;//[nb_rename_unit][nb_inst_insert]
     85#ifdef DEBUG
     86  public    : SC_IN (Taddress_t         ) ***  in_INSERT_ADDRESS                   ;//[nb_rename_unit][nb_inst_insert]
     87#endif
    8588  public    : SC_IN (Taddress_t         ) ***  in_INSERT_ADDRESS_NEXT              ;//[nb_rename_unit][nb_inst_insert]
    8689  public    : SC_IN (Texception_t       ) ***  in_INSERT_EXCEPTION                 ;//[nb_rename_unit][nb_inst_insert]
     
    195198  public    : SC_OUT(Tcounter_t         ) *** out_NB_INST_COMMIT_ALL               ;//[nb_front_end][nb_context]
    196199  public    : SC_OUT(Tcounter_t         ) *** out_NB_INST_COMMIT_MEM               ;//[nb_front_end][nb_context]
     200  public    : SC_IN (Tcounter_t         ) ***  in_NB_INST_DECOD_ALL                ;//[nb_front_end][nb_context]
    197201                                                                                   
    198202    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Parameters.h

    r88 r108  
    8181                        uint32_t            nb_inst_branch_complete ,
    8282                        uint32_t         ** nb_branch_speculated    ,
     83                        uint32_t            size_nb_inst_decod      ,
    8384                        uint32_t            size_general_data       ,
    8485                        uint32_t            size_store_queue_ptr    ,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h

    r105 r108  
    9090  public  : Tspecial_data_t    flags                   ;
    9191  public  : Tcontrol_t         no_sequence             ;
     92  public  : Tcontrol_t         speculative             ;
    9293//public  : Tgeneral_data_t    data_commit             ; // branch's destination
     94#ifdef DEBUG
     95  public  : Taddress_t         address                 ;
     96#endif
    9397  public  : Taddress_t         address_next            ;
    9498
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp

    r105 r108  
    7171      _ALLOC2_SIGNAL_IN ( in_INSERT_NO_EXECUTE              ,"no_execute"           ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    7272      _ALLOC2_SIGNAL_IN ( in_INSERT_IS_DELAY_SLOT           ,"is_delay_slot"        ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     73#ifdef DEBUG
     74      _ALLOC2_SIGNAL_IN ( in_INSERT_ADDRESS                 ,"address"              ,Taddress_t        ,_param->_size_instruction_address   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     75#endif
    7376      _ALLOC2_SIGNAL_IN ( in_INSERT_ADDRESS_NEXT            ,"address_next"         ,Taddress_t        ,_param->_size_instruction_address   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
    7477      _ALLOC2_SIGNAL_IN ( in_INSERT_EXCEPTION               ,"exception"            ,Texception_t      ,_param->_size_exception             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
     
    216219      _ALLOC2_SIGNAL_OUT(out_NB_INST_COMMIT_ALL             ,"commit_all",Tcounter_t         ,_param->_size_nb_inst_commit,_param->_nb_front_end, _param->_nb_context[it1]);
    217220      _ALLOC2_SIGNAL_OUT(out_NB_INST_COMMIT_MEM             ,"commit_mem",Tcounter_t         ,_param->_size_nb_inst_commit,_param->_nb_front_end, _param->_nb_context[it1]);
     221      _ALLOC2_SIGNAL_IN ( in_NB_INST_DECOD_ALL              ,"decod_all" ,Tcounter_t         ,_param->_size_nb_inst_decod ,_param->_nb_front_end, _param->_nb_context[it1]);
    218222    }
    219223
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp

    r105 r108  
    3939        DELETE2_SIGNAL( in_INSERT_NO_EXECUTE              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
    4040        DELETE2_SIGNAL( in_INSERT_IS_DELAY_SLOT           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
     41#ifdef DEBUG
     42        DELETE2_SIGNAL( in_INSERT_ADDRESS                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_instruction_address               );
     43#endif
    4144        DELETE2_SIGNAL( in_INSERT_ADDRESS_NEXT            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_instruction_address               );
    4245        DELETE2_SIGNAL( in_INSERT_EXCEPTION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_exception             );
     
    143146        DELETE2_SIGNAL(out_NB_INST_COMMIT_ALL             ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_nb_inst_commit);
    144147        DELETE2_SIGNAL(out_NB_INST_COMMIT_MEM             ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_nb_inst_commit);
     148        DELETE2_SIGNAL( in_NB_INST_DECOD_ALL              ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_nb_inst_decod);
    145149
    146150        DELETE2_SIGNAL( in_DEPTH_MIN                      ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp

    r106 r108  
    7777              case EVENT_STATE_WAITEND  :
    7878                {
    79                   if (reg_NB_INST_COMMIT_ALL [i][j] == 0)
     79                  Tcounter_t nb_inst_all = PORT_READ(in_NB_INST_DECOD_ALL [i][j]) + reg_NB_INST_COMMIT_ALL [i][j];
     80                  if (nb_inst_all == 0)
    8081                    {
    8182                      reg_EVENT_STATE [i][j] = EVENT_STATE_END;
     
    163164                  entry->num_reg_re_phy_new      = PORT_READ(in_INSERT_NUM_REG_RE_PHY_NEW    [x][y]);
    164165                  entry->no_sequence             = type == TYPE_BRANCH;
     166                  entry->speculative             = true;
     167#ifdef DEBUG
     168                  entry->address                 = PORT_READ(in_INSERT_ADDRESS               [x][y]);
     169#endif
    165170                  entry->address_next            = PORT_READ(in_INSERT_ADDRESS_NEXT          [x][y]);
    166171
     
    173178                  //                       other -> wait end of instruction
    174179                  //            * OTHER
    175                   if (exception == EXCEPTION_NONE)
    176                     {
    177                       Tcontrol_t no_execute = PORT_READ(in_INSERT_NO_EXECUTE [x][y]);
    178                       // no_execute : l.j, l.nop, l.rfe
    179 
    180                       log_printf(TRACE,Commit_unit,FUNCTION,"    * no_execute     : %d",no_execute);
    181 
    182                       switch (type)
    183                         {
    184                         case TYPE_BRANCH : {entry->state=(no_execute==1)?ROB_BRANCH_COMPLETE:ROB_BRANCH_WAIT_END; break;}
    185                         case TYPE_MEMORY : {entry->state=(is_store  ==1)?ROB_STORE_WAIT_HEAD_OK:ROB_OTHER_WAIT_END; break;}
    186                         default          : {entry->state=(no_execute==1)?ROB_END_OK_SPECULATIVE:ROB_OTHER_WAIT_END; break;}
    187                         }
    188                     }
    189                   else
    190                     {
    191                       // Have an exception : wait head of ROB
    192 
    193                       // in_INSERT_NO_EXECUTE [x][y] : l.sys, l.trap
    194 
    195                       entry->state = ROB_END_EXCEPTION_WAIT_HEAD;
    196                     }
     180
     181//                   bool       flush      = reg_EVENT_FLUSH [front_end_id][context_id];
     182
     183//                   log_printf(TRACE,Commit_unit,FUNCTION,"    * flush          : %d",flush);
     184
     185//                   if (flush)
     186//                     {
     187//                       entry->state    = ROB_END_MISS; // All type (branch, memory and others), because, is not execute
     188//                     }
     189//                   else
     190                    {
     191                      if (exception == EXCEPTION_NONE)
     192                        {
     193                          Tcontrol_t no_execute = PORT_READ(in_INSERT_NO_EXECUTE [x][y]);
     194                          // no_execute : l.j, l.nop, l.rfe
     195                         
     196                          log_printf(TRACE,Commit_unit,FUNCTION,"    * no_execute     : %d",no_execute);
     197                         
     198                          switch (type)
     199                            {
     200                            case TYPE_BRANCH : {entry->state=(no_execute==1)?ROB_BRANCH_COMPLETE:ROB_BRANCH_WAIT_END  ; break;}
     201                            case TYPE_MEMORY : {entry->state=(is_store  ==1)?ROB_STORE_WAIT_HEAD_OK:ROB_OTHER_WAIT_END; break;}
     202                            default          : {entry->state=(no_execute==1)?ROB_END_OK_SPECULATIVE:ROB_OTHER_WAIT_END; break;}
     203                            }
     204                        }
     205                      else
     206                        {
     207                          // Have an exception : wait head of ROB
     208                         
     209                          // in_INSERT_NO_EXECUTE [x][y] : l.sys, l.trap
     210                         
     211                          entry->state = ROB_END_EXCEPTION_WAIT_HEAD;
     212                        }
     213                    }
    197214
    198215                  // Push in rob
     
    351368              Ttype_t    type         = entry->type        ;
    352369
    353               if ((state == ROB_END_OK         ) or // LOAD_MISS
     370              if ((state == ROB_END_OK         ) or
    354371//                (state == ROB_END_KO         ) or
    355                   (state == ROB_END_BRANCH_MISS)// or
    356 //                (state == ROB_END_LOAD_MISS  ) or
     372                  (state == ROB_END_BRANCH_MISS) or
     373                  (state == ROB_END_LOAD_MISS  )// or
    357374//                (state == ROB_END_MISS       ) or
    358375//                (state == ROB_END_EXCEPTION  )
     
    468485        // =====[ EVENT ]=====================================================
    469486        // ===================================================================
    470         {
    471           // Not yet implemented
    472         }
     487//         for (uint32_t i=0; i < _param->_nb_front_end; ++i)
     488//           for (uint32_t j=0; j < _param->_nb_context[i]; ++j)
     489//             if (PORT_READ(in_EVENT_VAL [i][j]) and internal_EVENT_ACK [i][j])
     490//               {
     491//                 log_printf(TRACE,Commit_unit,FUNCTION,"  * EVENT [%d][%d]",i,j);
     492
     493//                 reg_PC_CURRENT            [i][j] = PORT_READ(in_EVENT_ADDRESS      [i][j]);
     494//                 reg_PC_CURRENT_IS_DS      [i][j] = PORT_READ(in_EVENT_IS_DS_TAKE   [i][j]); // ??
     495//                 reg_PC_CURRENT_IS_DS_TAKE [i][j] = PORT_READ(in_EVENT_IS_DS_TAKE   [i][j]);
     496//                 reg_PC_NEXT               [i][j] = PORT_READ(in_EVENT_ADDRESS_NEXT [i][j]);
     497//                 // PORT_READ(in_EVENT_ADDRESS_NEXT_VAL [i][j]);
     498//               }
    473499
    474500        // ===================================================================
     
    505531             
    506532              bool         flush         = reg_EVENT_FLUSH [front_end_id][context_id];
    507 
    508               Tcontrol_t   is_valid      = (((depth == depth_min) or
    509                                              depth_full or
    510                                              ((depth_min <= depth_max)?
    511                                               ((depth >= depth_min) and (depth <=depth_max)):
    512                                               ((depth >= depth_min) or  (depth <=depth_max))))
     533              bool         speculative   = entry->speculative and not (depth == depth_min);
     534              Tcontrol_t   is_valid      = ((not speculative or
     535                                             (speculative and (depth_full or // all is valid
     536                                                               ((depth_min <= depth_max)? // test if depth is overflow
     537                                                                ((depth >= depth_min) and (depth <=depth_max)):
     538                                                                ((depth >= depth_min) or  (depth <=depth_max))))))
    513539                                             and not flush);
    514540
     
    532558                    case ROB_BRANCH_WAIT_END             : {state = ROB_MISS_WAIT_END; break;}
    533559                    case ROB_BRANCH_COMPLETE             : {state = ROB_END_MISS     ; break;}
     560                    case ROB_END_BRANCH_MISS             :
    534561                    case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_MISS     ; break;}
     562                    case ROB_END_LOAD_MISS_UPDATE        :
     563                    case ROB_END_LOAD_MISS               :
    535564                    case ROB_END_LOAD_MISS_SPECULATIVE   : {state = ROB_END_MISS     ; break;}
    536565                    case ROB_STORE_WAIT_HEAD_OK          : {state = ROB_STORE_HEAD_KO; break;}
    537566                  //case ROB_STORE_WAIT_HEAD_KO          : {state = ; break;}
    538567                    case ROB_OTHER_WAIT_END              : {state = ROB_MISS_WAIT_END; break;}
     568                    case ROB_END_OK                      :
    539569                    case ROB_END_OK_SPECULATIVE          : {state = ROB_END_MISS     ; break;}
     570                    case ROB_END_KO                      :
    540571                    case ROB_END_KO_SPECULATIVE          : {state = ROB_END_MISS     ; break;}
     572                    case ROB_END_EXCEPTION_UPDATE        :
     573                    case ROB_END_EXCEPTION               :
    541574                    case ROB_END_EXCEPTION_WAIT_HEAD     : {state = ROB_END_MISS     ; break;}
    542575                                                         
     
    548581                      // can't have miss speculation     
    549582                    case ROB_STORE_HEAD_OK               :
    550                     case ROB_END_OK                      :
    551                     case ROB_END_KO                      :
    552                     case ROB_END_BRANCH_MISS             :
    553                     case ROB_END_LOAD_MISS_UPDATE        :
    554                     case ROB_END_LOAD_MISS               :
    555                     case ROB_END_EXCEPTION_UPDATE        :
    556                     case ROB_END_EXCEPTION               :
    557583                    default                              :
    558584                      {
    559                         throw ERRORMORPHEO(FUNCTION,_("Miss Speculation : Invalide state.\n"));
     585                        throw ERRORMORPHEO(FUNCTION,toString(_("Miss Speculation : Invalide state : %s.\n"),toString(state).c_str()));
    560586                        break;
    561587                      }
     
    566592              // test if instruction is not speculative
    567593              //------------------------------------------------------
    568               if (entry->depth == depth_min)
     594              entry->speculative = speculative;
     595//            if (entry->depth == depth_min)
     596              if (not speculative)
    569597                {
    570598                  switch (state)
     
    574602                    case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_BRANCH_MISS        ; break;}
    575603                    case ROB_END_LOAD_MISS_SPECULATIVE   : {state = ROB_END_LOAD_MISS_UPDATE   ; break;}
    576                     default : {break;}
     604                    default : {break;} // else, no change
    577605                  }
    578606                }
     
    587615                    case ROB_STORE_WAIT_HEAD_OK      : {state = ROB_STORE_HEAD_OK;        break;}
    588616                    case ROB_END_EXCEPTION_WAIT_HEAD : {state = ROB_END_EXCEPTION_UPDATE; break;}
    589                     default : {break;}
     617                    default : {break;} // else, no change
    590618                    }
    591619                }
     
    599627    // ===================================================================
    600628
    601     log_printf(TRACE,Commit_unit,FUNCTION,"  * Dump ROB (Re-Order-Buffer)");
    602     log_printf(TRACE,Commit_unit,FUNCTION,"    * num_bank_head : %d",reg_NUM_BANK_HEAD);
    603     log_printf(TRACE,Commit_unit,FUNCTION,"    * num_bank_tail : %d",reg_NUM_BANK_TAIL);
    604 
    605     for (uint32_t i=0; i<_param->_nb_front_end; i++)
    606       for (uint32_t j=0; j<_param->_nb_context [i]; j++)
     629#ifdef STATISTICS
     630    for (uint32_t i=0; i<_param->_nb_bank; i++)
     631      if (usage_is_set(_usage,USE_STATISTICS))
     632        *(_stat_bank_nb_inst [i]) += _rob[i].size();
     633#endif
     634
     635#if (DEBUG >= DEBUG_TRACE) and (DEBUG_Commit_unit == true)
     636    {
     637      log_printf(TRACE,Commit_unit,FUNCTION,"  * Dump ROB (Re-Order-Buffer)");
     638      log_printf(TRACE,Commit_unit,FUNCTION,"    * num_bank_head : %d",reg_NUM_BANK_HEAD);
     639      log_printf(TRACE,Commit_unit,FUNCTION,"    * num_bank_tail : %d",reg_NUM_BANK_TAIL);
     640     
     641      for (uint32_t i=0; i<_param->_nb_front_end; i++)
     642        for (uint32_t j=0; j<_param->_nb_context [i]; j++)
     643          {
     644            log_printf(TRACE,Commit_unit,FUNCTION,"    * [%d][%d]",i,j);
     645            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_STATE  : %s",toString(reg_EVENT_STATE [i][j]).c_str());
     646            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_FLUSH  : %d",reg_EVENT_FLUSH [i][j]);
     647            log_printf(TRACE,Commit_unit,FUNCTION,"      * NB_INST_ALL  : %d",reg_NB_INST_COMMIT_ALL[i][j]);
     648            log_printf(TRACE,Commit_unit,FUNCTION,"      * NB_INST_MEM  : %d",reg_NB_INST_COMMIT_MEM[i][j]);
     649            log_printf(TRACE,Commit_unit,FUNCTION,"      * PC_CURRENT   : %.8x (%.8x) - %d %d",reg_PC_CURRENT [i][j],reg_PC_CURRENT [i][j]<<2, reg_PC_CURRENT_IS_DS [i][j], reg_PC_CURRENT_IS_DS_TAKE [i][j]);
     650            log_printf(TRACE,Commit_unit,FUNCTION,"      * PC_NEXT      : %.8x (%.8x)",reg_PC_NEXT [i][j],reg_PC_NEXT [i][j]<<2);
     651          }
     652
     653      for (uint32_t i=0; i<_param->_nb_bank; i++)
    607654        {
    608           log_printf(TRACE,Commit_unit,FUNCTION,"    * [%d][%d] state        : %s",i,j,toString(reg_EVENT_STATE [i][j]).c_str());
    609           log_printf(TRACE,Commit_unit,FUNCTION,"    * num_inst_all : %d",reg_NB_INST_COMMIT_ALL[i][j]);
    610           log_printf(TRACE,Commit_unit,FUNCTION,"    * num_inst_mem : %d",reg_NB_INST_COMMIT_MEM[i][j]);
    611           log_printf(TRACE,Commit_unit,FUNCTION,"    * PC_CURRENT   : %.8x (%.8x) - %d %d",reg_PC_CURRENT [i][j],reg_PC_CURRENT [i][j]<<2, reg_PC_CURRENT_IS_DS [i][j], reg_PC_CURRENT_IS_DS_TAKE [i][j]);
    612           log_printf(TRACE,Commit_unit,FUNCTION,"    * PC_NEXT      : %.8x (%.8x)",reg_PC_NEXT [i][j],reg_PC_NEXT [i][j]<<2);
     655          uint32_t num_bank = (reg_NUM_BANK_HEAD+i)%_param->_nb_bank;
     656
     657          log_printf(TRACE,Commit_unit,FUNCTION,"      * Bank [%d] size : %d, ptr : %d",num_bank,(int)_rob[num_bank].size(), reg_BANK_PTR [i]);
     658         
     659          uint32_t x=0;
     660          for (std::list<entry_t*>::iterator it=_rob[num_bank].begin();
     661               it!=_rob[num_bank].end();
     662               it++)
     663            {
     664              log_printf(TRACE,Commit_unit,FUNCTION,"        [%.4d] %.4d %.4d %.4d %.4d, %.3d %.3d, %.1d, %.1d %.4d, %.1d %.4d, %s - %d",
     665                         x,
     666                         (*it)->front_end_id            ,
     667                         (*it)->context_id              ,
     668                         (*it)->rename_unit_id          ,
     669                         (*it)->depth                   ,
     670                         (*it)->type                    ,
     671                         (*it)->operation               ,
     672                         (*it)->is_delay_slot           ,
     673                         (*it)->use_store_queue         ,
     674                         (*it)->store_queue_ptr_write   ,
     675                         (*it)->use_load_queue          ,
     676                         (*it)->load_queue_ptr_write    ,
     677                         toString((*it)->state).c_str() ,
     678                         (*it)->ptr                     );
     679              log_printf(TRACE,Commit_unit,FUNCTION,"               %.1d %.2d %.6d, %.1d %.2d %.6d, %.1d %.1d %.6d, %.1d %.2d %.6d %.6d, %.1d %.1d %.6d %.6d ",
     680                         (*it)->read_ra                 ,
     681                         (*it)->num_reg_ra_log          ,
     682                         (*it)->num_reg_ra_phy          ,
     683                         (*it)->read_rb                 ,
     684                         (*it)->num_reg_rb_log          ,
     685                         (*it)->num_reg_rb_phy          ,
     686                         (*it)->read_rc                 ,
     687                         (*it)->num_reg_rc_log          ,
     688                         (*it)->num_reg_rc_phy          ,
     689                         (*it)->write_rd                ,
     690                         (*it)->num_reg_rd_log          ,
     691                         (*it)->num_reg_rd_phy_old      ,
     692                         (*it)->num_reg_rd_phy_new      ,
     693                         (*it)->write_re                ,
     694                         (*it)->num_reg_re_log          ,
     695                         (*it)->num_reg_re_phy_old      ,
     696                         (*it)->num_reg_re_phy_new      );
     697             
     698              log_printf(TRACE,Commit_unit,FUNCTION,"               %.2d %.2d %.1d %.1d %.1d - %.8x (%.8x) %.8x (%.8x)",
     699                         (*it)->exception_use ,
     700                         (*it)->exception     ,
     701                         (*it)->flags         ,
     702                         (*it)->no_sequence   ,
     703                         (*it)->speculative   ,
     704                         (*it)->address       ,
     705                         (*it)->address<<2    ,
     706                         (*it)->address_next  ,
     707                         (*it)->address_next<<2
     708                         );
     709             
     710              x++;
     711            }
    613712        }
    614        
    615     for (uint32_t i=0; i<_param->_nb_bank; i++)
    616       {
    617         log_printf(TRACE,Commit_unit,FUNCTION,"    * Bank [%d] size : %d, ptr : %d",i,(int)_rob[i].size(), reg_BANK_PTR [i]);
    618 
    619 #ifdef STATISTICS
    620         if (usage_is_set(_usage,USE_STATISTICS))
    621           *(_stat_bank_nb_inst [i]) += _rob[i].size();
    622 #endif
    623 
    624         uint32_t x=0;
    625         for (std::list<entry_t*>::iterator it=_rob[i].begin();
    626              it!=_rob[i].end();
    627              it++)
    628           {
    629             log_printf(TRACE,Commit_unit,FUNCTION,"      [%.4d] %.4d %.4d %.4d %.4d, %.3d %.3d, %.1d, %.1d %.4d, %.1d %.4d, %s - %d",
    630                        x,
    631                        (*it)->front_end_id            ,
    632                        (*it)->context_id              ,
    633                        (*it)->rename_unit_id          ,
    634                        (*it)->depth                   ,
    635                        (*it)->type                    ,
    636                        (*it)->operation               ,
    637 //                     (*it)->address                 ,
    638 //                     (*it)->address << 2            ,
    639                        (*it)->is_delay_slot           ,
    640                        (*it)->use_store_queue         ,
    641                        (*it)->store_queue_ptr_write   ,
    642                        (*it)->use_load_queue          ,
    643                        (*it)->load_queue_ptr_write    ,
    644                        toString((*it)->state).c_str() ,
    645                        (*it)->ptr                     );
    646             log_printf(TRACE,Commit_unit,FUNCTION,"             %.1d %.2d %.6d, %.1d %.2d %.6d, %.1d %.1d %.6d, %.1d %.2d %.6d %.6d, %.1d %.1d %.6d %.6d ",
    647                        (*it)->read_ra                 ,
    648                        (*it)->num_reg_ra_log          ,
    649                        (*it)->num_reg_ra_phy          ,
    650                        (*it)->read_rb                 ,
    651                        (*it)->num_reg_rb_log          ,
    652                        (*it)->num_reg_rb_phy          ,
    653                        (*it)->read_rc                 ,
    654                        (*it)->num_reg_rc_log          ,
    655                        (*it)->num_reg_rc_phy          ,
    656                        (*it)->write_rd                ,
    657                        (*it)->num_reg_rd_log          ,
    658                        (*it)->num_reg_rd_phy_old      ,
    659                        (*it)->num_reg_rd_phy_new      ,
    660                        (*it)->write_re                ,
    661                        (*it)->num_reg_re_log          ,
    662                        (*it)->num_reg_re_phy_old      ,
    663                        (*it)->num_reg_re_phy_new      );
    664            
    665             log_printf(TRACE,Commit_unit,FUNCTION,"             %.2d %.2d %.1d %.1d %.8x (%.8x)",
    666                        (*it)->exception_use ,
    667                        (*it)->exception     ,
    668                        (*it)->flags         ,
    669                        (*it)->no_sequence   ,
    670                        (*it)->address_next  ,
    671                        (*it)->address_next<<2
    672                        );
    673 
    674             x++;
    675           }
    676       }
     713    }
     714#endif
     715
     716#ifdef DEBUG_TEST
     717    {
     718      uint32_t x=reg_NUM_BANK_HEAD;
     719      if (not _rob[x].empty())
     720        {
     721          entry_t * entry = _rob [x].front();
     722
     723          if (false
     724//            or (entry->state == ROB_EMPTY                      )
     725//            or (entry->state == ROB_BRANCH_WAIT_END            )
     726//            or (entry->state == ROB_BRANCH_COMPLETE            )
     727//            or (entry->state == ROB_STORE_WAIT_HEAD_OK         )
     728//          //or (entry->state == ROB_STORE_WAIT_HEAD_KO         )
     729//            or (entry->state == ROB_STORE_HEAD_OK              )
     730//            or (entry->state == ROB_STORE_HEAD_KO              )
     731//            or (entry->state == ROB_OTHER_WAIT_END             )
     732//            or (entry->state == ROB_MISS_WAIT_END              )
     733//            or (entry->state == ROB_END_OK_SPECULATIVE         )
     734              or (entry->state == ROB_END_OK                     )
     735//            or (entry->state == ROB_END_KO_SPECULATIVE         )
     736//            or (entry->state == ROB_END_KO                     )
     737//            or (entry->state == ROB_END_BRANCH_MISS_SPECULATIVE)
     738              or (entry->state == ROB_END_BRANCH_MISS            )
     739//            or (entry->state == ROB_END_LOAD_MISS_SPECULATIVE  )
     740//            or (entry->state == ROB_END_LOAD_MISS_UPDATE       )
     741              or (entry->state == ROB_END_LOAD_MISS              )
     742//            or (entry->state == ROB_END_MISS                   )
     743//            or (entry->state == ROB_END_EXCEPTION_WAIT_HEAD    )
     744//            or (entry->state == ROB_END_EXCEPTION_UPDATE       )
     745//            or (entry->state == ROB_END_EXCEPTION              )
     746              )
     747          if (entry->address != reg_PC_CURRENT[entry->front_end_id][entry->context_id])
     748            throw ERRORMORPHEO(FUNCTION,toString(_("Rob top address (%x) is different of reg_PC_CURRENT[%d][%d] (%x).\n"),
     749                                                 entry->address,
     750                                                 entry->front_end_id,
     751                                                 entry->context_id,
     752                                                 reg_PC_CURRENT[entry->front_end_id][entry->context_id]));
     753        }
     754    }
     755#endif
    677756
    678757#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Parameters.cpp

    r88 r108  
    3131                          uint32_t            nb_inst_branch_complete ,
    3232                          uint32_t         ** nb_branch_speculated    ,
     33                          uint32_t            size_nb_inst_decod      ,
    3334                          uint32_t            size_general_data       ,
    3435                          uint32_t            size_store_queue_ptr    ,
     
    9394        _size_depth               = max<uint32_t>(_array_size_depth,_nb_front_end,_nb_context);
    9495        _size_nb_inst_commit      = log2(_size_queue)+1;
     96        _size_nb_inst_decod       = size_nb_inst_decod;
    9597       
    9698        _have_port_front_end_id   = _size_front_end_id   > 0;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Parameters_msg_error.cpp

    r97 r108  
    2727
    2828    if (not is_multiple(_size_queue, _nb_bank))
    29       test.error(toString(_("nb_bank must be a multiple of size_queue.\n")));
     29      test.error(toString(_("nb_bank (%d) must be a multiple of size_queue (%d).\n"),_nb_bank,_size_queue));
    3030   
    3131    if (not is_multiple(_nb_bank, _nb_inst_issue))
    32       test.error(toString(_("nb_inst_issue must be a multiple of nb_bank.\n")));
     32      test.error(toString(_("nb_inst_issue (%d) must be a multiple of nb_bank (%d) .\n"),_nb_inst_issue,_nb_bank));
    3333
    3434    if (_nb_rename_unit_select > _nb_rename_unit)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Free_List_unit.h

    r82 r108  
    8989
    9090    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    91   private   : uint32_t                        internal_BANK_PRIORITY;
     91  private   : uint32_t                        reg_BANK_PRIORITY;
    9292
    9393  private   : Tcontrol_t                    * internal_POP_ACK      ; //[nb_pop]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_genMealy_pop.cpp

    r88 r108  
    2828    for (uint32_t i=0; i<_param->_nb_pop; i++)
    2929      {
    30         uint32_t offset = i*_param->_nb_bank_by_pop;
     30        log_printf(TRACE,Free_List_unit,FUNCTION,"  * POP [%d]",i);
     31
     32        uint32_t offset = i*_param->_nb_bank_by_pop;
    3133
    3234        // GPR
    3335        bool gpr_ack = not PORT_READ(in_POP_GPR_VAL[i]);
    3436
     37        log_printf(TRACE,Free_List_unit,FUNCTION,"    * GPR_VAL : %d",PORT_READ(in_POP_GPR_VAL[i]));
     38
    3539        if (not gpr_ack)
    3640          for (uint32_t j=0; j<_param->_nb_bank_by_pop; j++)
    3741            {
    38               uint32_t bank = offset+((j+internal_BANK_PRIORITY)%_param->_nb_bank_by_pop);
     42              uint32_t bank = offset+((j+reg_BANK_PRIORITY)%_param->_nb_bank_by_pop
     43                                      );
     44
     45              log_printf(TRACE,Free_List_unit,FUNCTION,"    * bank    : %d",bank);
    3946             
    4047              if (not _gpr_list[bank].empty())
    4148                {
    4249                  // find
     50                  log_printf(TRACE,Free_List_unit,FUNCTION,"    * find    : %d",_gpr_list[bank].front());
     51
    4352                  gpr_ack = true;
    4453                  internal_POP_GPR_BANK [i] = bank;
    4554                  PORT_WRITE(out_POP_GPR_NUM_REG [i],
    46                              //(bank << _param->_shift) |
     55                             //(bank << _param->_shift) | // only in VHDL
    4756                             _gpr_list[bank].front());
    4857                 
     
    5463        bool spr_ack = not PORT_READ(in_POP_SPR_VAL[i]);
    5564
     65        log_printf(TRACE,Free_List_unit,FUNCTION,"    * SPR_VAL : %d",PORT_READ(in_POP_SPR_VAL[i]));
     66
    5667        if (not spr_ack)
    5768          for (uint32_t j=0; j<_param->_nb_bank_by_pop; j++)
    5869            {
    59               uint32_t bank = offset+((j+internal_BANK_PRIORITY)%_param->_nb_bank_by_pop);
     70              uint32_t bank = offset+((j+reg_BANK_PRIORITY)%_param->_nb_bank_by_pop
     71                                      );
     72
     73              log_printf(TRACE,Free_List_unit,FUNCTION,"    * bank    : %d",bank);
    6074             
    6175              if (not _spr_list[bank].empty())
    6276                {
    6377                  // find
     78                  log_printf(TRACE,Free_List_unit,FUNCTION,"    * find    : %d",_spr_list[bank].front());
     79
    6480                  spr_ack = true;
    6581                  internal_POP_SPR_BANK [i] = bank;
    6682                  PORT_WRITE(out_POP_SPR_NUM_REG [i],
    67                              //(bank << _param->_shift) |
     83                             //(bank << _param->_shift) | // only in VHDL
    6884                             _spr_list[bank].front());
    6985                 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_genMealy_push_gpr.cpp

    r88 r108  
    2626    log_function(Free_List_unit,FUNCTION,_name.c_str());
    2727
     28    // bank conflit
    2829    bool bank_use [_param->_nb_bank];
    2930    for (uint32_t i=0; i<_param->_nb_bank; i++)
     
    3233    for (uint32_t i=0; i<_param->_nb_push; i++)
    3334      {
     35        log_printf(TRACE,Free_List_unit,FUNCTION,"  * PUSH [%d]",i);
     36
    3437        bool gpr_ack = not PORT_READ(in_PUSH_GPR_VAL[i]);
     38       
     39        log_printf(TRACE,Free_List_unit,FUNCTION,"    * GPR_VAL : %d",PORT_READ(in_PUSH_GPR_VAL[i]));
    3540
    3641        if (not gpr_ack)
    3742          {
    38             // num_bank : MSB
    39             uint32_t bank = PORT_READ(in_PUSH_GPR_NUM_REG[i]) >> _param->_bank_gpr_size_slot;
     43//          // num_bank : MSB
     44//          uint32_t bank = PORT_READ(in_PUSH_GPR_NUM_REG[i]) >> _param->_bank_gpr_size_slot;
     45            // num_bank : LSB
     46            uint32_t bank = PORT_READ(in_PUSH_GPR_NUM_REG[i]) & _param->_mask_gpr;
    4047           
    4148            if (not bank_use [bank])
    4249              {
     50                log_printf(TRACE,Free_List_unit,FUNCTION,"    * find ");
     51                log_printf(TRACE,Free_List_unit,FUNCTION,"    * bank    : %d",bank);
     52
    4353                // find
    4454                gpr_ack = true;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_genMealy_push_spr.cpp

    r88 r108  
    3636        if (not spr_ack)
    3737          {
    38             // num_bank : MSB
    39             uint32_t bank = PORT_READ(in_PUSH_SPR_NUM_REG[i]) >> _param->_bank_spr_size_slot;
     38//          // num_bank : MSB
     39//          uint32_t bank = PORT_READ(in_PUSH_SPR_NUM_REG[i]) >> _param->_bank_spr_size_slot;
     40            // num_bank : LSB
     41            uint32_t bank = PORT_READ(in_PUSH_SPR_NUM_REG[i]) & _param->_mask_spr;
    4042           
    4143            if (not bank_use [bank])
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_transition.cpp

    r106 r108  
    2828    if (PORT_READ(in_NRESET) == 0)
    2929      {
    30         internal_BANK_PRIORITY = 0;
     30        reg_BANK_PRIORITY = 0;
    3131        for (uint32_t i=0; i<_param->_nb_bank; i++)
    3232          {
     
    5959            {
    6060              log_printf(TRACE,Free_List_unit,FUNCTION,"  * PUSH_GPR[%d]",i);
     61              log_printf(TRACE,Free_List_unit,FUNCTION,"    * bank    : %d",internal_PUSH_GPR_BANK[i]);
     62              log_printf(TRACE,Free_List_unit,FUNCTION,"    * num_reg : %d",PORT_READ(in_PUSH_GPR_NUM_REG [i]));
    6163
    62               _gpr_list [internal_PUSH_GPR_BANK[i]].push_back(//_param->_mask_gpr &
    63                                                               PORT_READ(in_PUSH_GPR_NUM_REG [i]));
     64              _gpr_list [internal_PUSH_GPR_BANK[i]].push_back(PORT_READ(in_PUSH_GPR_NUM_REG [i]));
    6465            }
    6566        // ==================================================
     
    7071            {
    7172              log_printf(TRACE,Free_List_unit,FUNCTION,"  * PUSH_SPR[%d]",i);
     73              log_printf(TRACE,Free_List_unit,FUNCTION,"    * bank    : %d",internal_PUSH_SPR_BANK[i]);
     74              log_printf(TRACE,Free_List_unit,FUNCTION,"    * num_reg : %d",PORT_READ(in_PUSH_SPR_NUM_REG [i]));
    7275
    73               _spr_list [internal_PUSH_SPR_BANK[i]].push_back(//_param->_mask_spr &
    74                                                               PORT_READ(in_PUSH_SPR_NUM_REG [i]));
     76              _spr_list [internal_PUSH_SPR_BANK[i]].push_back(PORT_READ(in_PUSH_SPR_NUM_REG [i]));
    7577            }
    7678
    77         if (_param->_priority == PRIORITY_ROUND_ROBIN)
    78           internal_BANK_PRIORITY = (internal_BANK_PRIORITY+1)%_param->_nb_bank_by_pop;
     79        if (_param->_priority == PRIORITY_ROUND_ROBIN)
     80          reg_BANK_PRIORITY = (reg_BANK_PRIORITY+1)%_param->_nb_bank_by_pop;
    7981
    8082#if (DEBUG >= DEBUG_TRACE) and (DEBUG_Free_List_unit == true)
     
    8385     
    8486          log_printf(TRACE,Free_List_unit,FUNCTION,"  * Dump Free List");
    85          
    8687          for (uint32_t i=0; i<_param->_nb_bank; ++i)
    8788            {
     89              log_printf(TRACE,Free_List_unit,FUNCTION,"    * GPR [%d] - NB_ELT : %d",i,_gpr_list[i].size());
     90
    8891              uint32_t j=0;
    89               for (std::list<Tgeneral_address_t>::iterator it=_gpr_list->begin();
    90                    it!=_gpr_list->end();
     92              for (std::list<Tgeneral_address_t>::iterator it=_gpr_list[i].begin();
     93                   it!=_gpr_list[i].end();
    9194                   )
    9295                {
     
    9598                  for (uint32_t x=0; x<limit; x++)
    9699                    {
    97                       if (it==_gpr_list->end())
     100                      if (it==_gpr_list[i].end())
    98101                        break;
    99102                      else
     
    108111          for (uint32_t i=0; i<_param->_nb_bank; ++i)
    109112            {
     113              log_printf(TRACE,Free_List_unit,FUNCTION,"    * SPR [%d] - NB_ELT : %d",i,_spr_list[i].size());
     114
    110115              uint32_t j=0;
    111               for (std::list<Tspecial_address_t>::iterator it=_spr_list->begin();
    112                    it!=_spr_list->end();
     116              for (std::list<Tspecial_address_t>::iterator it=_spr_list[i].begin();
     117                   it!=_spr_list[i].end();
    113118                   )
    114119                {
     
    117122                  for (uint32_t x=0; x<limit; x++)
    118123                    {
    119                       if (it==_spr_list->end())
     124                      if (it==_spr_list[i].end())
    120125                        break;
    121126                      else
     
    132137#ifdef DEBUG_TEST
    133138        if (1)
     139          for (uint32_t i=0; i<_param->_nb_bank; ++i)
    134140          {
    135             for (std::list<Tgeneral_address_t>::iterator it1=_gpr_list->begin();
    136                  it1!=_gpr_list->end();
     141            for (std::list<Tgeneral_address_t>::iterator it1=_gpr_list[i].begin();
     142                 it1!=_gpr_list[i].end();
    137143                 ++it1
    138144                 )
     
    141147
    142148                it2 ++;
    143                 while (it2 != _gpr_list->end())
     149                while (it2 != _gpr_list[i].end())
    144150                  {
    145151                    if (*it1 == *it2)
     
    149155              }
    150156
    151             for (std::list<Tspecial_address_t>::iterator it1=_spr_list->begin();
    152                  it1!=_spr_list->end();
     157            for (std::list<Tspecial_address_t>::iterator it1=_spr_list[i].begin();
     158                 it1!=_spr_list[i].end();
    153159                 ++it1
    154160                 )
     
    157163
    158164                it2 ++;
    159                 while (it2 != _spr_list->end())
     165                while (it2 != _spr_list[i].end())
    160166                  {
    161167                    if (*it1 == *it2)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Parameters.cpp

    r88 r108  
    5252    _bank_gpr_size_slot    = size_general_register-log2(nb_bank);
    5353
    54     _mask_gpr              = gen_mask<Tgeneral_address_t> (_bank_gpr_size_slot);
     54    _mask_gpr              = gen_mask<Tgeneral_address_t> (log2(nb_bank));
    5555
    5656    uint32_t spr_nb_slot   = nb_special_register - nb_thread*_nb_special_register_logic;
     
    5959    _bank_spr_size_slot    = size_special_register-log2(nb_bank);
    6060
    61     _mask_spr              = gen_mask<Tspecial_address_t> (_bank_spr_size_slot);
     61    _mask_spr              = gen_mask<Tspecial_address_t> (log2(nb_bank));
    6262
    6363    if (is_toplevel)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/src/test.cpp

    r105 r108  
    5959  ALLOC2_SC_SIGNAL( in_RENAME_IN_NO_EXECUTE    ," in_RENAME_IN_NO_EXECUTE    ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    6060  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]);
     61#ifdef DEBUG
     62  ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS       ," in_RENAME_IN_ADDRESS       ",Taddress_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     63#endif
    6164  ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS_NEXT  ," in_RENAME_IN_ADDRESS_NEXT  ",Taddress_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    6265  ALLOC2_SC_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT  ," in_RENAME_IN_HAS_IMMEDIAT  ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     
    8487  ALLOC1_SC_SIGNAL(out_RENAME_OUT_NO_EXECUTE   ,"out_RENAME_OUT_NO_EXECUTE   ",Tcontrol_t        ,_param->_nb_inst_rename);
    8588  ALLOC1_SC_SIGNAL(out_RENAME_OUT_IS_DELAY_SLOT,"out_RENAME_OUT_IS_DELAY_SLOT",Tcontrol_t        ,_param->_nb_inst_rename);
     89#ifdef DEBUG
     90  ALLOC1_SC_SIGNAL(out_RENAME_OUT_ADDRESS      ,"out_RENAME_OUT_ADDRESS      ",Taddress_t        ,_param->_nb_inst_rename);
     91#endif
    8692  ALLOC1_SC_SIGNAL(out_RENAME_OUT_ADDRESS_NEXT ,"out_RENAME_OUT_ADDRESS_NEXT ",Taddress_t        ,_param->_nb_inst_rename);
    8793  ALLOC1_SC_SIGNAL(out_RENAME_OUT_HAS_IMMEDIAT ,"out_RENAME_OUT_HAS_IMMEDIAT ",Tcontrol_t        ,_param->_nb_inst_rename);
     
    99105  ALLOC1_SC_SIGNAL(out_RENAME_OUT_EXCEPTION_USE,"out_RENAME_OUT_EXCEPTION_USE",Texception_t      ,_param->_nb_inst_rename);
    100106  ALLOC1_SC_SIGNAL(out_RENAME_OUT_EXCEPTION    ,"out_RENAME_OUT_EXCEPTION    ",Texception_t      ,_param->_nb_inst_rename);
     107
     108  ALLOC2_SC_SIGNAL( in_RETIRE_EVENT_STATE      ," in_RETIRE_EVENT_STATE      ",Tevent_state_t    ,_param->_nb_front_end,_param->_nb_context[it1]);
    101109 
    102110  /********************************************************
     
    121129  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_NO_EXECUTE    ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    122130  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_IS_DELAY_SLOT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     131#ifdef DEBUG
     132  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_ADDRESS       ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     133#endif
    123134  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_ADDRESS_NEXT  ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    124135  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_HAS_IMMEDIAT  ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     
    149160  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_NO_EXECUTE   ,_param->_nb_inst_rename);
    150161  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_IS_DELAY_SLOT,_param->_nb_inst_rename);
     162#ifdef DEBUG
     163  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_ADDRESS      ,_param->_nb_inst_rename);
     164#endif
    151165  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_ADDRESS_NEXT ,_param->_nb_inst_rename);
    152166  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_HAS_IMMEDIAT ,_param->_nb_inst_rename);
     
    165179  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_EXCEPTION    ,_param->_nb_inst_rename);
    166180
     181  INSTANCE2_SC_SIGNAL(_Rename_select, in_RETIRE_EVENT_STATE      ,_param->_nb_front_end, _param->_nb_context[it1]);
     182
    167183  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
    168184   
     
    194210  SC_START(5);
    195211  in_NRESET->write(1); 
     212 
     213  for (uint32_t i=0; i<_param->_nb_front_end; i++)
     214    for (uint32_t j=0; j<_param->_nb_context[i]; j++)
     215      in_RETIRE_EVENT_STATE [i][j]->write(EVENT_STATE_NO_EVENT);
    196216
    197217  LABEL("Loop of Test");
     
    329349  delete []  in_RENAME_IN_NO_EXECUTE    ;
    330350  delete []  in_RENAME_IN_IS_DELAY_SLOT ;
     351#ifdef DEBUG
     352  delete []  in_RENAME_IN_ADDRESS       ;
     353#endif
    331354  delete []  in_RENAME_IN_ADDRESS_NEXT  ;
    332355  delete []  in_RENAME_IN_HAS_IMMEDIAT  ;
     
    354377  delete [] out_RENAME_OUT_NO_EXECUTE   ;
    355378  delete [] out_RENAME_OUT_IS_DELAY_SLOT;
     379#ifdef DEBUG
     380  delete [] out_RENAME_OUT_ADDRESS      ;
     381#endif
    356382  delete [] out_RENAME_OUT_ADDRESS_NEXT ;
    357383  delete [] out_RENAME_OUT_HAS_IMMEDIAT ;
     
    369395  delete [] out_RENAME_OUT_EXCEPTION_USE;
    370396  delete [] out_RENAME_OUT_EXCEPTION    ;
     397
     398  DELETE2_SC_SIGNAL( in_RETIRE_EVENT_STATE          ,_param->_nb_front_end, _param->_nb_context[it1]);
    371399#endif
    372400
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Rename_select.h

    r105 r108  
    7676  public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IN_NO_EXECUTE    ;//[nb_front_end][nb_inst_decod]
    7777  public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IN_IS_DELAY_SLOT ;//[nb_front_end][nb_inst_decod]
     78#ifdef DEBUG
     79  public    : SC_IN (Taddress_t        )  ***  in_RENAME_IN_ADDRESS       ;//[nb_front_end][nb_inst_decod]
     80#endif
    7881  public    : SC_IN (Taddress_t        )  ***  in_RENAME_IN_ADDRESS_NEXT  ;//[nb_front_end][nb_inst_decod]
    7982  public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IN_HAS_IMMEDIAT  ;//[nb_front_end][nb_inst_decod]
     
    102105  public    : SC_OUT(Tcontrol_t        )   ** out_RENAME_OUT_NO_EXECUTE   ;//[nb_inst_rename]
    103106  public    : SC_OUT(Tcontrol_t        )   ** out_RENAME_OUT_IS_DELAY_SLOT;//[nb_inst_rename]
     107#ifdef DEBUG
     108  public    : SC_OUT(Taddress_t        )   ** out_RENAME_OUT_ADDRESS      ;//[nb_inst_rename]
     109#endif
    104110  public    : SC_OUT(Taddress_t        )   ** out_RENAME_OUT_ADDRESS_NEXT ;//[nb_inst_rename]
    105111  public    : SC_OUT(Tcontrol_t        )   ** out_RENAME_OUT_HAS_IMMEDIAT ;//[nb_inst_rename]
     
    117123  public    : SC_OUT(Texception_t      )   ** out_RENAME_OUT_EXCEPTION_USE;//[nb_inst_rename]
    118124  public    : SC_OUT(Texception_t      )   ** out_RENAME_OUT_EXCEPTION    ;//[nb_inst_rename]
     125
     126    // ~~~~~[ Interface "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     127  public    : SC_IN (Tevent_state_t    )  ***  in_RETIRE_EVENT_STATE      ;//[nb_front_end][nb_context]
    119128
    120129    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select.cpp

    r105 r108  
    9797                        << (*(in_RENAME_IN_NO_EXECUTE    [i][j]))
    9898                        << (*(in_RENAME_IN_IS_DELAY_SLOT [i][j]))
     99#ifdef DEBUG
     100                        << (*(in_RENAME_IN_ADDRESS       [i][j]))
     101#endif
    99102                        << (*(in_RENAME_IN_ADDRESS_NEXT  [i][j]))
    100103                        << (*(in_RENAME_IN_HAS_IMMEDIAT  [i][j]))
     
    119122              sensitive << (*(in_RENAME_IN_DEPTH         [i][j]));
    120123            }
     124
     125//      for (uint32_t i=0; i<_param->_nb_front_end; i++)
     126//        for (uint32_t j=0; j<_param->_nb_context [i]; j++)
     127//             sensitive << (*(in_RETIRE_EVENT_STATE [i][j]));
     128
    121129        for (uint32_t i=0; i<_param->_nb_inst_rename; i++)
    122130          sensitive << (*(in_RENAME_OUT_ACK          [i]));
     
    163171                  (*(out_RENAME_OUT_IS_DELAY_SLOT [x])) (*(in_RENAME_IN_VAL           [i][j]));
    164172                  (*(out_RENAME_OUT_IS_DELAY_SLOT [x])) (*(in_RENAME_IN_IS_DELAY_SLOT [i][j]));
     173#ifdef DEBUG
     174                  (*(out_RENAME_OUT_ADDRESS       [x])) (*(in_RENAME_IN_VAL           [i][j]));
     175                  (*(out_RENAME_OUT_ADDRESS       [x])) (*(in_RENAME_IN_ADDRESS       [i][j]));
     176#endif
    165177                  (*(out_RENAME_OUT_ADDRESS_NEXT  [x])) (*(in_RENAME_IN_VAL           [i][j]));
    166178                  (*(out_RENAME_OUT_ADDRESS_NEXT  [x])) (*(in_RENAME_IN_ADDRESS_NEXT  [i][j]));
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_allocation.cpp

    r105 r108  
    6969      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NO_EXECUTE    ,"no_execute"   ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
    7070      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     71#ifdef DEBUG
     72      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS       ,"address"      ,Taddress_t        ,_param->_size_instruction_address   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     73#endif
    7174      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS_NEXT  ,"address_next" ,Taddress_t        ,_param->_size_instruction_address   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
    7275      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAS_IMMEDIAT  ,"has_immediat" ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     
    99102      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_NO_EXECUTE    ,"no_execute"   ,Tcontrol_t        ,1                                   );
    100103      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t        ,1                                   );
     104#ifdef DEBUG
     105      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_ADDRESS       ,"address"      ,Taddress_t        ,_param->_size_instruction_address   );
     106#endif
    101107      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_ADDRESS_NEXT  ,"address_next" ,Taddress_t        ,_param->_size_instruction_address   );
    102108      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_HAS_IMMEDIAT  ,"has_immediat" ,Tcontrol_t        ,1                                   );
     
    114120      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_EXCEPTION_USE ,"exception_use",Texception_t      ,_param->_size_exception_use         );
    115121      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_EXCEPTION     ,"exception"    ,Texception_t      ,_param->_size_exception             );
     122    }
     123
     124    // ~~~~~[ Interface : "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     125    {
     126      ALLOC2_INTERFACE("retire_event", IN,NORTH, _("Retire event"), _param->_nb_front_end, _param->_nb_context[it1]);
     127
     128      _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STATE         ,"state"                ,Tevent_state_t    ,_param->_size_event_state, _param->_nb_front_end, _param->_nb_context[it1]);
    116129    }
    117130
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_deallocation.cpp

    r105 r108  
    77
    88#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Rename_select.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    4041        delete []  in_RENAME_IN_NO_EXECUTE    ;
    4142        delete []  in_RENAME_IN_IS_DELAY_SLOT ;
     43#ifdef DEBUG
     44        delete []  in_RENAME_IN_ADDRESS       ;
     45#endif
    4246        delete []  in_RENAME_IN_ADDRESS_NEXT  ;
    4347        delete []  in_RENAME_IN_HAS_IMMEDIAT  ;
     
    6670        delete [] out_RENAME_OUT_TYPE         ;
    6771        delete [] out_RENAME_OUT_OPERATION    ;
     72#ifdef DEBUG
     73        delete [] out_RENAME_OUT_ADDRESS      ;
     74#endif
    6875        delete [] out_RENAME_OUT_ADDRESS_NEXT ;
    6976        delete [] out_RENAME_OUT_HAS_IMMEDIAT ;
     
    8087        delete [] out_RENAME_OUT_NUM_REG_RE   ;
    8188        delete [] out_RENAME_OUT_EXCEPTION_USE;
     89
     90        DELETE2_SIGNAL( in_RETIRE_EVENT_STATE          ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_event_state);
    8291      }
    8392    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_genMealy.cpp

    r105 r108  
    6565                log_printf(TRACE,Rename_select,FUNCTION,"      * rename_out_ack       : %d",PORT_READ(in_RENAME_OUT_ACK[i]));
    6666
     67                Tcontext_t     front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RENAME_IN_FRONT_END_ID [x][y]):0;
     68                Tcontext_t     context_id   = (_param->_have_port_context_id  )?PORT_READ(in_RENAME_IN_CONTEXT_ID   [x][y]):0;
     69               
     70                Tcontrol_t     no_execute   = (PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y]));
     71
     72                Tcontrol_t read_ra  = (PORT_READ(in_RENAME_IN_READ_RA  [x][y]));
     73                Tcontrol_t read_rb  = (PORT_READ(in_RENAME_IN_READ_RB  [x][y]));
     74                Tcontrol_t read_rc  = (PORT_READ(in_RENAME_IN_READ_RC  [x][y]));
     75                Tcontrol_t write_rd = (PORT_READ(in_RENAME_IN_WRITE_RD [x][y]));
     76                Tcontrol_t write_re = (PORT_READ(in_RENAME_IN_WRITE_RE [x][y]));
     77
     78                // Attention, j'ai enlevé event_state de la liste de sensibilité
     79//                 Tevent_state_t event_state  = PORT_READ(in_RETIRE_EVENT_STATE [front_end_id][context_id]);
     80
     81//                 Tcontrol_t     no_execute   = (PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y]) or
     82//                                                // ROB Flush
     83//                                                ((event_state == EVENT_STATE_EVENT  ) or
     84//                                                 (event_state == EVENT_STATE_WAITEND)));
     85
     86//              Tcontrol_t read_ra  = (PORT_READ(in_RENAME_IN_READ_RA  [x][y]) and not no_execute);
     87//              Tcontrol_t read_rb  = (PORT_READ(in_RENAME_IN_READ_RB  [x][y]) and not no_execute);
     88//              Tcontrol_t read_rc  = (PORT_READ(in_RENAME_IN_READ_RC  [x][y]) and not no_execute);
     89//              Tcontrol_t write_rd = (PORT_READ(in_RENAME_IN_WRITE_RD [x][y]) and not no_execute);
     90//              Tcontrol_t write_re = (PORT_READ(in_RENAME_IN_WRITE_RE [x][y]) and not no_execute);
     91               
    6792                if (_param->_have_port_front_end_id)
    68                 PORT_WRITE(out_RENAME_OUT_FRONT_END_ID [i],PORT_READ(in_RENAME_IN_FRONT_END_ID  [x][y]));
     93                PORT_WRITE(out_RENAME_OUT_FRONT_END_ID [i],front_end_id);
    6994                if (_param->_have_port_context_id)
    70                 PORT_WRITE(out_RENAME_OUT_CONTEXT_ID   [i],PORT_READ(in_RENAME_IN_CONTEXT_ID    [x][y]));
     95                PORT_WRITE(out_RENAME_OUT_CONTEXT_ID   [i],context_id);
    7196                if (_param->_have_port_depth)
    7297                PORT_WRITE(out_RENAME_OUT_DEPTH        [i],PORT_READ(in_RENAME_IN_DEPTH         [x][y]));
    7398                PORT_WRITE(out_RENAME_OUT_TYPE         [i],PORT_READ(in_RENAME_IN_TYPE          [x][y]));
    7499                PORT_WRITE(out_RENAME_OUT_OPERATION    [i],PORT_READ(in_RENAME_IN_OPERATION     [x][y]));
    75                 PORT_WRITE(out_RENAME_OUT_NO_EXECUTE   [i],PORT_READ(in_RENAME_IN_NO_EXECUTE    [x][y]));
     100                PORT_WRITE(out_RENAME_OUT_NO_EXECUTE   [i],no_execute);
    76101                PORT_WRITE(out_RENAME_OUT_IS_DELAY_SLOT[i],PORT_READ(in_RENAME_IN_IS_DELAY_SLOT [x][y]));
     102#ifdef DEBUG
     103                PORT_WRITE(out_RENAME_OUT_ADDRESS      [i],PORT_READ(in_RENAME_IN_ADDRESS       [x][y]));
     104#endif
    77105                PORT_WRITE(out_RENAME_OUT_ADDRESS_NEXT [i],PORT_READ(in_RENAME_IN_ADDRESS_NEXT  [x][y]));
    78106                PORT_WRITE(out_RENAME_OUT_HAS_IMMEDIAT [i],PORT_READ(in_RENAME_IN_HAS_IMMEDIAT  [x][y]));
    79107                PORT_WRITE(out_RENAME_OUT_IMMEDIAT     [i],PORT_READ(in_RENAME_IN_IMMEDIAT      [x][y]));
    80                 PORT_WRITE(out_RENAME_OUT_READ_RA      [i],PORT_READ(in_RENAME_IN_READ_RA       [x][y]));
     108                PORT_WRITE(out_RENAME_OUT_READ_RA      [i],read_ra);
    81109                PORT_WRITE(out_RENAME_OUT_NUM_REG_RA   [i],PORT_READ(in_RENAME_IN_NUM_REG_RA    [x][y]));
    82                 PORT_WRITE(out_RENAME_OUT_READ_RB      [i],PORT_READ(in_RENAME_IN_READ_RB       [x][y]));
     110                PORT_WRITE(out_RENAME_OUT_READ_RB      [i],read_rb);
    83111                PORT_WRITE(out_RENAME_OUT_NUM_REG_RB   [i],PORT_READ(in_RENAME_IN_NUM_REG_RB    [x][y]));
    84                 PORT_WRITE(out_RENAME_OUT_READ_RC      [i],PORT_READ(in_RENAME_IN_READ_RC       [x][y]));
     112                PORT_WRITE(out_RENAME_OUT_READ_RC      [i],read_rc);
    85113                PORT_WRITE(out_RENAME_OUT_NUM_REG_RC   [i],PORT_READ(in_RENAME_IN_NUM_REG_RC    [x][y]));
    86                 PORT_WRITE(out_RENAME_OUT_WRITE_RD     [i],PORT_READ(in_RENAME_IN_WRITE_RD      [x][y]));
     114                PORT_WRITE(out_RENAME_OUT_WRITE_RD     [i],write_rd);
    87115                PORT_WRITE(out_RENAME_OUT_NUM_REG_RD   [i],PORT_READ(in_RENAME_IN_NUM_REG_RD    [x][y]));
    88                 PORT_WRITE(out_RENAME_OUT_WRITE_RE     [i],PORT_READ(in_RENAME_IN_WRITE_RE      [x][y]));
     116                PORT_WRITE(out_RENAME_OUT_WRITE_RE     [i],write_re);
    89117                PORT_WRITE(out_RENAME_OUT_NUM_REG_RE   [i],PORT_READ(in_RENAME_IN_NUM_REG_RE    [x][y]));
    90118                PORT_WRITE(out_RENAME_OUT_EXCEPTION_USE[i],PORT_READ(in_RENAME_IN_EXCEPTION_USE [x][y]));
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/SelfTest/src/test.cpp

    r105 r108  
    5757  ALLOC2_SC_SIGNAL( in_RENAME_IN_NO_EXECUTE        ," in_RENAME_IN_NO_EXECUTE        ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
    5858  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
     60  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
    5962  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]);
    6063  ALLOC2_SC_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT      ," in_RENAME_IN_HAS_IMMEDIAT      ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     
    8184  ALLOC1_SC_SIGNAL(out_INSERT_NO_EXECUTE           ,"out_INSERT_NO_EXECUTE           ",Tcontrol_t        ,_param->_nb_inst_insert);
    8285  ALLOC1_SC_SIGNAL(out_INSERT_IS_DELAY_SLOT        ,"out_INSERT_IS_DELAY_SLOT        ",Tcontrol_t        ,_param->_nb_inst_insert);
     86#ifdef DEBUG
     87  ALLOC1_SC_SIGNAL(out_INSERT_ADDRESS              ,"out_INSERT_ADDRESS              ",Tgeneral_data_t   ,_param->_nb_inst_insert);
     88#endif
    8389  ALLOC1_SC_SIGNAL(out_INSERT_ADDRESS_NEXT         ,"out_INSERT_ADDRESS_NEXT         ",Tgeneral_data_t   ,_param->_nb_inst_insert);
    8490  ALLOC1_SC_SIGNAL(out_INSERT_HAS_IMMEDIAT         ,"out_INSERT_HAS_IMMEDIAT         ",Tcontrol_t        ,_param->_nb_inst_insert);
     
    155161  INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_NO_EXECUTE        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    156162  INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_IS_DELAY_SLOT     ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     163#ifdef DEBUG
     164  INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_ADDRESS           ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     165#endif
    157166  INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_ADDRESS_NEXT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    158167  INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_HAS_IMMEDIAT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     
    183192  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_NO_EXECUTE           ,_param->_nb_inst_insert);
    184193  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_IS_DELAY_SLOT        ,_param->_nb_inst_insert);
     194#ifdef DEBUG
     195  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_ADDRESS              ,_param->_nb_inst_insert);
     196#endif
    185197  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_ADDRESS_NEXT         ,_param->_nb_inst_insert);
    186198  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_HAS_IMMEDIAT         ,_param->_nb_inst_insert);
     
    297309  DELETE2_SC_SIGNAL( in_RENAME_IN_NO_EXECUTE        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    298310  DELETE2_SC_SIGNAL( in_RENAME_IN_IS_DELAY_SLOT     ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     311#ifdef DEBUG
     312  DELETE2_SC_SIGNAL( in_RENAME_IN_ADDRESS           ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     313#endif
    299314  DELETE2_SC_SIGNAL( in_RENAME_IN_ADDRESS_NEXT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    300315  DELETE2_SC_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     
    322337  DELETE1_SC_SIGNAL(out_INSERT_NO_EXECUTE           ,_param->_nb_inst_insert);
    323338  DELETE1_SC_SIGNAL(out_INSERT_IS_DELAY_SLOT        ,_param->_nb_inst_insert);
     339#ifdef DEBUG
     340  DELETE1_SC_SIGNAL(out_INSERT_ADDRESS              ,_param->_nb_inst_insert);
     341#endif
    324342  DELETE1_SC_SIGNAL(out_INSERT_ADDRESS_NEXT         ,_param->_nb_inst_insert);
    325343  DELETE1_SC_SIGNAL(out_INSERT_HAS_IMMEDIAT         ,_param->_nb_inst_insert);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/include/Rename_unit.h

    r105 r108  
    7878  public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IN_NO_EXECUTE        ;//[nb_front_end][nb_inst_decod]
    7979  public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IN_IS_DELAY_SLOT     ;//[nb_front_end][nb_inst_decod]
     80#ifdef DEBUG
     81  public    : SC_IN (Taddress_t        )  ***  in_RENAME_IN_ADDRESS           ;//[nb_front_end][nb_inst_decod]
     82#endif
    8083  public    : SC_IN (Taddress_t        )  ***  in_RENAME_IN_ADDRESS_NEXT      ;//[nb_front_end][nb_inst_decod]
    8184  public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IN_HAS_IMMEDIAT      ;//[nb_front_end][nb_inst_decod]
     
    104107  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_NO_EXECUTE           ;//[nb_inst_insert]
    105108  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_IS_DELAY_SLOT        ;//[nb_inst_insert]
     109#ifdef DEBUG
     110  public    : SC_OUT(Taddress_t        )   ** out_INSERT_ADDRESS              ;//[nb_inst_insert]
     111#endif
    106112  public    : SC_OUT(Taddress_t        )   ** out_INSERT_ADDRESS_NEXT         ;//[nb_inst_insert]
    107113  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_HAS_IMMEDIAT         ;//[nb_inst_insert]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_allocation.cpp

    r105 r108  
    6969      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NO_EXECUTE    ,"no_execute"   ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
    7070      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     71#ifdef DEBUG
     72      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS       ,"address"      ,Taddress_t        ,_param->_size_instruction_address   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     73#endif
    7174      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS_NEXT  ,"address_next" ,Taddress_t        ,_param->_size_instruction_address   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
    7275      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAS_IMMEDIAT  ,"has_immediat" ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     
    99102      ALLOC1_SIGNAL_OUT(out_INSERT_NO_EXECUTE           ,"no_execute"           ,Tcontrol_t        ,1                                   );
    100103      ALLOC1_SIGNAL_OUT(out_INSERT_IS_DELAY_SLOT        ,"is_delay_slot"        ,Tcontrol_t        ,1                                   );
     104#ifdef DEBUG
     105      ALLOC1_SIGNAL_OUT(out_INSERT_ADDRESS              ,"address"              ,Taddress_t        ,_param->_size_instruction_address   );
     106#endif
    101107      ALLOC1_SIGNAL_OUT(out_INSERT_ADDRESS_NEXT         ,"address_next"         ,Taddress_t        ,_param->_size_instruction_address   );
    102108      ALLOC1_SIGNAL_OUT(out_INSERT_HAS_IMMEDIAT         ,"has_immediat"         ,Tcontrol_t        ,1                                   );
     
    301307            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT",
    302308                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT");
     309#ifdef DEBUG
     310            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS"      ,
     311                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS"      );
     312#endif
    303313            PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT" ,
    304314                                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT" );
     
    349359          PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_DEPTH"       ,
    350360                              dest,"out_INSERT_"    +toString(i)+"_DEPTH"       );
     361#ifdef DEBUG
     362          PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_ADDRESS"     ,
     363                              dest,"out_INSERT_"    +toString(i)+"_ADDRESS"     );
     364#endif
    351365          PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_ADDRESS_NEXT",
    352366                              dest,"out_INSERT_"    +toString(i)+"_ADDRESS_NEXT");
     
    412426                                   dest, "in_INSERT_"    +toString(i)+"_RENAME_SELECT_EXCEPTION"    );
    413427        }
     428
     429      for (uint32_t i=0; i<_param->_nb_front_end; i++)
     430        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
     431          {
     432            dest = _name;
     433           
     434#ifdef POSITION
     435            _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j),
     436                                       dest,"retire_event_"+toString(i)+"_"+toString(j));
     437#endif     
     438            PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE",
     439                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE");
     440          }
    414441    }
    415442
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_deallocation.cpp

    r105 r108  
    3737        DELETE2_SIGNAL( in_RENAME_IN_NO_EXECUTE        ,_param->_nb_front_end, _param->_nb_inst_decod[it1],1                                   );
    3838        DELETE2_SIGNAL( in_RENAME_IN_IS_DELAY_SLOT     ,_param->_nb_front_end, _param->_nb_inst_decod[it1],1                                   );
     39#ifdef DEBUG
     40        DELETE2_SIGNAL( in_RENAME_IN_ADDRESS           ,_param->_nb_front_end, _param->_nb_inst_decod[it1],_param->_size_instruction_address   );
     41#endif
    3942        DELETE2_SIGNAL( in_RENAME_IN_ADDRESS_NEXT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1],_param->_size_instruction_address   );
    4043        DELETE2_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1],1                                   );
     
    6265        DELETE1_SIGNAL(out_INSERT_NO_EXECUTE           ,_param->_nb_inst_insert,1                                   );
    6366        DELETE1_SIGNAL(out_INSERT_IS_DELAY_SLOT        ,_param->_nb_inst_insert,1                                   );
     67#ifdef DEBUG
     68        DELETE1_SIGNAL(out_INSERT_ADDRESS              ,_param->_nb_inst_insert,_param->_size_instruction_address   );
     69#endif
    6470        DELETE1_SIGNAL(out_INSERT_ADDRESS_NEXT         ,_param->_nb_inst_insert,_param->_size_instruction_address   );
    6571        DELETE1_SIGNAL(out_INSERT_HAS_IMMEDIAT         ,_param->_nb_inst_insert,1                                   );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/configuration.cfg

    r88 r108  
    13131       1       +1      # nb_inst_branch_complete                             
    14141       1       +1      # nb_branch_speculated              [0][0]            [nb_front_end][nb_context]
     151       1       +1      # size_nb_inst_decod 
    15161       1       +1      # nb_rename_unit_select                   
    16171       1       +1      # nb_execute_loop_select                   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/src/main.cpp

    r88 r108  
    88#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/include/test.h"
    99
    10 #define NB_PARAMS 22
     10#define NB_PARAMS 23
    1111
    1212void usage (int argc, char * argv[])
     
    2727  err (_(" * nb_inst_branch_complete                                                 (uint32_t         )\n"));
    2828  err (_(" * nb_branch_speculated              [nb_front_end][nb_context]            (uint32_t         )\n"));
     29  err (_(" * size_nb_inst_decod                                                      (uint32_t         )\n"));
    2930  err (_(" * nb_rename_unit_select                                                   (uint32_t         )\n"));
    3031  err (_(" * nb_execute_loop_select                                                  (uint32_t         )\n"));
     
    130131        _nb_branch_speculated [i][j] = fromString<uint32_t>(argv[x++]);
    131132    }
     133  uint32_t              _size_nb_inst_decod                = fromString<uint32_t         >(argv[x++]);
    132134  uint32_t              _nb_rename_unit_select             = fromString<uint32_t         >(argv[x++]);
    133135  uint32_t              _nb_execute_loop_select            = fromString<uint32_t         >(argv[x++]);
     
    275277         _nb_inst_branch_complete          ,
    276278         _nb_branch_speculated             ,
     279         _size_nb_inst_decod               ,
    277280         _nb_rename_unit_select            ,
    278281         _nb_execute_loop_select           ,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/src/test.cpp

    r105 r108  
    5757  ALLOC2_SC_SIGNAL( in_RENAME_NO_EXECUTE                ," in_RENAME_NO_EXECUTE                ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
    5858  ALLOC2_SC_SIGNAL( in_RENAME_IS_DELAY_SLOT             ," in_RENAME_IS_DELAY_SLOT             ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     59#ifdef DEBUG
     60  ALLOC2_SC_SIGNAL( in_RENAME_ADDRESS                   ," in_RENAME_ADDRESS                   ",Taddress_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     61#endif
    5962  ALLOC2_SC_SIGNAL( in_RENAME_ADDRESS_NEXT              ," in_RENAME_ADDRESS_NEXT              ",Taddress_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
    6063  ALLOC2_SC_SIGNAL( in_RENAME_HAS_IMMEDIAT              ," in_RENAME_HAS_IMMEDIAT              ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     
    165168  ALLOC2_SC_SIGNAL(out_NB_INST_COMMIT_ALL               ,"out_NB_INST_COMMIT_ALL               ",Tcounter_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
    166169  ALLOC2_SC_SIGNAL(out_NB_INST_COMMIT_MEM               ,"out_NB_INST_COMMIT_MEM               ",Tcounter_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
     170  ALLOC2_SC_SIGNAL( in_NB_INST_DECOD_ALL                ," in_NB_INST_DECOD_ALL                ",Tcounter_t        ,_param->_nb_front_end,_param->_nb_context[it1]);
    167171
    168172  ALLOC2_SC_SIGNAL( in_DEPTH_MIN                        ," in_DEPTH_MIN                        ",Tdepth_t          ,_param->_nb_front_end,_param->_nb_context[it1]);
     
    194198  INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_NO_EXECUTE                ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
    195199  INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_IS_DELAY_SLOT             ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     200#ifdef DEBUG
     201  INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_ADDRESS                   ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     202#endif
    196203  INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_ADDRESS_NEXT              ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
    197204  INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_HAS_IMMEDIAT              ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     
    315322  INSTANCE2_SC_SIGNAL(_OOO_Engine,out_NB_INST_COMMIT_ALL               ,_param->_nb_front_end,_param->_nb_context[it1]);
    316323  INSTANCE2_SC_SIGNAL(_OOO_Engine,out_NB_INST_COMMIT_MEM               ,_param->_nb_front_end,_param->_nb_context[it1]);
     324  INSTANCE2_SC_SIGNAL(_OOO_Engine, in_NB_INST_DECOD_ALL                ,_param->_nb_front_end,_param->_nb_context[it1]);
    317325 
    318326  if (_param->_have_port_depth)
     
    378386  DELETE2_SC_SIGNAL( in_RENAME_NO_EXECUTE                ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
    379387  DELETE2_SC_SIGNAL( in_RENAME_IS_DELAY_SLOT             ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     388#ifdef DEBUG
     389  DELETE2_SC_SIGNAL( in_RENAME_ADDRESS                   ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     390#endif
    380391  DELETE2_SC_SIGNAL( in_RENAME_ADDRESS_NEXT              ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
    381392  DELETE2_SC_SIGNAL( in_RENAME_HAS_IMMEDIAT              ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     
    484495  DELETE2_SC_SIGNAL(out_NB_INST_COMMIT_ALL               ,_param->_nb_front_end,_param->_nb_context[it1]);
    485496  DELETE2_SC_SIGNAL(out_NB_INST_COMMIT_MEM               ,_param->_nb_front_end,_param->_nb_context[it1]);
     497  DELETE2_SC_SIGNAL( in_NB_INST_DECOD_ALL                ,_param->_nb_front_end,_param->_nb_context[it1]);
    486498  DELETE2_SC_SIGNAL( in_DEPTH_MIN                        ,_param->_nb_front_end,_param->_nb_context[it1]);
    487499  DELETE2_SC_SIGNAL( in_DEPTH_MAX                        ,_param->_nb_front_end,_param->_nb_context[it1]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/OOO_Engine.h

    r105 r108  
    7777  public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_NO_EXECUTE                ;//[nb_front_end][nb_inst_decod]
    7878  public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IS_DELAY_SLOT             ;//[nb_front_end][nb_inst_decod]
     79#ifdef DEBUG
     80  public    : SC_IN (Taddress_t        )  ***  in_RENAME_ADDRESS                   ;//[nb_front_end][nb_inst_decod]
     81#endif
    7982  public    : SC_IN (Taddress_t        )  ***  in_RENAME_ADDRESS_NEXT              ;//[nb_front_end][nb_inst_decod]
    8083  public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_HAS_IMMEDIAT              ;//[nb_front_end][nb_inst_decod]
     
    194197  public    : SC_OUT(Tcounter_t        )  *** out_NB_INST_COMMIT_ALL               ;//[nb_front_end][nb_context]
    195198  public    : SC_OUT(Tcounter_t        )  *** out_NB_INST_COMMIT_MEM               ;//[nb_front_end][nb_context]
     199  public    : SC_IN (Tcounter_t        )  ***  in_NB_INST_DECOD_ALL                ;//[nb_front_end][nb_context]
    196200                                                                                   
    197201    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/Parameters.h

    r104 r108  
    134134                        uint32_t              nb_inst_branch_complete          ,
    135135                        uint32_t           ** nb_branch_speculated             ,//[nb_front_end][nb_context]
     136                        uint32_t              size_nb_inst_decod               ,
    136137                        uint32_t              nb_rename_unit_select            ,
    137138                        uint32_t              nb_execute_loop_select           ,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp

    r105 r108  
    6666      _ALLOC2_SIGNAL_IN ( in_RENAME_NO_EXECUTE                ,"NO_EXECUTE"                ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
    6767      _ALLOC2_SIGNAL_IN ( in_RENAME_IS_DELAY_SLOT             ,"IS_DELAY_SLOT"             ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     68#ifdef DEBUG
     69      _ALLOC2_SIGNAL_IN ( in_RENAME_ADDRESS                   ,"ADDRESS"                   ,Taddress_t        ,_param->_size_instruction_address    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     70#endif
    6871      _ALLOC2_SIGNAL_IN ( in_RENAME_ADDRESS_NEXT              ,"ADDRESS_NEXT"              ,Taddress_t        ,_param->_size_instruction_address    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
    6972      _ALLOC2_SIGNAL_IN ( in_RENAME_HAS_IMMEDIAT              ,"HAS_IMMEDIAT"              ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
     
    158161    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
    159162    {
    160       ALLOC1_INTERFACE("branch_complete",OUT,WEST,_("Instruction to execute_loop"),_param->_nb_inst_issue);
     163      ALLOC1_INTERFACE("branch_complete",OUT,WEST,_("Instruction to execute_loop"),_param->_nb_inst_branch_complete);
    161164
    162165      ALLOC1_VALACK_OUT (out_BRANCH_COMPLETE_VAL              , VAL);
     
    219222      _ALLOC2_SIGNAL_OUT(out_NB_INST_COMMIT_ALL               ,"COMMIT_ALL"                 ,Tcounter_t       ,_param->_size_nb_inst_commit         ,_param->_nb_front_end,_param->_nb_context[it1]);
    220223      _ALLOC2_SIGNAL_OUT(out_NB_INST_COMMIT_MEM               ,"COMMIT_MEM"                 ,Tcounter_t       ,_param->_size_nb_inst_commit         ,_param->_nb_front_end,_param->_nb_context[it1]);
     224      _ALLOC2_SIGNAL_IN ( in_NB_INST_DECOD_ALL                ,"DECOD_ALL"                  ,Tcounter_t       ,_param->_size_nb_inst_decod          ,_param->_nb_front_end,_param->_nb_context[it1]);
    221225    }
    222226
     
    413417                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_IS_DELAY_SLOT",
    414418                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_IS_DELAY_SLOT");
     419#ifdef DEBUG
     420                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_ADDRESS"      ,
     421                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_ADDRESS"      );
     422#endif
    415423                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_ADDRESS_NEXT" ,
    416424                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_ADDRESS_NEXT" );
     
    477485            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_IS_DELAY_SLOT" ,
    478486                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT" );
     487#ifdef DEBUG
     488            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_ADDRESS"       ,
     489                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_ADDRESS"       );
     490#endif
    479491            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_ADDRESS_NEXT"  ,
    480492                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT"  );
     
    755767
    756768            //    in_INSERT_DEPTH          - component_rename_unit
     769            //    in_INSERT_ADDRESS        - component_rename_unit
    757770            //    in_INSERT_ADDRESS_NEXT   - component_rename_unit
    758771            //    in_INSERT_EXCEPTION_USE  - component_rename_unit
     
    9911004            PORT_MAP(_component,src ,"out_NB_INST_"+toString(i)+"_"+toString(j)+"_COMMIT_MEM",
    9921005                                dest,"out_NB_INST_"+toString(i)+"_"+toString(j)+"_COMMIT_MEM");
     1006            PORT_MAP(_component,src , "in_NB_INST_"+toString(i)+"_"+toString(j)+"_DECOD_ALL" ,
     1007                                dest, "in_NB_INST_"+toString(i)+"_"+toString(j)+"_DECOD_ALL" );
    9931008          }
    9941009
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_deallocation.cpp

    r105 r108  
    3636        DELETE2_SIGNAL( in_RENAME_NO_EXECUTE                ,_param->_nb_front_end,_param->_nb_inst_decod[it1],1                                    );
    3737        DELETE2_SIGNAL( in_RENAME_IS_DELAY_SLOT             ,_param->_nb_front_end,_param->_nb_inst_decod[it1],1                                    );
     38#ifdef DEBUG
     39        DELETE2_SIGNAL( in_RENAME_ADDRESS                   ,_param->_nb_front_end,_param->_nb_inst_decod[it1],_param->_size_instruction_address    );
     40#endif
    3841        DELETE2_SIGNAL( in_RENAME_ADDRESS_NEXT              ,_param->_nb_front_end,_param->_nb_inst_decod[it1],_param->_size_instruction_address    );
    3942        DELETE2_SIGNAL( in_RENAME_HAS_IMMEDIAT              ,_param->_nb_front_end,_param->_nb_inst_decod[it1],1                                    );
     
    142145        DELETE2_SIGNAL(out_NB_INST_COMMIT_ALL               ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_nb_inst_commit         );
    143146        DELETE2_SIGNAL(out_NB_INST_COMMIT_MEM               ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_nb_inst_commit         );
     147        DELETE2_SIGNAL( in_NB_INST_DECOD_ALL                ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_nb_inst_decod          );
    144148        DELETE2_SIGNAL( in_DEPTH_MIN                        ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth                  );
    145149        DELETE2_SIGNAL( in_DEPTH_MAX                        ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth                  );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/Parameters.cpp

    r88 r108  
    3131                          uint32_t              nb_inst_branch_complete          ,
    3232                          uint32_t           ** nb_branch_speculated             ,//[nb_front_end][nb_context]
     33                          uint32_t              size_nb_inst_decod               ,
    3334                          uint32_t              nb_rename_unit_select            ,
    3435                          uint32_t              nb_execute_loop_select           ,
     
    242243       _nb_inst_branch_complete ,
    243244       _nb_branch_speculated    ,
     245        size_nb_inst_decod      ,
    244246        size_general_data       ,
    245247        size_store_queue_ptr    ,
     
    336338        _size_rob_ptr                      = size_packet_id;
    337339        _size_nb_inst_commit               = log2(size_re_order_buffer)+1;
     340        _size_nb_inst_decod                = size_nb_inst_decod;
    338341
    339342        _have_port_front_end_id            = _size_front_end_id   > 0;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Core_allocation.cpp

    r105 r108  
    286286        // out_DECOD_NO_EXECUTE    - ooo_engine. in_RENAME_NO_EXECUTE   
    287287        // out_DECOD_IS_DELAY_SLOT - ooo_engine. in_RENAME_IS_DELAY_SLOT
     288        // out_DECOD_ADDRESS       - ooo_engine. in_RENAME_ADDRESS     
    288289        // out_DECOD_ADDRESS_NEXT  - ooo_engine. in_RENAME_ADDRESS_NEXT
    289290        // out_DECOD_HAS_IMMEDIAT  - ooo_engine. in_RENAME_HAS_IMMEDIAT
     
    457458              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_IS_DELAY_SLOT",
    458459                                       dest,"out_DECOD_"                 +toString(k)+"_IS_DELAY_SLOT");
     460#ifdef DEBUG
     461              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_ADDRESS"      ,
     462                                       dest,"out_DECOD_"                 +toString(k)+"_ADDRESS"      );
     463#endif
    459464              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_ADDRESS_NEXT" ,
    460465                                       dest,"out_DECOD_"                 +toString(k)+"_ADDRESS_NEXT" );
     
    635640                COMPONENT_MAP(_component,src ,"out_NB_INST_"+toString(j)+"_"+toString(k)+"_COMMIT_MEM",
    636641                                         dest, "in_NB_INST_"                +toString(k)+"_COMMIT_MEM");
     642                COMPONENT_MAP(_component,src , "in_NB_INST_"+toString(j)+"_"+toString(k)+"_DECOD_ALL" ,
     643                                         dest,"out_NB_INST_"                +toString(k)+"_DECOD_ALL" );
    637644              }
    638645          }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters.cpp

    r101 r108  
    848848          for (uint32_t j=0; j<_nb_inst_issue[i]; ++j)
    849849            for (uint32_t k=0; k<_nb_read_bloc; ++k)
    850               // have route between this slot's ooo_engine and an read_bloc
    851               if (_table_dispatch [i][j][k])
    852                 {
    853                   uint32_t num_execute_loop = _link_read_unit_with_read_bloc [k].first;
    854                  
    855                   list_execute_loop[i].push_back(num_execute_loop);
    856                 }
    857 
    858           sort  (list_execute_loop[i].begin(),
    859                  list_execute_loop[i].end());
    860           unique(list_execute_loop[i].begin(),
    861                  list_execute_loop[i].end());
     850              {
     851                // have route between this slot's ooo_engine and an read_bloc
     852                if (_table_dispatch [i][j][k])
     853                  {
     854                    uint32_t num_execute_loop = _link_read_unit_with_read_bloc [k].first;
     855                   
     856                    list_execute_loop[i].push_back(num_execute_loop);
     857                  }
     858              }
     859               
     860          {
     861            sort  (list_execute_loop[i].begin(),
     862                   list_execute_loop[i].end());
     863            std::vector<uint32_t>::iterator it=std::unique(list_execute_loop[i].begin(),
     864                                                           list_execute_loop[i].end());
     865            list_execute_loop[i].erase(it,list_execute_loop[i].end());
     866          }
    862867
    863868          _ooo_engine_nb_execute_loop [i] = list_execute_loop[i].size();
     
    895900
    896901    ALLOC2(_ooo_engine_nb_inst_execute                    ,uint32_t         ,_nb_ooo_engine,_ooo_engine_nb_execute_loop[it1]);
    897    
     902
    898903    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
    899904      for (uint32_t j=0; j<_ooo_engine_nb_execute_loop[i]; ++j)
    900905        {
    901906          uint32_t num_execute_loop = _translate_ooo_engine_num_execute_loop [i][j];
    902          
     907
    903908          // each write_unit manage one instruction per cycle.
    904909          _ooo_engine_nb_inst_execute [i][j] = _nb_write_unit [num_execute_loop];
     
    10521057                }
    10531058            // sort and erase duplicate value
    1054            
    1055             sort  (list_thread_with_inst_issue [j].begin(),
    1056                    list_thread_with_inst_issue [j].end());
    1057             unique(list_thread_with_inst_issue [j].begin(),
    1058                    list_thread_with_inst_issue [j].end());
     1059            {
     1060              sort  (list_thread_with_inst_issue [j].begin(),
     1061                     list_thread_with_inst_issue [j].end());
     1062              std::vector<uint32_t>::iterator it=unique(list_thread_with_inst_issue [j].begin(),
     1063                                                        list_thread_with_inst_issue [j].end());
     1064              list_thread_with_inst_issue [j].erase(it,list_thread_with_inst_issue [j].end());
     1065            }
    10591066          }
    10601067
     
    10631070          {
    10641071            // sort and erase duplicate value
    1065             sort  (_list_load_store_unit_with_rename_unit  [i][j].begin(),
    1066                    _list_load_store_unit_with_rename_unit  [i][j].end());
    1067             unique(_list_load_store_unit_with_rename_unit  [i][j].begin(),
    1068                    _list_load_store_unit_with_rename_unit  [i][j].end());
    1069             sort  (_list_functionnal_unit_with_rename_unit [i][j].begin(),
    1070                    _list_functionnal_unit_with_rename_unit [i][j].end());
    1071             unique(_list_functionnal_unit_with_rename_unit [i][j].begin(),
    1072                    _list_functionnal_unit_with_rename_unit [i][j].end());
     1072            {
     1073              sort  (_list_load_store_unit_with_rename_unit  [i][j].begin(),
     1074                     _list_load_store_unit_with_rename_unit  [i][j].end());
     1075              std::vector<uint32_t>::iterator it=unique(_list_load_store_unit_with_rename_unit  [i][j].begin(),
     1076                                                        _list_load_store_unit_with_rename_unit  [i][j].end());
     1077              _list_load_store_unit_with_rename_unit  [i][j].erase(it,_list_load_store_unit_with_rename_unit  [i][j].end());
     1078            }
     1079            {
     1080              sort  (_list_functionnal_unit_with_rename_unit  [i][j].begin(),
     1081                     _list_functionnal_unit_with_rename_unit  [i][j].end());
     1082              std::vector<uint32_t>::iterator it=unique(_list_functionnal_unit_with_rename_unit  [i][j].begin(),
     1083                                                        _list_functionnal_unit_with_rename_unit  [i][j].end());
     1084              _list_functionnal_unit_with_rename_unit  [i][j].erase(it,_list_functionnal_unit_with_rename_unit  [i][j].end());
     1085            }
    10731086
    10741087            uint32_t num_rename_bloc = _link_rename_bloc_with_rename_unit[i][j];
     
    12271240    for (uint32_t i=0; i<_nb_execute_loop; ++i)
    12281241      {
    1229         sort  (_list_ooo_engine_with_execute_loop[i].begin(),
    1230                _list_ooo_engine_with_execute_loop[i].end());
    1231         unique(_list_ooo_engine_with_execute_loop[i].begin(),
    1232                _list_ooo_engine_with_execute_loop[i].end());
    1233    
    1234         sort  (_list_front_end_with_execute_loop [i].begin(),
    1235                _list_front_end_with_execute_loop [i].end());
    1236         unique(_list_front_end_with_execute_loop [i].begin(),
    1237                _list_front_end_with_execute_loop [i].end());
     1242        {
     1243          sort  (_list_ooo_engine_with_execute_loop[i].begin(),
     1244                 _list_ooo_engine_with_execute_loop[i].end());
     1245          std::vector<uint32_t>::iterator it=unique(_list_ooo_engine_with_execute_loop[i].begin(),
     1246                                                    _list_ooo_engine_with_execute_loop[i].end());
     1247          _list_ooo_engine_with_execute_loop[i].erase(it,_list_ooo_engine_with_execute_loop[i].end());
     1248        }
     1249        {
     1250          sort  (_list_front_end_with_execute_loop[i].begin(),
     1251                 _list_front_end_with_execute_loop[i].end());
     1252          std::vector<uint32_t>::iterator it=unique(_list_front_end_with_execute_loop[i].begin(),
     1253                                                    _list_front_end_with_execute_loop[i].end());
     1254          _list_front_end_with_execute_loop[i].erase(it,_list_front_end_with_execute_loop[i].end());
     1255        }
    12381256      }
    12391257
     
    13131331    ALLOC2(_execute_loop_nb_inst_retire                            ,uint32_t,_nb_execute_loop,_nb_read_unit[it1]);
    13141332   
     1333    log_printf(TRACE,Core,FUNCTION,_(" * execute_loop - Read_unit"));
    13151334    for (uint32_t i=0; i<_nb_execute_loop; ++i)
    1316       for (uint32_t j=0; j<_nb_read_unit[i]; ++j)
    1317         {
    1318           uint32_t num_read_bloc = _link_read_bloc_with_read_unit [i][j];
    1319    
    1320           _execute_loop_size_read_queue          [i][j] = _size_read_queue          [num_read_bloc];
    1321           _execute_loop_size_reservation_station [i][j] = _size_reservation_station [num_read_bloc];
    1322           _execute_loop_nb_inst_retire           [i][j] = _nb_inst_retire           [num_read_bloc];
    1323         }
    1324    
     1335      {
     1336        log_printf(TRACE,Core,FUNCTION,_("   * [%d] nb_read_unit : %d"),i,_nb_read_unit[i]);
     1337       
     1338        for (uint32_t j=0; j<_nb_read_unit[i]; ++j)
     1339          {
     1340            uint32_t num_read_bloc = _link_read_bloc_with_read_unit [i][j];
     1341
     1342            log_printf(TRACE,Core,FUNCTION,_("     * num_read_bloc : %d"),num_read_bloc);
     1343           
     1344            _execute_loop_size_read_queue          [i][j] = _size_read_queue          [num_read_bloc];
     1345            _execute_loop_size_reservation_station [i][j] = _size_reservation_station [num_read_bloc];
     1346            _execute_loop_nb_inst_retire           [i][j] = _nb_inst_retire_reservation_station [num_read_bloc];
     1347          }
     1348      }
     1349
    13251350    ALLOC2(_execute_loop_nb_inst_functionnal_unit                  ,uint32_t,_nb_execute_loop,_execute_loop_nb_functionnal_unit[it1]);
    13261351    ALLOC4(_execute_loop_timing                                    ,multi_execute_loop::execute_loop::execute_timing_t
     
    18021827       _nb_inst_branch_complete                      [i],
    18031828       _ooo_engine_nb_branch_speculated              [i],
     1829       _size_nb_inst_decod                              ,
    18041830       _nb_rename_unit_select                        [i],
    18051831       _nb_execute_loop_select                       [i],
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h

    r107 r108  
    1010#define MORPHEO_MAJOR_VERSION 0
    1111#define MORPHEO_MINOR_VERSION 2
    12 #define MORPHEO_REVISION      "107"
     12#define MORPHEO_REVISION      "108"
    1313#define MORPHEO_CODENAME      "Castor"
    1414
    15 #define MORPHEO_DATE_DAY      "11
     15#define MORPHEO_DATE_DAY      "12
    1616#define MORPHEO_DATE_MONTH    "02"
    1717#define MORPHEO_DATE_YEAR     "2009"
  • trunk/IPs/systemC/processor/Morpheo/Files/Instance_debug.cfg

    r107 r108  
    55  <thread id="0">             
    66    <parameter name="size_ifetch_queue"                     value="4" />
    7     <parameter name="nb_inst_fetch"                         value="2" />
    8     <parameter name="ras_size_queue"                        value="4" />
     7    <parameter name="nb_inst_fetch"                         value="4" />
     8    <parameter name="ras_size_queue"                        value="8" />
    99    <parameter name="upt_size_queue"                        value="4" />
    1010    <parameter name="ufpt_size_queue"                       value="4" />
     
    1616                                                           
    1717  <decod_bloc id="0">                                       
    18     <parameter name="size_decod_queue"                      value="4" />
    19     <parameter name="nb_inst_decod"                         value="1" />
     18    <parameter name="size_decod_queue"                      value="8" />
     19    <parameter name="nb_inst_decod"                         value="4" />
    2020    <parameter name="nb_context_select"                     value="1" />
    2121    <parameter name="context_select_priority"               value="1" />
     
    2424                                                           
    2525  <rename_bloc id="0">                                     
    26     <parameter name="nb_inst_insert"                        value="1" />
     26    <parameter name="nb_inst_insert"                        value="2" />
    2727    <parameter name="nb_inst_retire"                        value="1" />
    2828    <parameter name="rename_select_priority"                value="1" />
     
    3030    <parameter name="rename_select_nb_front_end_select"     value="1" />
    3131    <parameter name="nb_general_register"                   value="64"/>
    32     <parameter name="nb_special_register"                   value="4" />
    33     <parameter name="nb_reg_free"                           value="1" />
    34     <parameter name="nb_rename_unit_bank"                   value="1" />
     32    <parameter name="nb_special_register"                   value="16" />
     33    <parameter name="nb_reg_free"                           value="4" />
     34    <parameter name="nb_rename_unit_bank"                   value="4" />
    3535    <parameter name="size_read_counter"                     value="4" />
    3636  </rename_bloc>                                           
     
    4141    <parameter name="nb_inst_retire_reservation_station"    value="1" />
    4242  </read_bloc>                                             
     43
     44  <read_bloc id="1">                                       
     45    <parameter name="size_read_queue"                       value="4" />
     46    <parameter name="size_reservation_station"              value="4" />
     47    <parameter name="nb_inst_retire_reservation_station"    value="1" />
     48  </read_bloc>                                             
    4349                                                           
    4450  <write_bloc id="0">                                       
     
    5460  </write_bloc>                                             
    5561
     62  <write_bloc id="2">                                       
     63    <parameter name="size_write_queue"                      value="4" />
     64    <parameter name="size_execute_queue"                    value="4" />
     65    <parameter name="nb_bypass_write"                       value="0" />
     66  </write_bloc>                                             
     67
     68  <write_bloc id="3">                                       
     69    <parameter name="size_write_queue"                      value="4" />
     70    <parameter name="size_execute_queue"                    value="4" />
     71    <parameter name="nb_bypass_write"                       value="0" />
     72  </write_bloc>                                             
     73
    5674  <load_store_unit id="0">                                 
    57     <parameter name="size_store_queue"                      value="4" />
    58     <parameter name="size_load_queue"                       value="4" />
    59     <parameter name="size_speculative_access_queue"         value="2" />
    60     <parameter name="nb_port_check"                         value="1" />
     75    <parameter name="size_store_queue"                      value="8" />
     76    <parameter name="size_load_queue"                       value="8" />
     77    <parameter name="size_speculative_access_queue"         value="4" />
     78    <parameter name="nb_port_check"                         value="4" />
    6179    <parameter name="speculative_load"                      value="2" />
    6280    <parameter name="nb_bypass_memory"                      value="0" />
     
    7694    <parameter name="nb_inst_branch_decod"                  value="1" />
    7795    <parameter name="nb_inst_branch_update"                 value="1" />
    78     <parameter name="btb_size_queue"                        value="4" />
    79     <parameter name="btb_associativity"                     value="1" />
     96    <parameter name="btb_size_queue"                        value="64" />
     97    <parameter name="btb_associativity"                     value="4" />
    8098    <parameter name="btb_size_counter"                      value="2" />
    8199    <parameter name="btb_victim_scheme"                     value="3" />
    82     <parameter name="dir_predictor_scheme"                  value="3" />
     100    <parameter name="dir_predictor_scheme"                  value="2" />
    83101                                                           
    84102    <predictor id="0">                                     
     
    115133  <ooo_engine id="0">
    116134    <parameter name="nb_rename_unit"                        value="1" />
    117     <parameter name="nb_inst_issue"                         value="1" />
     135    <parameter name="nb_inst_issue"                         value="2" />
    118136    <parameter name="nb_inst_reexecute"                     value="1" />
    119137    <parameter name="nb_inst_commit"                        value="1" />
     
    121139    <parameter name="nb_rename_unit_select"                 value="1" />
    122140    <parameter name="nb_execute_loop_select"                value="1" />
    123     <parameter name="size_re_order_buffer"                  value="16" />
    124     <parameter name="nb_re_order_buffer_bank"               value="1" />
     141    <parameter name="size_re_order_buffer"                  value="32" />
     142    <parameter name="nb_re_order_buffer_bank"               value="4" />
    125143    <parameter name="commit_priority"                       value="1" />
    126144    <parameter name="commit_load_balancing"                 value="1" />
    127     <parameter name="size_issue_queue"                      value="4" />
    128     <parameter name="nb_issue_queue_bank"                   value="1" />
     145    <parameter name="size_issue_queue"                      value="8" />
     146    <parameter name="nb_issue_queue_bank"                   value="4" />
    129147    <parameter name="issue_priority"                        value="1" />
    130148    <parameter name="issue_load_balancing"                  value="1" />
     
    135153
    136154  <execute_loop id="0">
    137     <parameter name="nb_read_unit"                          value="1" />
    138     <parameter name="nb_write_unit"                         value="2" />
     155    <parameter name="nb_read_unit"                          value="2" />
     156    <parameter name="nb_write_unit"                         value="4" />
    139157    <parameter name="nb_gpr_bank"                           value="1" />
    140     <parameter name="nb_gpr_port_read_by_bank"              value="2" />
    141     <parameter name="nb_gpr_port_write_by_bank"             value="1" />
     158    <parameter name="nb_gpr_port_read_by_bank"              value="4" />
     159    <parameter name="nb_gpr_port_write_by_bank"             value="2" />
    142160    <parameter name="nb_spr_bank"                           value="1" />
    143     <parameter name="nb_spr_port_read_by_bank"              value="1" />
    144     <parameter name="nb_spr_port_write_by_bank"             value="1" />
     161    <parameter name="nb_spr_port_read_by_bank"              value="2" />
     162    <parameter name="nb_spr_port_write_by_bank"             value="2" />
    145163    <parameter name="execution_unit_to_write_unit_priority" value="1" />
    146164    <parameter name="read_unit_to_execution_unit_priority"  value="1" />
     
    171189  <link name="link_rename_unit_with_rename_bloc"       src="0"     dest="0.0" />
    172190  <link name="link_read_unit_with_read_bloc"           src="0"     dest="0.0" />
     191  <link name="link_read_unit_with_read_bloc"           src="1"     dest="0.1" />
    173192  <link name="link_write_unit_with_write_bloc"         src="0"     dest="0.0" />
    174193  <link name="link_write_unit_with_write_bloc"         src="1"     dest="0.1" />
     194  <link name="link_write_unit_with_write_bloc"         src="2"     dest="0.2" />
     195  <link name="link_write_unit_with_write_bloc"         src="3"     dest="0.3" />
    175196  <link name="link_decod_bloc_with_thread"             src="0"     dest="0"   />
    176197  <link name="link_rename_bloc_with_front_end"         src="0"     dest="0"   />
     
    181202
    182203  <link name="table_dispatch"                          src="0.0.0" dest="1"   />
     204  <link name="table_dispatch"                          src="0.1.0" dest="1"   />
     205  <link name="table_dispatch"                          src="0.0.1" dest="1"   />
     206  <link name="table_dispatch"                          src="0.1.1" dest="1"   />
    183207  <link name="link_read_bloc_and_load_store_unit"      src="0.0"   dest="1"   />
     208  <link name="link_read_bloc_and_load_store_unit"      src="1.0"   dest="1"   />
    184209  <link name="link_read_bloc_and_functionnal_unit"     src="0.0"   dest="1"   />
     210  <link name="link_read_bloc_and_functionnal_unit"     src="1.0"   dest="1"   />
    185211  <link name="link_write_bloc_and_load_store_unit"     src="0.0"   dest="1"   />
    186212  <link name="link_write_bloc_and_load_store_unit"     src="1.0"   dest="1"   />
     213  <link name="link_write_bloc_and_load_store_unit"     src="2.0"   dest="1"   />
     214  <link name="link_write_bloc_and_load_store_unit"     src="3.0"   dest="1"   />
    187215  <link name="link_write_bloc_and_functionnal_unit"    src="0.0"   dest="1"   />
    188216  <link name="link_write_bloc_and_functionnal_unit"    src="1.0"   dest="1"   />
     217  <link name="link_write_bloc_and_functionnal_unit"    src="2.0"   dest="1"   />
     218  <link name="link_write_bloc_and_functionnal_unit"    src="3.0"   dest="1"   />
    189219  <link name="link_thread_and_functionnal_unit"        src="0.0"   dest="1"   />
    190220
  • trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.sim

    r107 r108  
    33<parameters >
    44
    5   <parameter name="use_systemc"                value="1" />
    6   <parameter name="use_vhdl"                   value="0" />
    7   <parameter name="use_vhdl_testbench"         value="0" />
    8   <parameter name="use_vhdl_testbench_assert"  value="0" />
    9   <parameter name="use_position"               value="0" />
    10   <parameter name="use_statistics"             value="1" />
    11   <parameter name="use_information"            value="0" />
    12   <parameter name="use_header"                 value="0" />
    13                                                
    14   <parameter name="statistics_cycle_start"     value="0" />
    15   <parameter name="statistics_period"          value="0" />
    16                                                
    17   <parameter name="simulation_nb_cycle"        value="50000" />
    18   <parameter name="simulation_nb_instruction"  value="0"   />
     5  <parameter  name="use_systemc"                            value="1" />
     6  <parameter  name="use_vhdl"                               value="0" />
     7  <parameter  name="use_vhdl_testbench"                     value="0" />
     8  <parameter  name="use_vhdl_testbench_assert"              value="0" />
     9  <parameter  name="use_position"                           value="0" />
     10  <parameter  name="use_statistics"                         value="1" />
     11  <parameter  name="use_information"                        value="0" />
     12  <parameter  name="use_header"                             value="0" />
     13                                                           
     14  <parameter  name="statistics_cycle_start"                 value="0" />
     15  <parameter  name="statistics_period"                      value="0" />
     16                                                           
     17  <parameter  name="simulation_nb_cycle"                    value="60000" />
     18  <parameter  name="simulation_nb_instruction"              value="0"   />
     19                                                           
     20  <parameter  name="directory_statistics"                   value="." />
     21  <parameter  name="directory_vhdl"                         value="." />
     22  <parameter  name="directory_position"                     value="." />
     23  <parameter  name="directory_log"                          value="." />
     24                                                           
     25  <parameter  name="debug_level"                            value="0"/>
     26  <parameter  name="debug_cycle_start"                      value="0" />
     27  <parameter  name="debug_cycle_stop"                       value="400" />
     28  <parameter  name="debug_have_log_file"                    value="0" />
    1929
    20   <parameter name="directory_statistics"       value="." />
    21   <parameter name="directory_vhdl"             value="." />
    22   <parameter name="directory_position"         value="." />
    23   <parameter name="directory_log"              value="." />
    24 
    25   <parameter name="debug_level"                value="0" />
    26   <parameter name="debug_cycle_start"          value="310" />
    27   <parameter name="debug_cycle_stop"           value="350" />
    28   <parameter name="debug_have_log_file"        value="0" />
     30  <simulation component="Counter"                           value="systemc" />
     31  <simulation component="Priority"                          value="systemc" />
     32  <simulation component="Queue_Control"                     value="systemc" />         
     33  <simulation component="Queue"                             value="systemc" />
     34  <simulation component="RegisterFile_Monolithic"           value="systemc" />
     35  <simulation component="RegisterFile_Multi_Banked"         value="systemc" />
     36  <simulation component="RegisterFile"                      value="systemc" />
     37  <simulation component="Select_Priority_Fixed"             value="systemc" />
     38  <simulation component="Select"                            value="systemc" />
     39  <simulation component="Shifter"                           value="systemc" />
     40  <simulation component="Sort"                              value="systemc" />
     41  <simulation component="Victim_Pseudo_LRU"                 value="systemc" />
     42  <simulation component="Victim"                            value="systemc" />
     43  <simulation component="Execute_loop_Glue"                 value="systemc" />
     44  <simulation component="Functionnal_unit"                  value="systemc" />
     45  <simulation component="Load_store_unit"                   value="systemc" />
     46  <simulation component="Read_queue"                        value="systemc" />
     47  <simulation component="Reservation_station"               value="systemc" />
     48  <simulation component="Read_unit"                         value="systemc" />
     49  <simulation component="Execute_queue"                     value="systemc" />
     50  <simulation component="Write_queue"                       value="systemc" />
     51  <simulation component="Write_unit"                        value="systemc" />
     52  <simulation component="Execution_unit_to_Write_unit"      value="systemc" />
     53  <simulation component="Read_unit_to_Execution_unit"       value="systemc" />
     54  <simulation component="Register_unit_Glue"                value="systemc" />
     55  <simulation component="Register_unit"                     value="systemc" />
     56  <simulation component="Execute_loop"                      value="systemc" />
     57  <simulation component="Commit_unit"                       value="systemc" />
     58  <simulation component="Issue_queue"                       value="systemc" />
     59  <simulation component="OOO_Engine_Glue"                   value="systemc" />
     60  <simulation component="Reexecute_unit"                    value="systemc" />
     61  <simulation component="Load_Store_pointer_unit"           value="systemc" />
     62  <simulation component="Dependency_checking_unit"          value="systemc" />
     63  <simulation component="Free_List_unit"                    value="systemc" />
     64  <simulation component="Register_Address_Translation_unit" value="systemc" />
     65  <simulation component="Register_translation_unit_Glue"    value="systemc" />
     66  <simulation component="Stat_List_unit"                    value="systemc" />
     67  <simulation component="Register_translation_unit"         value="systemc" />
     68  <simulation component="Rename_unit_Glue"                  value="systemc" />
     69  <simulation component="Rename_select"                     value="systemc" />
     70  <simulation component="Rename_unit"                       value="systemc" />
     71  <simulation component="Special_Register_unit"             value="systemc" />
     72  <simulation component="OOO_Engine"                        value="systemc" />
     73  <simulation component="Context_State"                     value="systemc" />
     74  <simulation component="Decod"                             value="systemc" />
     75  <simulation component="Decod_queue"                       value="systemc" />
     76  <simulation component="Decod_unit"                        value="systemc" />
     77  <simulation component="Front_end_Glue"                    value="systemc" />
     78  <simulation component="Address_management"                value="systemc" />
     79  <simulation component="Ifetch_queue"                      value="systemc" />
     80  <simulation component="Ifetch_unit_Glue"                  value="systemc" />
     81  <simulation component="Ifetch_unit"                       value="systemc" />
     82  <simulation component="Branch_Target_Buffer_Glue"         value="systemc" />
     83  <simulation component="Branch_Target_Buffer_Register"     value="systemc" />
     84  <simulation component="Branch_Target_Buffer"              value="systemc" />
     85  <simulation component="Direction_Glue"                    value="systemc" />
     86  <simulation component="Direction"                         value="systemc" />
     87  <simulation component="Prediction_unit_Glue"              value="systemc" />
     88  <simulation component="Return_Address_Stack"              value="systemc" />
     89  <simulation component="Update_Prediction_Table"           value="systemc" />
     90  <simulation component="Prediction_unit"                   value="systemc" />
     91  <simulation component="Front_end"                         value="systemc" />
     92  <simulation component="Icache_Access"                     value="systemc" />
     93  <simulation component="Dcache_Access"                     value="systemc" />
     94  <simulation component="Core_Glue"                         value="systemc" />
     95  <simulation component="Core"                              value="systemc" />
     96  <simulation component="TopLevel"                          value="systemc" />
    2997
    3098</parameters>
  • trunk/Makefile.flags

    r98 r108  
    1717                                        -DDEBUG=DEBUG_TRACE     \
    1818                                        -DSTATISTICS            \
    19                                         -DVHDL                  \
    20                                         -DVHDL_TESTBENCH        \
    21                                         -DVHDL_TESTBENCH_ASSERT \
    2219                                        -DTRANSLATION           
    2320
     21#                                       -DVHDL                  \
     22#                                       -DVHDL_TESTBENCH        \
     23#                                       -DVHDL_TESTBENCH_ASSERT \
    2424#                                       -DPRINT_COLOR           \
    2525#                                       -DPOSITION              \
  • trunk/Platforms/Test/Makefile

    r101 r108  
    3636DIR_BIN                         =       $(DIR_TMP)/bin
    3737DIR_LOG                         =       $(DIR_TMP)/log
    38 DIR_DATA                        =       ./data
     38DIR_DATA_TEST                   =       ./data_test
     39DIR_DATA_BENCH                  =       ./data_bench
    3940DIR_SOFT                        =       $(MORPHEO_TOPLEVEL)/Softwares
    4041
     
    5758
    5859OBJECTS                         =       $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp))
    59 LOGS                            =       $(patsubst $(DIR_DATA)/%.cfg,$(DIR_LOG)/%.log,$(wildcard $(DIR_DATA)/*.cfg))
    60 DEBUG_CFG                       =       $(DIR_DATA)/debug.cfg
     60LOGS                            =       $(patsubst $(DIR_DATA_TEST)/%.cfg,$(DIR_LOG)/%.log,$(wildcard $(DIR_DATA_TEST)/*.cfg))
     61BENCHS                          =       $(patsubst $(DIR_DATA_BENCH)/%.cfg,$(DIR_LOG)/%.log,$(wildcard $(DIR_DATA_BENCH)/*.cfg))
     62DEBUG_CFG                       =       $(DIR_DATA_TEST)/debug.cfg
    6163DEBUG_LOG                       =       $(DIR_LOG)/debug.log
    6264
     
    9395vpath   %.cpp   $(DIR_SRC)
    9496vpath   %.o     $(DIR_OBJ)
    95 vpath   %.cfg   $(DIR_DATA)
     97vpath   %.cfg   $(DIR_DATA_TEST) $(DIR_DATA_BENCH)
    9698
    9799.PRECIOUS                       : $(DIR_OBJ)/%.o $(DIR_BIN)/%.x $(DIR_LOG)/%.log
     
    106108                                $(CXX) $(PLATFORMS_L_FLAGS)      -o $@ $^ $(LIBNAME);
    107109
    108 run                             : $(DIR_LOG) all
     110test                            : $(DIR_LOG) all
    109111                                @\
    110112                                declare logs;                                           \
     
    132134                                fi;
    133135
    134 execute                         : run
     136bench                           : $(DIR_LOG) all
     137                                @\
     138                                declare logs="$(BENCHS)";                               \
     139                                $(MAKE) $$logs;
     140
     141execute                         : bench
    135142
    136143$(DIR_LOG)/%.log                : %.cfg
     
    190197                                @\
    191198                                $(ECHO) "Delete     temporary files in directory $(PWD)";\
    192                                 $(RM)   *~ $(DIR_SRC)/*~ $(DIR_INC)/*~ $(DIR_DATA)/*~ *core* tty* *.vhdl *.log *.stat *.pos\
     199                                $(RM)   *~ $(DIR_SRC)/*~ $(DIR_INC)/*~ $(DIR_DATA_TEST)/*~ $(DIR_DATA_BENCH)/*~ *core* tty* *.vhdl *.log *.stat *.pos\
    193200                                        $(DIR_OBJ) $(DIR_BIN) $(DIR_LOG);
    194201
     
    206213                                $(ECHO) "";\
    207214                                $(ECHO) " * all (default rules) : create software";\
    208                                 $(ECHO) " * run                 : execute platforms";\
     215                                $(ECHO) " * test                : execute platforms with test configuration";\
     216                                $(ECHO) " * bench               : execute platforms with bench configuration";\
    209217                                $(ECHO) " * lib                 : make library";\
    210218                                $(ECHO) " * soft                : make software";\
    211                                 $(ECHO) " * execute             : cf 'make run'";\
     219                                $(ECHO) " * execute             : cf 'make bench'";\
    212220                                $(ECHO) " * clean               : erase temporary files";\
    213221                                $(ECHO) " * clean_all           : erase generated files";\
  • trunk/Softwares/Common/src/c/func_factoriel.c

    r102 r108  
    99  if ( x <= 1)
    1010    return 1;
     11
     12  unsigned int res = mul_soft (x , factoriel_recursif (x-1));
    1113 
    12   return (mul_soft (x , factoriel_recursif (x-1) ) );
     14  return res;
    1315}
    1416
     
    3133void test_factoriel_iteratif (int x)
    3234{
     35  int x_min = 0;
    3336  int x_max = 12;
    3437  int wait [x_max+1];
     
    4851  wait[12] = 479001600; // 1c8cfc00
    4952 
    50   for (int i = 0; i <= ((x<x_max)?x:x_max); i ++)
     53  for (int i = x_min; i <= ((x<x_max)?x:x_max); i ++)
    5154    if (factoriel_iteratif (i) != wait[i]) quit(i+1);
    5255}
     
    5457void test_factoriel_recursif (int x)
    5558{
     59  int x_min = 0;
    5660  int x_max = 12;
    5761  int wait [x_max+1];
     
    7175  wait[12] = 479001600; // 1c8cfc00
    7276 
    73   for (int i = 0; i <= ((x<x_max)?x:x_max); i ++)
     77  for (int i = x_min; i <= ((x<x_max)?x:x_max); i ++)
    7478    if (factoriel_recursif (i) != wait[i]) quit(i+1);
    7579}
Note: See TracChangeset for help on using the changeset viewer.