Ignore:
Timestamp:
Feb 5, 2009, 12:18:31 PM (15 years ago)
Author:
rosiere
Message:

1) Bug fix : Load Miss Speculation (in Commit_unit, Update Prediction Table and Context State)
2) Change address, in rob write address_next.
3) Move Meta_Predictor in save directory

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end
Files:
36 edited
9 copied
1 moved

Legend:

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

    r101 r105  
    7373  ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_IS_DELAY_SLOT     ," in_COMMIT_EVENT_IS_DELAY_SLOT     ",Tcontrol_t   );
    7474  ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS           ," in_COMMIT_EVENT_ADDRESS           ",Taddress_t   );
     75  ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL  ," in_COMMIT_EVENT_ADDRESS_EPCR_VAL  ",Tcontrol_t   );
    7576  ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR      ," in_COMMIT_EVENT_ADDRESS_EPCR      ",Taddress_t   );
    7677  ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL  ," in_COMMIT_EVENT_ADDRESS_EEAR_VAL  ",Tcontrol_t   );
     
    155156  INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_IS_DELAY_SLOT     );
    156157  INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_ADDRESS           );
     158  INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_ADDRESS_EPCR_VAL  );
    157159  INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_ADDRESS_EPCR      );
    158160  INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_ADDRESS_EEAR_VAL  );
     
    214216
    215217  const bool test1  = true;
    216   const bool test2  = true;
     218  const bool test2  = false;
    217219  const bool test3  = true;
    218220  const bool test4  = true;
     
    925927          in_COMMIT_EVENT_ADDRESS          ->write(0xa00);
    926928          in_COMMIT_EVENT_ADDRESS_EPCR     ->write(0xb00);
     929          in_COMMIT_EVENT_ADDRESS_EPCR_VAL ->write(0);
    927930          in_COMMIT_EVENT_ADDRESS_EEAR     ->write(0xc00);
    928931          in_COMMIT_EVENT_ADDRESS_EEAR_VAL ->write(0);
     
    10191022          in_COMMIT_EVENT_ADDRESS          ->write(0xd00);
    10201023          in_COMMIT_EVENT_ADDRESS_EPCR     ->write(0xe00);
     1024          in_COMMIT_EVENT_ADDRESS_EPCR_VAL ->write(0);
    10211025          in_COMMIT_EVENT_ADDRESS_EEAR     ->write(0xf00);
    10221026          in_COMMIT_EVENT_ADDRESS_EEAR_VAL ->write(0);
     
    11131117          in_COMMIT_EVENT_ADDRESS          ->write(0xa00);
    11141118          in_COMMIT_EVENT_ADDRESS_EPCR     ->write(0xb00);
     1119          in_COMMIT_EVENT_ADDRESS_EPCR_VAL ->write(1);
    11151120          in_COMMIT_EVENT_ADDRESS_EEAR     ->write(0xc00);
    11161121          in_COMMIT_EVENT_ADDRESS_EEAR_VAL ->write(1);
     
    12071212          in_COMMIT_EVENT_ADDRESS          ->write(0xd00);
    12081213          in_COMMIT_EVENT_ADDRESS_EPCR     ->write(0xe00);
     1214          in_COMMIT_EVENT_ADDRESS_EPCR_VAL ->write(1);
    12091215          in_COMMIT_EVENT_ADDRESS_EEAR     ->write(0xf00);
    12101216          in_COMMIT_EVENT_ADDRESS_EEAR_VAL ->write(1);
     
    13251331  DELETE_SC_SIGNAL ( in_COMMIT_EVENT_IS_DELAY_SLOT     );
    13261332  DELETE_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS           );
     1333  DELETE_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL  );
    13271334  DELETE_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR      );
    13281335  DELETE_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL  );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Context_State.h

    r101 r105  
    9191  public    : SC_IN (Tcontrol_t         )   *  in_COMMIT_EVENT_IS_DELAY_SLOT         ;
    9292  public    : SC_IN (Taddress_t         )   *  in_COMMIT_EVENT_ADDRESS               ;
     93  public    : SC_IN (Tcontrol_t         )   *  in_COMMIT_EVENT_ADDRESS_EPCR_VAL      ;
    9394  public    : SC_IN (Taddress_t         )   *  in_COMMIT_EVENT_ADDRESS_EPCR          ;
    9495  public    : SC_IN (Tcontrol_t         )   *  in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Types.h

    r101 r105  
    2525  typedef enum
    2626    {
    27       CONTEXT_STATE_OK              , // none event
    28       CONTEXT_STATE_KO_EXCEP        , // wait end of event (exception)
    29       CONTEXT_STATE_KO_EXCEP_ADDR   , // update address manager
    30       CONTEXT_STATE_KO_EXCEP_SPR    , // update spr (epc, esr, sr[DSX])
    31       CONTEXT_STATE_KO_MISS_ADDR    , // update address manager
    32       CONTEXT_STATE_KO_MISS_WAITEND , // wait end of event (miss (branch, load))
    33 //    CONTEXT_STATE_KO_MSYNC        , // wait completion of all memory operation
    34 //    CONTEXT_STATE_KO_MSYNC_ISSUE  , // issue msync operation
    35       CONTEXT_STATE_KO_MSYNC_EXEC   , // wait completion of     msync  operation
    36 //    CONTEXT_STATE_KO_PSYNC        , // wait completion of all        operation and after flush pipeline
    37       CONTEXT_STATE_KO_PSYNC_FLUSH  , // wait completion of all
    38       CONTEXT_STATE_KO_PSYNC_ADDR   , // wait completion of all
    39 //    CONTEXT_STATE_KO_CSYNC        , // wait completion of all        operation and after flush pipeline and flush ALL units (MMU, cache ...)
    40       CONTEXT_STATE_KO_CSYNC_FLUSH  ,
    41       CONTEXT_STATE_KO_CSYNC_ADDR   ,
    42 //    CONTEXT_STATE_KO_SPR          , // wait completion of all        operation
    43 //    CONTEXT_STATE_KO_SPR_ISSUE    , // issue spr's access
    44       CONTEXT_STATE_KO_SPR_EXEC       // wait completion of all        operation (spr access)
     27      CONTEXT_STATE_OK                    , // none event
     28      CONTEXT_STATE_KO_EXCEP              , // wait end of event (exception)
     29      CONTEXT_STATE_KO_EXCEP_ADDR         , // update address manager
     30      CONTEXT_STATE_KO_EXCEP_SPR          , // update spr (epc, esr, sr[DSX])
     31      CONTEXT_STATE_KO_MISS_BRANCH_ADDR   , // update address manager
     32      CONTEXT_STATE_KO_MISS_BRANCH_WAITEND, // wait end of event (miss branch)
     33      CONTEXT_STATE_KO_MISS_LOAD_ADDR     , // update address manager
     34      CONTEXT_STATE_KO_MISS_LOAD_WAITEND  , // wait end of event (miss load))
     35//    CONTEXT_STATE_KO_MSYNC              , // wait completion of all memory operation
     36//    CONTEXT_STATE_KO_MSYNC_ISSUE        , // issue msync operation
     37      CONTEXT_STATE_KO_MSYNC_EXEC         , // wait completion of     msync  operation
     38//    CONTEXT_STATE_KO_PSYNC              , // wait completion of all        operation and after flush pipeline
     39      CONTEXT_STATE_KO_PSYNC_FLUSH        , // wait completion of all
     40      CONTEXT_STATE_KO_PSYNC_ADDR         , // wait completion of all
     41//    CONTEXT_STATE_KO_CSYNC              , // wait completion of all        operation and after flush pipeline and flush ALL units (MMU, cache ...)
     42      CONTEXT_STATE_KO_CSYNC_FLUSH        ,
     43      CONTEXT_STATE_KO_CSYNC_ADDR         ,
     44//    CONTEXT_STATE_KO_SPR                , // wait completion of all        operation
     45//    CONTEXT_STATE_KO_SPR_ISSUE          , // issue spr's access
     46      CONTEXT_STATE_KO_SPR_EXEC             // wait completion of all        operation (spr access)
    4547    } context_state_t;
    4648
     
    5658    switch (x)
    5759      {
    58       case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_OK              : return "context_state_ok"             ; break;
    59       case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP        : return "context_state_ko_excep"       ; break;
    60       case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP_ADDR   : return "context_state_ko_excep_addr"  ; break;
    61       case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP_SPR    : return "context_state_ko_excep_spr"   ; break;
    62       case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_ADDR    : return "context_state_ko_miss_addr"   ; break;
    63       case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_WAITEND : return "context_state_ko_miss_waitend"; break;
    64 //       case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC        : return "context_state_ko_msync"       ; break;
    65 //    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC_ISSUE  : return "context_state_ko_msync_issue" ; break;
    66       case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC_EXEC   : return "context_state_ko_msync_exec"  ; break;
    67 //    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC        : return "context_state_ko_psync"       ; break;
    68       case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC_FLUSH  : return "context_state_ko_psync_flush" ; break;
    69       case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC_ADDR   : return "context_state_ko_psync_addr"  ; break;
    70 //    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC        : return "context_state_ko_csync"       ; break;
    71       case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC_FLUSH  : return "context_state_ko_csync_flush" ; break;
    72       case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC_ADDR   : return "context_state_ko_csync_addr"  ; break;
    73 //    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR          : return "context_state_ko_spr"         ; break;
    74 //    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR_ISSUE    : return "context_state_ko_spr_issue"   ; break;
    75       case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR_EXEC     : return "context_state_ko_spr_exec"    ; break;
     60      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_OK                     : return "context_state_ok"                    ; break;
     61      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP               : return "context_state_ko_excep"              ; break;
     62      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP_ADDR          : return "context_state_ko_excep_addr"         ; break;
     63      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP_SPR           : return "context_state_ko_excep_spr"          ; break;
     64      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;
     65      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;
     66      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;
     67      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;
     68//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC               : return "context_state_ko_msync"              ; break;
     69//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC_ISSUE         : return "context_state_ko_msync_issue"        ; break;
     70      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC_EXEC          : return "context_state_ko_msync_exec"         ; break;
     71//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC               : return "context_state_ko_psync"              ; break;
     72      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC_FLUSH         : return "context_state_ko_psync_flush"        ; break;
     73      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC_ADDR          : return "context_state_ko_psync_addr"         ; break;
     74//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC               : return "context_state_ko_csync"              ; break;
     75      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC_FLUSH         : return "context_state_ko_csync_flush"        ; break;
     76      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC_ADDR          : return "context_state_ko_csync_addr"         ; break;
     77//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR                 : return "context_state_ko_spr"                ; break;
     78//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR_ISSUE           : return "context_state_ko_spr_issue"          ; break;
     79      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR_EXEC            : return "context_state_ko_spr_exec"           ; break;
    7680      default    : return ""      ; break;
    7781      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_allocation.cpp

    r98 r105  
    9595      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_IS_DELAY_SLOT         ,"is_delay_slot"   ,Tcontrol_t         ,1);
    9696      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS               ,"address"         ,Taddress_t         ,_param->_size_instruction_address);
     97      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL      ,"address_epcr_val",Tcontrol_t         ,1);
    9798      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EPCR          ,"address_epcr"    ,Taddress_t         ,_param->_size_instruction_address);
    9899      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ,"address_eear_val",Tcontrol_t         ,1);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_deallocation.cpp

    r98 r105  
    5353        DELETE_SIGNAL ( in_COMMIT_EVENT_IS_DELAY_SLOT         ,1);
    5454        DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS               ,_param->_size_instruction_address);
     55        DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL      ,_param->_size_instruction_address);
    5556        DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR          ,_param->_size_instruction_address);
    5657        DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ,_param->_size_instruction_address);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMoore.cpp

    r101 r105  
    3131        context_state_t state = reg_STATE [i];
    3232
    33         Tcontrol_t val              = ((state == CONTEXT_STATE_KO_EXCEP_ADDR) or
    34                                        (state == CONTEXT_STATE_KO_MISS_ADDR ) or
    35                                        (state == CONTEXT_STATE_KO_PSYNC_ADDR) or
     33        Tcontrol_t val              = ((state == CONTEXT_STATE_KO_EXCEP_ADDR      ) or
     34                                       (state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) or
     35                                       (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR  ) or
     36                                       (state == CONTEXT_STATE_KO_PSYNC_ADDR      ) or
    3637                                       (state == CONTEXT_STATE_KO_CSYNC_ADDR));
    3738       
     
    4041        Taddress_t    address          = reg_EVENT_ADDRESS [i] | (((state == CONTEXT_STATE_KO_EXCEP_ADDR) and PORT_READ(in_SPR_SR_EPH [i]))?(0xF000000>>2):0);
    4142        Taddress_t    address_next     = reg_EVENT_ADDRESS_EPCR [i];
    42         Tcontrol_t    address_next_val = (state == CONTEXT_STATE_KO_MISS_ADDR) and (reg_EVENT_ADDRESS_EPCR_VAL [i]);
    43         Tcontrol_t    is_ds_take       = (state == CONTEXT_STATE_KO_MISS_ADDR) and (reg_EVENT_IS_DS_TAKE       [i]);
     43        Tcontrol_t    address_next_val = (state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) and (reg_EVENT_ADDRESS_EPCR_VAL [i]);
     44        Tcontrol_t    is_ds_take       = (state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) and (reg_EVENT_IS_DS_TAKE       [i]);
    4445        // excep : address exception
    4546        // miss  : address delay_slot, and address dest
     
    5152        switch (state)
    5253          {
    53           case CONTEXT_STATE_KO_EXCEP_ADDR : (type = EVENT_TYPE_EXCEPTION         ); break;
    54           case CONTEXT_STATE_KO_MISS_ADDR  : (type = EVENT_TYPE_MISS_SPECULATION  ); break;
    55           case CONTEXT_STATE_KO_PSYNC_ADDR : (type = EVENT_TYPE_PSYNC             ); break;
    56           case CONTEXT_STATE_KO_CSYNC_ADDR : (type = EVENT_TYPE_CSYNC             ); break;
    57           default                          : (type = EVENT_TYPE_NONE              ); break;
     54          case CONTEXT_STATE_KO_EXCEP_ADDR      : (type = EVENT_TYPE_EXCEPTION              ); break;
     55          case CONTEXT_STATE_KO_MISS_BRANCH_ADDR: (type = EVENT_TYPE_BRANCH_MISS_SPECULATION); break;
     56          case CONTEXT_STATE_KO_MISS_LOAD_ADDR  : (type = EVENT_TYPE_LOAD_MISS_SPECULATION  ); break;
     57          case CONTEXT_STATE_KO_PSYNC_ADDR      : (type = EVENT_TYPE_PSYNC                  ); break;
     58          case CONTEXT_STATE_KO_CSYNC_ADDR      : (type = EVENT_TYPE_CSYNC                  ); break;
     59          default                               : (type = EVENT_TYPE_NONE                   ); break;
    5860          }
    5961//      (type = EVENT_TYPE_SPR_ACCESS        );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp

    r101 r105  
    6565                  break;
    6666                }
    67               case CONTEXT_STATE_KO_MISS_WAITEND :
     67              case CONTEXT_STATE_KO_MISS_BRANCH_WAITEND :
    6868                {
    6969                  // Wait end of all instruction
     
    7171                   
    7272//                  state = CONTEXT_STATE_OK; // @@@ TODO : make MISS fast (miss decod)
    73                     state = CONTEXT_STATE_KO_MISS_ADDR;
     73                    state = CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
     74                  break;
     75                }
     76              case CONTEXT_STATE_KO_MISS_LOAD_WAITEND :
     77                {
     78                  // Wait end of all instruction
     79                  if (inst_all == 0)
     80                    state = CONTEXT_STATE_KO_MISS_LOAD_ADDR;
     81
    7482                  break;
    7583                }
     
    7987                  break;
    8088                }
    81               case CONTEXT_STATE_KO_MISS_ADDR    :
     89              case CONTEXT_STATE_KO_MISS_BRANCH_ADDR    :
     90                {
     91                  // nothing, wait the update of internal register (pc)
     92                  break;
     93                }
     94              case CONTEXT_STATE_KO_MISS_LOAD_ADDR    :
    8295                {
    8396                  // nothing, wait the update of internal register (pc)
     
    198211
    199212              // priority : miss > excep > spr/sync
    200               uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_ADDR) or (state == CONTEXT_STATE_KO_MISS_WAITEND))?2:((state == EVENT_TYPE_EXCEPTION)?1:0);
     213              uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) or (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR) or (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND) or (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND))?2:((state == EVENT_TYPE_EXCEPTION)?1:0);
    201214              uint8_t    priority1  = 2; // miss
    202215
     
    212225                {
    213226                  Tcontrol_t dest_val = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST_VAL[i]);
    214 //                reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_ADDR;
    215                   reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_WAITEND; //@@@ TODO : make MISS fast (miss decod)
     227//                reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
     228                  reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_BRANCH_WAITEND; //@@@ TODO : make MISS fast (miss decod)
    216229                  reg_EVENT_ADDRESS          [i] =  PORT_READ(in_BRANCH_EVENT_ADDRESS_SRC  [i])+1; // address delay slot
    217230                  reg_EVENT_ADDRESS_EPCR     [i] =  PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST [i]);   // address_next
     
    249262             
    250263              // miss > excep > spr/sync
    251               uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_ADDR) or (state == CONTEXT_STATE_KO_MISS_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
     264              uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) or (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR) or (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND) or (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
    252265              uint8_t    priority1  = (state == EVENT_TYPE_EXCEPTION)?1:0;
    253266
     
    258271              bool       is_valid   = ((state == CONTEXT_STATE_OK) or
    259272                                       (depth1< depth0) or
    260                                        ((depth1==depth0) and (priority1>priority0)));
     273                                       ((depth1==depth0) and (priority1>=priority0)));
    261274
    262275              if (is_valid)
     
    325338                      }               
    326339                    case EVENT_TYPE_NONE               :
    327                     case EVENT_TYPE_MISS_SPECULATION   :
    328                     case EVENT_TYPE_BRANCH_NO_ACCURATE :
     340                    case EVENT_TYPE_BRANCH_MISS_SPECULATION   :
     341                    case EVENT_TYPE_LOAD_MISS_SPECULATION   :
     342//                     case EVENT_TYPE_BRANCH_NO_ACCURATE :
    329343                    default :
    330344                      {
     
    359373            Tdepth_t   depth_max  = _param->_array_size_depth [context];
    360374           
    361 //             Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));
    362 //             Tdepth_t   depth1     = (depth    >=depth_min)?(depth    -depth_min):((depth    +depth_max-depth_min));
     375//          Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));
     376//          Tdepth_t   depth1     = (depth    >=depth_min)?(depth    -depth_min):((depth    +depth_max-depth_min));
    363377            Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max));
    364378            Tdepth_t   depth1     = (depth    >=depth_min)?(depth    ):((depth    +depth_max));
     
    368382           
    369383            // miss > excep > spr/sync
    370             uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_ADDR) or (state == CONTEXT_STATE_KO_MISS_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
    371             uint8_t    priority1  = 1; // exception
     384            uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) or (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR) or (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND) or (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
     385            uint8_t    priority1  = (state == EVENT_TYPE_EXCEPTION)?1:2; // else load_miss_speculation (EVENT_TYPE_MISS_SPECULATION)
    372386
    373387            // is_valid = can modify local information
     
    377391            bool       is_valid   = ((state == CONTEXT_STATE_OK) or
    378392                                     (depth1< depth0) or
    379                                      ((depth1==depth0) and (priority1>priority0)));
     393                                     ((depth1==depth0) and (priority1>=priority0)));
    380394
    381395            if (is_valid)
     
    386400                switch (type)
    387401                  {
    388                   case EVENT_TYPE_EXCEPTION          : {state_next = CONTEXT_STATE_KO_EXCEP; break;}
    389                   case EVENT_TYPE_SPR_ACCESS         :
    390                   case EVENT_TYPE_MSYNC              :
    391                   case EVENT_TYPE_PSYNC              :
    392                   case EVENT_TYPE_CSYNC              :
    393                   case EVENT_TYPE_NONE               :
    394                   case EVENT_TYPE_MISS_SPECULATION   :
    395                   case EVENT_TYPE_BRANCH_NO_ACCURATE :
     402                  case EVENT_TYPE_EXCEPTION               : {state_next = CONTEXT_STATE_KO_EXCEP;             break;}
     403                  case EVENT_TYPE_LOAD_MISS_SPECULATION   : {state_next = CONTEXT_STATE_KO_MISS_LOAD_WAITEND; break;}
     404                  case EVENT_TYPE_BRANCH_MISS_SPECULATION :
     405                  case EVENT_TYPE_SPR_ACCESS              :
     406                  case EVENT_TYPE_MSYNC                   :
     407                  case EVENT_TYPE_PSYNC                   :
     408                  case EVENT_TYPE_CSYNC                   :
     409                  case EVENT_TYPE_NONE                    :
     410//                case EVENT_TYPE_BRANCH_NO_ACCURATE      :
    396411                  default :
    397412                    {
     
    402417                reg_EVENT_ADDRESS          [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS          );
    403418                reg_EVENT_ADDRESS_EPCR     [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS_EPCR     );
    404                 reg_EVENT_ADDRESS_EPCR_VAL [context] = 1;
     419                reg_EVENT_ADDRESS_EPCR_VAL [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS_EPCR_VAL );
    405420                reg_EVENT_ADDRESS_EEAR     [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS_EEAR     );
    406421                reg_EVENT_ADDRESS_EEAR_VAL [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS_EEAR_VAL );
    407422                reg_EVENT_IS_DELAY_SLOT    [context] = PORT_READ(in_COMMIT_EVENT_IS_DELAY_SLOT    );
    408               //reg_EVENT_IS_DS_TAKE       [context] = 0;
     423                reg_EVENT_IS_DS_TAKE       [context] = 0;
    409424                reg_EVENT_DEPTH            [context] = depth;
    410425              }
     
    435450                 
    436451//                   // miss > excep > spr/sync
    437 //                   uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_ADDR) or (state == CONTEXT_STATE_KO_MISS_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
     452//                   uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) or (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR) or (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND) or (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
    438453//                   uint8_t    priority1  = 2; // miss
    439454                 
     
    444459//                   bool       is_valid   = ((state == CONTEXT_STATE_OK) or
    445460//                                            (depth1< depth0) or
    446 //                                            ((depth1==depth0) and (priority1>priority0)));
     461//                                            ((depth1==depth0) and (priority1>=priority0)));
    447462                 
    448463//                   if (is_valid)
     
    480495                    break;
    481496                  }
    482                 case CONTEXT_STATE_KO_MISS_ADDR  :
     497                case CONTEXT_STATE_KO_MISS_BRANCH_ADDR:
    483498//                   {
    484499//                     reg_STATE [i] = CONTEXT_STATE_KO_MISS_WAITEND; //@@@ TODO : make MISS fast (miss decod)
    485500//                     break;
    486501//                   }
     502                case CONTEXT_STATE_KO_MISS_LOAD_ADDR  :
    487503                case CONTEXT_STATE_KO_PSYNC_ADDR :
    488504                case CONTEXT_STATE_KO_CSYNC_ADDR :
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp

    r101 r105  
    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   ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS                      ,"out_DECOD_ADDRESS                      ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     73  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT                 ,"out_DECOD_ADDRESS_NEXT                 ",Tgeneral_data_t    ,_param->_nb_inst_decod);
    7474  ALLOC1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT                 ,"out_DECOD_HAS_IMMEDIAT                 ",Tcontrol_t         ,_param->_nb_inst_decod);
    7575  ALLOC1_SC_SIGNAL(out_DECOD_IMMEDIAT                     ,"out_DECOD_IMMEDIAT                     ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     
    148148  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod);
    149149  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod);
    150   INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_ADDRESS                      ,_param->_nb_inst_decod);
     150  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_ADDRESS_NEXT                 ,_param->_nb_inst_decod);
    151151  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_HAS_IMMEDIAT                 ,_param->_nb_inst_decod);
    152152  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_IMMEDIAT                     ,_param->_nb_inst_decod);
     
    336336                TEST(Tcontrol_t        ,  out_DECOD_IS_DELAY_SLOT [i]->read(), request [context].front()._is_delay_slot);
    337337                TEST(Tcontrol_t        , delay_slot_current [context]        , request [context].front()._is_delay_slot);
    338                 TEST(Tgeneral_data_t   ,  out_DECOD_ADDRESS       [i]->read(), request [context].front()._address      );
     338//              TEST(Tgeneral_data_t   ,  out_DECOD_ADDRESS_NEXT  [i]->read(), request [context].front()._address_next );
    339339                TEST(Tcontrol_t        ,  out_DECOD_HAS_IMMEDIAT  [i]->read(), request [context].front()._has_immediat );
    340340                if (request [context].front()._has_immediat)
     
    450450  delete [] out_DECOD_NO_EXECUTE                   ;
    451451  delete [] out_DECOD_IS_DELAY_SLOT                ;
    452   delete [] out_DECOD_ADDRESS                      ;
     452  delete [] out_DECOD_ADDRESS_NEXT                 ;
    453453  delete [] out_DECOD_HAS_IMMEDIAT                 ;
    454454  delete [] out_DECOD_IMMEDIAT                     ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h

    r101 r105  
    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   public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_ADDRESS                      ;//[nb_inst_decod]
     90  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_ADDRESS_NEXT                 ;//[nb_inst_decod]
    9191  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_HAS_IMMEDIAT                 ;//[nb_inst_decod]
    9292  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_IMMEDIAT                     ;//[nb_inst_decod]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_allocation.cpp

    r101 r105  
    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       ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS      ,"address"      ,Tgeneral_data_t   ,_param->_size_instruction_address   );
     91      ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS_NEXT ,"address_next" ,Tgeneral_data_t   ,_param->_size_instruction_address   );
    9292      ALLOC1_SIGNAL_OUT(out_DECOD_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t        ,1                                   );
    9393      ALLOC1_SIGNAL_OUT(out_DECOD_IMMEDIAT     ,"immediat"     ,Tgeneral_data_t   ,_param->_size_general_data          );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_deallocation.cpp

    r101 r105  
    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         DELETE1_SIGNAL(out_DECOD_ADDRESS      ,_param->_nb_inst_decod,_param->_size_instruction_address          );
     51        DELETE1_SIGNAL(out_DECOD_ADDRESS_NEXT ,_param->_nb_inst_decod,_param->_size_instruction_address   );
    5252        DELETE1_SIGNAL(out_DECOD_HAS_IMMEDIAT ,_param->_nb_inst_decod,1                                   );
    5353        DELETE1_SIGNAL(out_DECOD_IMMEDIAT     ,_param->_nb_inst_decod,_param->_size_general_data          );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp

    r101 r105  
    126126                  }
    127127
    128                 Ttype_t  type  = _decod_instruction->_type;
    129                 Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_CONTEXT_DEPTH [x]):0; // DEPTH_CURRENT
     128                Ttype_t      type      = _decod_instruction->_type;
     129                Tdepth_t     depth    = (_param->_have_port_depth)?PORT_READ(in_CONTEXT_DEPTH [x]):0; // DEPTH_CURRENT
    130130
    131131                if (_param->_have_port_context_id)
     
    137137                PORT_WRITE(out_DECOD_NO_EXECUTE    [i], _decod_instruction->_no_execute    );
    138138                PORT_WRITE(out_DECOD_IS_DELAY_SLOT [i], _decod_instruction->_is_delay_slot );
    139                 PORT_WRITE(out_DECOD_ADDRESS       [i], addr);
     139//              PORT_WRITE(out_DECOD_ADDRESS       [i], addr);
     140//                 if ((type == TYPE_BRANCH) and
     141//                     ((_decod_instruction->_branch_condition = BRANCH_CONDITION_FLAG_SET) or
     142//                      (_decod_instruction->_branch_condition = BRANCH_CONDITION_FLAG_UNSET)))
     143//                 PORT_WRITE(out_DECOD_ADDRESS_NEXT  [i], _decod_instruction->_address+2);
     144//                 else
     145                PORT_WRITE(out_DECOD_ADDRESS_NEXT  [i], _decod_instruction->_address_next  );
    140146                PORT_WRITE(out_DECOD_HAS_IMMEDIAT  [i], _decod_instruction->_has_immediat  );
    141147                PORT_WRITE(out_DECOD_IMMEDIAT      [i], _decod_instruction->_immediat      );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/test.cpp

    r101 r105  
    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   ALLOC1_SC_SIGNAL( in_DECOD_IN_ADDRESS        ," in_DECOD_IN_ADDRESS       ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     62  ALLOC1_SC_SIGNAL( in_DECOD_IN_ADDRESS_NEXT   ," in_DECOD_IN_ADDRESS_NEXT  ",Tgeneral_data_t    ,_param->_nb_inst_decod);
    6363  ALLOC1_SC_SIGNAL( in_DECOD_IN_HAS_IMMEDIAT   ," in_DECOD_IN_HAS_IMMEDIAT  ",Tcontrol_t         ,_param->_nb_inst_decod);
    6464  ALLOC1_SC_SIGNAL( in_DECOD_IN_IMMEDIAT       ," in_DECOD_IN_IMMEDIAT      ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     
    8484  ALLOC1_SC_SIGNAL(out_DECOD_OUT_NO_EXECUTE    ,"out_DECOD_OUT_NO_EXECUTE   ",Tcontrol_t         ,_param->_nb_inst_decod);
    8585  ALLOC1_SC_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,"out_DECOD_OUT_IS_DELAY_SLOT",Tcontrol_t         ,_param->_nb_inst_decod);
    86   ALLOC1_SC_SIGNAL(out_DECOD_OUT_ADDRESS       ,"out_DECOD_OUT_ADDRESS      ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     86  ALLOC1_SC_SIGNAL(out_DECOD_OUT_ADDRESS_NEXT  ,"out_DECOD_OUT_ADDRESS_NEXT ",Tgeneral_data_t    ,_param->_nb_inst_decod);
    8787  ALLOC1_SC_SIGNAL(out_DECOD_OUT_HAS_IMMEDIAT  ,"out_DECOD_OUT_HAS_IMMEDIAT ",Tcontrol_t         ,_param->_nb_inst_decod);
    8888  ALLOC1_SC_SIGNAL(out_DECOD_OUT_IMMEDIAT      ,"out_DECOD_OUT_IMMEDIAT     ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     
    125125  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_NO_EXECUTE     ,_param->_nb_inst_decod);
    126126  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_IS_DELAY_SLOT  ,_param->_nb_inst_decod);
    127   INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_ADDRESS        ,_param->_nb_inst_decod);
     127  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_ADDRESS_NEXT   ,_param->_nb_inst_decod);
    128128  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_HAS_IMMEDIAT   ,_param->_nb_inst_decod);
    129129  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_IMMEDIAT       ,_param->_nb_inst_decod);
     
    151151  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_NO_EXECUTE    ,_param->_nb_inst_decod);
    152152  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod);
    153   INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_ADDRESS       ,_param->_nb_inst_decod);
     153  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_ADDRESS_NEXT  ,_param->_nb_inst_decod);
    154154  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_HAS_IMMEDIAT  ,_param->_nb_inst_decod);
    155155  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_IMMEDIAT      ,_param->_nb_inst_decod);
     
    227227            Tcontext_t context = rand()%_param->_nb_context;
    228228
    229             in_DECOD_IN_VAL        [i]->write(i<=x);
    230             in_DECOD_IN_CONTEXT_ID [i]->write(context);
    231             in_DECOD_IN_DEPTH      [i]->write(depth [context]);
    232             in_DECOD_IN_ADDRESS    [i]->write(address_tmp [context]);
     229            in_DECOD_IN_VAL          [i]->write(i<=x);
     230            in_DECOD_IN_CONTEXT_ID   [i]->write(context);
     231            in_DECOD_IN_DEPTH        [i]->write(depth [context]);
     232            in_DECOD_IN_ADDRESS_NEXT [i]->write(address_tmp [context]);
    233233
    234234            address_tmp [context] ++;
     
    270270              LABEL("  * context  : %d",context);
    271271             
    272               TEST(Tdepth_t  ,out_DECOD_OUT_DEPTH   [i]->read(),depth        [context]);
    273               TEST(Taddress_t,out_DECOD_OUT_ADDRESS [i]->read(),address_dest [context]);
     272              TEST(Tdepth_t  ,out_DECOD_OUT_DEPTH        [i]->read(),depth        [context]);
     273              TEST(Taddress_t,out_DECOD_OUT_ADDRESS_NEXT [i]->read(),address_dest [context]);
    274274             
    275275              nb_inst      [context] --;
     
    304304  DELETE1_SC_SIGNAL( in_DECOD_IN_NO_EXECUTE     ,_param->_nb_inst_decod);
    305305  DELETE1_SC_SIGNAL( in_DECOD_IN_IS_DELAY_SLOT  ,_param->_nb_inst_decod);
    306   DELETE1_SC_SIGNAL( in_DECOD_IN_ADDRESS        ,_param->_nb_inst_decod);
     306  DELETE1_SC_SIGNAL( in_DECOD_IN_ADDRESS_NEXT   ,_param->_nb_inst_decod);
    307307  DELETE1_SC_SIGNAL( in_DECOD_IN_HAS_IMMEDIAT   ,_param->_nb_inst_decod);
    308308  DELETE1_SC_SIGNAL( in_DECOD_IN_IMMEDIAT       ,_param->_nb_inst_decod);
     
    328328  DELETE1_SC_SIGNAL(out_DECOD_OUT_NO_EXECUTE    ,_param->_nb_inst_decod);
    329329  DELETE1_SC_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod);
    330   DELETE1_SC_SIGNAL(out_DECOD_OUT_ADDRESS       ,_param->_nb_inst_decod);
     330  DELETE1_SC_SIGNAL(out_DECOD_OUT_ADDRESS_NEXT  ,_param->_nb_inst_decod);
    331331  DELETE1_SC_SIGNAL(out_DECOD_OUT_HAS_IMMEDIAT  ,_param->_nb_inst_decod);
    332332  DELETE1_SC_SIGNAL(out_DECOD_OUT_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

    r101 r105  
    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   public    : SC_IN (Tgeneral_data_t    )  **  in_DECOD_IN_ADDRESS        ;//[nb_inst_decod]
     77  public    : SC_IN (Tgeneral_data_t    )  **  in_DECOD_IN_ADDRESS_NEXT   ;//[nb_inst_decod]
    7878  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_IN_HAS_IMMEDIAT   ;//[nb_inst_decod]
    7979  public    : SC_IN (Tgeneral_data_t    )  **  in_DECOD_IN_IMMEDIAT       ;//[nb_inst_decod]
     
    100100  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_OUT_NO_EXECUTE    ;//[nb_inst_decod]
    101101  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_OUT_IS_DELAY_SLOT ;//[nb_inst_decod]
    102   public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_OUT_ADDRESS       ;//[nb_inst_decod]
     102  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_OUT_ADDRESS_NEXT  ;//[nb_inst_decod]
    103103  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_OUT_HAS_IMMEDIAT  ;//[nb_inst_decod]
    104104  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_OUT_IMMEDIAT      ;//[nb_inst_decod]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Types.h

    r88 r105  
    3030  public : Tcontrol_t         * _no_execute     ;
    3131  public : Tcontrol_t         * _is_delay_slot  ;
    32   public : Tgeneral_data_t    * _address        ;
     32  public : Tgeneral_data_t    * _address_next   ;
    3333  public : Tcontrol_t         * _has_immediat   ;
    3434  public : Tgeneral_data_t    * _immediat       ;
     
    5656      _no_execute     = new Tcontrol_t         [_nb_inst];
    5757      _is_delay_slot  = new Tcontrol_t         [_nb_inst];
    58       _address        = new Tgeneral_data_t    [_nb_inst];
     58      _address_next   = new Tgeneral_data_t    [_nb_inst];
    5959      _has_immediat   = new Tcontrol_t         [_nb_inst];
    6060      _immediat       = new Tgeneral_data_t    [_nb_inst];
     
    8585      delete [] _no_execute     ;
    8686      delete [] _is_delay_slot  ;
    87       delete [] _address        ;
     87      delete [] _address_next   ;
    8888      delete [] _has_immediat   ;
    8989      delete [] _immediat       ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_allocation.cpp

    r101 r105  
    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       ALLOC1_SIGNAL_IN ( in_DECOD_IN_ADDRESS        ,"address"      ,Tgeneral_data_t    ,_param->_size_instruction_address   );
     69      ALLOC1_SIGNAL_IN ( in_DECOD_IN_ADDRESS_NEXT   ,"address_next" ,Tgeneral_data_t    ,_param->_size_instruction_address   );
    7070      ALLOC1_SIGNAL_IN ( in_DECOD_IN_HAS_IMMEDIAT   ,"has_immediat" ,Tcontrol_t         ,1                                   );
    7171      ALLOC1_SIGNAL_IN ( in_DECOD_IN_IMMEDIAT       ,"immediat"     ,Tgeneral_data_t    ,_param->_size_general_data          );
     
    9696      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_NO_EXECUTE     ,"no_execute"   ,Tcontrol_t         ,1                                   );
    9797      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_IS_DELAY_SLOT  ,"is_delay_slot",Tcontrol_t         ,1                                   );
    98       ALLOC1_SIGNAL_OUT(out_DECOD_OUT_ADDRESS        ,"address"      ,Tgeneral_data_t    ,_param->_size_instruction_address   );
     98      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_ADDRESS_NEXT   ,"address_next" ,Tgeneral_data_t    ,_param->_size_instruction_address   );
    9999      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_HAS_IMMEDIAT   ,"has_immediat" ,Tcontrol_t         ,1                                   );
    100100      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_IMMEDIAT       ,"immediat"     ,Tgeneral_data_t    ,_param->_size_general_data          );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_deallocation.cpp

    r101 r105  
    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         DELETE1_SIGNAL( in_DECOD_IN_ADDRESS        ,_param->_nb_inst_decod,_param->_size_general_data          );
     39        DELETE1_SIGNAL( in_DECOD_IN_ADDRESS_NEXT   ,_param->_nb_inst_decod,_param->_size_instruction_address   );
    4040        DELETE1_SIGNAL( in_DECOD_IN_HAS_IMMEDIAT   ,_param->_nb_inst_decod,1                                   );
    4141        DELETE1_SIGNAL( in_DECOD_IN_IMMEDIAT       ,_param->_nb_inst_decod,_param->_size_general_data          );
     
    6161        DELETE1_SIGNAL(out_DECOD_OUT_NO_EXECUTE    ,_param->_nb_inst_decod,1                                   );
    6262        DELETE1_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod,1                                   );
    63         DELETE1_SIGNAL(out_DECOD_OUT_ADDRESS       ,_param->_nb_inst_decod,_param->_size_general_data          );
     63        DELETE1_SIGNAL(out_DECOD_OUT_ADDRESS_NEXT  ,_param->_nb_inst_decod,_param->_size_instruction_address   );
    6464        DELETE1_SIGNAL(out_DECOD_OUT_HAS_IMMEDIAT  ,_param->_nb_inst_decod,1                                   );
    6565        DELETE1_SIGNAL(out_DECOD_OUT_IMMEDIAT      ,_param->_nb_inst_decod,_param->_size_general_data          );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp

    r101 r105  
    7171
    7272            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   : 0x%x (0x%x)",reg_QUEUE->front()->_address[i],reg_QUEUE->front()->_address[i]<<2);
     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);
    7979            internal_DECOD_OUT_VAL [i] = 1; // in all case, val is set (entry is not empty, and instruction is valid)
    8080            if (is_valid)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMoore.cpp

    r88 r105  
    5252          PORT_WRITE(out_DECOD_OUT_NO_EXECUTE    [i],reg_QUEUE->front()->_no_execute    [i]);
    5353          PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE->front()->_is_delay_slot [i]);
    54           PORT_WRITE(out_DECOD_OUT_ADDRESS       [i],reg_QUEUE->front()->_address       [i]);
     54          PORT_WRITE(out_DECOD_OUT_ADDRESS_NEXT  [i],reg_QUEUE->front()->_address_next  [i]);
    5555          PORT_WRITE(out_DECOD_OUT_HAS_IMMEDIAT  [i],reg_QUEUE->front()->_has_immediat  [i]);
    5656          PORT_WRITE(out_DECOD_OUT_IMMEDIAT      [i],reg_QUEUE->front()->_immediat      [i]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_transition.cpp

    r101 r105  
    6262                entry->_no_execute    [i] = PORT_READ(in_DECOD_IN_NO_EXECUTE    [i]);
    6363                entry->_is_delay_slot [i] = PORT_READ(in_DECOD_IN_IS_DELAY_SLOT [i]);
    64                 entry->_address       [i] = PORT_READ(in_DECOD_IN_ADDRESS       [i]);
     64                entry->_address_next  [i] = PORT_READ(in_DECOD_IN_ADDRESS_NEXT  [i]);
    6565                entry->_has_immediat  [i] = PORT_READ(in_DECOD_IN_HAS_IMMEDIAT  [i]);
    6666                entry->_immediat      [i] = PORT_READ(in_DECOD_IN_IMMEDIAT      [i]);
     
    144144                         ,(*it)->_no_execute    [i]
    145145                         ,(*it)->_is_delay_slot [i]
    146                          ,(*it)->_address       [i]
    147                          ,(*it)->_address       [i]<<2
     146                         ,(*it)->_address_next  [i]
     147                         ,(*it)->_address_next  [i]<<2
    148148                         ,(*it)->_has_immediat  [i]
    149149                         ,(*it)->_immediat      [i]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/test.cpp

    r101 r105  
    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   ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS                      ,"out_DECOD_ADDRESS                      ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     75  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT                 ,"out_DECOD_ADDRESS_NEXT                 ",Tgeneral_data_t    ,_param->_nb_inst_decod);
    7676  ALLOC1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT                 ,"out_DECOD_HAS_IMMEDIAT                 ",Tcontrol_t         ,_param->_nb_inst_decod);
    7777  ALLOC1_SC_SIGNAL(out_DECOD_IMMEDIAT                     ,"out_DECOD_IMMEDIAT                     ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     
    159159  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod);
    160160  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod);
    161   INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_ADDRESS                      ,_param->_nb_inst_decod);
     161  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_ADDRESS_NEXT                 ,_param->_nb_inst_decod);
    162162  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_HAS_IMMEDIAT                 ,_param->_nb_inst_decod);
    163163  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_IMMEDIAT                     ,_param->_nb_inst_decod);
     
    421421//              TEST(Tcontrol_t        ,  out_DECOD_NO_EXECUTE    [i]->read(), respons [context].front()._no_execute   );
    422422                TEST(Tcontrol_t        ,  out_DECOD_IS_DELAY_SLOT [i]->read(), respons [context].front()._is_delay_slot);
    423                 TEST(Tgeneral_data_t   ,  out_DECOD_ADDRESS       [i]->read(), respons [context].front()._address      );
     423//              TEST(Tgeneral_data_t   ,  out_DECOD_ADDRESS_NEXT  [i]->read(), respons [context].front()._address_next );
    424424                TEST(Tcontrol_t        ,  out_DECOD_HAS_IMMEDIAT  [i]->read(), respons [context].front()._has_immediat );
    425425                if (respons [context].front()._has_immediat)
     
    490490  DELETE1_SC_SIGNAL(out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod);
    491491  DELETE1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod);
    492   DELETE1_SC_SIGNAL(out_DECOD_ADDRESS                      ,_param->_nb_inst_decod);
     492  DELETE1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT                 ,_param->_nb_inst_decod);
    493493  DELETE1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT                 ,_param->_nb_inst_decod);
    494494  DELETE1_SC_SIGNAL(out_DECOD_IMMEDIAT                     ,_param->_nb_inst_decod);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/include/Decod_unit.h

    r101 r105  
    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   public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_ADDRESS                      ;//[nb_inst_decod]
     89  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_ADDRESS_NEXT                 ;//[nb_inst_decod]
    9090  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_HAS_IMMEDIAT                 ;//[nb_inst_decod]
    9191  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_IMMEDIAT                     ;//[nb_inst_decod]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_allocation.cpp

    r101 r105  
    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       ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS      ,"address"      ,Tgeneral_data_t   ,_param->_size_instruction_address          );
     91      ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS_NEXT ,"address_next" ,Tgeneral_data_t   ,_param->_size_instruction_address   );
    9292      ALLOC1_SIGNAL_OUT(out_DECOD_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t        ,1                                   );
    9393      ALLOC1_SIGNAL_OUT(out_DECOD_IMMEDIAT     ,"immediat"     ,Tgeneral_data_t   ,_param->_size_general_data          );
     
    293293          COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_IS_DELAY_SLOT",
    294294                                   dest, "in_DECOD_IN_"+toString(i)+"_IS_DELAY_SLOT");
    295           COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_ADDRESS"      ,
    296                                    dest, "in_DECOD_IN_"+toString(i)+"_ADDRESS"      );
     295          COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_ADDRESS_NEXT" ,
     296                                   dest, "in_DECOD_IN_"+toString(i)+"_ADDRESS_NEXT" );
    297297          COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_HAS_IMMEDIAT" ,
    298298                                   dest, "in_DECOD_IN_"+toString(i)+"_HAS_IMMEDIAT" );
     
    435435      // in_DECOD_IN_NO_EXECUTE     - component decod
    436436      // in_DECOD_IN_IS_DELAY_SLOT  - component decod
    437       // in_DECOD_IN_ADDRESS        - component decod
     437      // in_DECOD_IN_ADDRESS_NEXT   - component decod
    438438      // in_DECOD_IN_HAS_IMMEDIAT   - component decod
    439439      // in_DECOD_IN_IMMEDIAT       - component decod
     
    478478          PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_IS_DELAY_SLOT",
    479479                              dest,"out_DECOD_"    +toString(i)+"_IS_DELAY_SLOT");
    480           PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_ADDRESS"      ,
    481                               dest,"out_DECOD_"    +toString(i)+"_ADDRESS"      );
     480          PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_ADDRESS_NEXT" ,
     481                              dest,"out_DECOD_"    +toString(i)+"_ADDRESS_NEXT" );
    482482          PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_HAS_IMMEDIAT" ,
    483483                              dest,"out_DECOD_"    +toString(i)+"_HAS_IMMEDIAT" );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_deallocation.cpp

    r101 r105  
    3333       
    3434        DELETE1_SIGNAL(in_IFETCH_CONTEXT_ID                   ,_param->_nb_context,_param->_size_context_id      );
    35         DELETE1_SIGNAL(in_IFETCH_ADDRESS                      ,_param->_nb_context,_param->_size_general_data    );
    36 //      DELETE1_SIGNAL(in_IFETCH_ADDRESS_NEXT                 ,_param->_nb_context,_param->_size_general_data    );
     35        DELETE1_SIGNAL(in_IFETCH_ADDRESS                      ,_param->_nb_context,_param->_size_instruction_address);
     36//      DELETE1_SIGNAL(in_IFETCH_ADDRESS_NEXT                 ,_param->_nb_context,_param->_size_instruction_address);
    3737        DELETE1_SIGNAL(in_IFETCH_INST_IFETCH_PTR              ,_param->_nb_context,_param->_size_inst_ifetch_ptr );
    3838        DELETE1_SIGNAL(in_IFETCH_BRANCH_STATE                 ,_param->_nb_context,_param->_size_branch_state    );
     
    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         DELETE1_SIGNAL(out_DECOD_ADDRESS                      ,_param->_nb_inst_decod,_param->_size_general_data          );
     50        DELETE1_SIGNAL(out_DECOD_ADDRESS_NEXT                 ,_param->_nb_inst_decod,_param->_size_instruction_address   );
    5151        DELETE1_SIGNAL(out_DECOD_HAS_IMMEDIAT                 ,_param->_nb_inst_decod,1                                   );
    5252        DELETE1_SIGNAL(out_DECOD_IMMEDIAT                     ,_param->_nb_inst_decod,_param->_size_general_data          );
     
    7373//      DELETE1_SIGNAL(out_PREDICT_BRANCH_STACK_WRITE         ,_param->_nb_inst_decod,1                             );
    7474        DELETE1_SIGNAL(out_PREDICT_BRANCH_DIRECTION           ,_param->_nb_inst_decod,1                             );
    75         DELETE1_SIGNAL(out_PREDICT_ADDRESS_SRC                ,_param->_nb_inst_decod,_param->_size_general_data    );
    76         DELETE1_SIGNAL(out_PREDICT_ADDRESS_DEST               ,_param->_nb_inst_decod,_param->_size_general_data    );
     75        DELETE1_SIGNAL(out_PREDICT_ADDRESS_SRC                ,_param->_nb_inst_decod,_param->_size_instruction_address);
     76        DELETE1_SIGNAL(out_PREDICT_ADDRESS_DEST               ,_param->_nb_inst_decod,_param->_size_instruction_address);
    7777//      DELETE1_SIGNAL( in_PREDICT_CAN_CONTINUE               ,_param->_nb_inst_decod,1                             );
    7878       
     
    9292        DELETE_SIGNAL(out_CONTEXT_EVENT_TYPE                  ,_param->_size_event_type  );
    9393        DELETE_SIGNAL(out_CONTEXT_EVENT_IS_DELAY_SLOT         ,1                         );
    94         DELETE_SIGNAL(out_CONTEXT_EVENT_ADDRESS               ,_param->_size_general_data);
    95         DELETE_SIGNAL(out_CONTEXT_EVENT_ADDRESS_EPCR          ,_param->_size_general_data);
     94        DELETE_SIGNAL(out_CONTEXT_EVENT_ADDRESS               ,_param->_size_instruction_address);
     95        DELETE_SIGNAL(out_CONTEXT_EVENT_ADDRESS_EPCR          ,_param->_size_instruction_address);
    9696      }
    9797    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp

    r101 r105  
    266266  const  int32_t percent_transaction_update          = 75;
    267267  const  int32_t percent_transaction_branch_event    = 75;
     268  const  int32_t percent_transaction_event           = 75;
    268269
    269270  const bool     test1 = true;
     
    271272  const bool     test3 = true;
    272273  const bool     test4 = true;
     274  const bool     test5 = true;
    273275
    274276  std::list<request_t> ufpt;
     
    961963          SC_START(1);
    962964          in_EVENT_VAL   [context]->write(1);
    963           in_EVENT_TYPE  [context]->write(EVENT_TYPE_MISS_SPECULATION);
     965          in_EVENT_TYPE  [context]->write(EVENT_TYPE_BRANCH_MISS_SPECULATION);
    964966
    965967          SC_START(1);
     
    14071409          SC_START(1);
    14081410          in_EVENT_VAL   [context]->write(1);
    1409           in_EVENT_TYPE  [context]->write(EVENT_TYPE_MISS_SPECULATION);
     1411          in_EVENT_TYPE  [context]->write(EVENT_TYPE_BRANCH_MISS_SPECULATION);
    14101412
    14111413          SC_START(1);
     
    20362038            SC_START(1);
    20372039            in_EVENT_VAL   [context]->write(1);
    2038             in_EVENT_TYPE  [context]->write(EVENT_TYPE_MISS_SPECULATION);
     2040            in_EVENT_TYPE  [context]->write(EVENT_TYPE_BRANCH_MISS_SPECULATION);
    20392041           
    20402042            SC_START(1);
     
    21282130              }
    21292131           
     2132          }
     2133        }
     2134
     2135      //---------------------------------------------------------------------
     2136      //---------------------------------------------------------------------
     2137      // COMMIT MISS : with RAS in UPFT and UPT
     2138      //---------------------------------------------------------------------
     2139      //---------------------------------------------------------------------
     2140      if (test5)
     2141        {
     2142          uint32_t context = rand() % _param->_nb_context;
     2143          uint32_t have_ufpt_ras = false;
     2144          uint32_t have_upt_ras  = false;
     2145         
     2146          {
     2147            LABEL("PREDICT - fill the queue");
     2148            uint32_t port = rand() % _param->_nb_inst_predict;
     2149           
     2150            LABEL("  * context : %d",context);
     2151            LABEL("  * port    : %d",port);
     2152           
     2153            for (uint32_t i=0; i<_param->_size_ufpt_queue[context]; i++)
     2154              {
     2155                request_t request;
     2156                request.context          = context;
     2157                request.address_src      = rand();
     2158                request.address_dest     = rand();                                   
     2159               
     2160                request.condition        = (rand()%2)?BRANCH_CONDITION_READ_STACK:BRANCH_CONDITION_FLAG_SET;
     2161
     2162                request.take             = 1;                                             
     2163                request.take_good        = 1;                                             
     2164                request.flag             = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good);
     2165                request.no_sequence      = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag;
     2166                request.is_accurate      = true ;
     2167                request.miss_ifetch      = false;
     2168                request.miss_decod       = false;
     2169                request.miss_commit      = false;
     2170                request.history          = i;                                             
     2171                request.ras_address      = rand();                                   
     2172                request.ras_index        = rand()%_param->_size_ras_index[context];
     2173                request.ufpt_ptr         = ufpt_top [context];
     2174//              request.upt_ptr;
     2175               
     2176                bool have_transaction = false;
     2177                do
     2178                  {
     2179                    in_PREDICT_VAL              [port]->write((rand()%100)<percent_transaction_predict);
     2180                    in_PREDICT_CONTEXT_ID       [port]->write(request.context     );
     2181                    in_PREDICT_BTB_ADDRESS_SRC  [port]->write(request.address_src );
     2182                    in_PREDICT_BTB_ADDRESS_DEST [port]->write(request.address_dest);
     2183                    in_PREDICT_BTB_CONDITION    [port]->write(request.condition   );
     2184                    in_PREDICT_BTB_LAST_TAKE    [port]->write(request.take        );
     2185                    in_PREDICT_BTB_IS_ACCURATE  [port]->write(request.is_accurate );
     2186                    in_PREDICT_DIR_HISTORY      [port]->write(request.history     );
     2187                    in_PREDICT_RAS_ADDRESS      [port]->write(request.ras_address );
     2188                    in_PREDICT_RAS_INDEX        [port]->write(request.ras_index   );
     2189                   
     2190                    if (_param->_have_port_depth)
     2191                      {
     2192                    TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     2193                    TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     2194                      }
     2195                    SC_START(0); // fct melay
     2196                   
     2197                    LABEL("PREDICT         [%d] %d - %d (accurate : %d).",
     2198                          port,
     2199                          in_PREDICT_VAL [port]->read(),
     2200                          out_PREDICT_ACK [port]->read(),
     2201                          in_PREDICT_BTB_IS_ACCURATE [port]->read());
     2202                   
     2203                    if (in_PREDICT_VAL [port]->read() and out_PREDICT_ACK [port]->read())
     2204                      {
     2205                        LABEL("PREDICT         [%d] - Transaction accepted",port);
     2206                        have_transaction = true;
     2207                       
     2208                        if (_param->_have_port_depth)
     2209                          TEST(Tprediction_ptr_t,out_PREDICT_UPDATE_PREDICTION_ID [port]->read(),ufpt_top [context]);
     2210                       
     2211                        ufpt_top [context] = (ufpt_top [context]+1)%_param->_size_ufpt_queue[context];
     2212                      }
     2213                   
     2214                    SC_START(1); // transition
     2215                   
     2216                  } while (not have_transaction);
     2217               
     2218                ufpt.push_back(request); // to update
     2219               
     2220                in_PREDICT_VAL [port]->write(0);
     2221               
     2222                if (_param->_have_port_depth)
     2223                  {
     2224                TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     2225                TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     2226                  }
     2227              }
     2228          }
     2229       
     2230          {
     2231            LABEL("DECOD");
     2232            uint32_t port = rand() % _param->_nb_inst_decod;
     2233           
     2234            LABEL("  * context : %d",context);
     2235            LABEL("  * port    : %d",port);
     2236           
     2237            for (uint32_t i=0; i<_param->_size_ufpt_queue[context]; i++)
     2238              {
     2239                request_t request = ufpt.front();
     2240               
     2241                bool have_transaction = false;
     2242                do
     2243                  {
     2244                    in_DECOD_VAL                  [port]->write((rand()%100)<percent_transaction_decod);
     2245                    in_DECOD_CONTEXT_ID           [port]->write(request.context     );
     2246                    in_DECOD_BTB_ADDRESS_SRC      [port]->write(request.address_src );
     2247                    in_DECOD_BTB_ADDRESS_DEST     [port]->write(request.address_dest);
     2248                    in_DECOD_BTB_CONDITION        [port]->write(request.condition   );
     2249                    in_DECOD_BTB_LAST_TAKE        [port]->write(request.take        );
     2250                    in_DECOD_RAS_ADDRESS          [port]->write(request.ras_address );
     2251                    in_DECOD_RAS_INDEX            [port]->write(request.ras_index   );
     2252                    in_DECOD_UPDATE_PREDICTION_ID [port]->write(request.ufpt_ptr    );
     2253                    in_DECOD_MISS_IFETCH          [port]->write(request.miss_ifetch );
     2254                    in_DECOD_MISS_DECOD           [port]->write(request.miss_decod  );
     2255                    in_DECOD_IS_ACCURATE          [port]->write(request.is_accurate );
     2256         
     2257                    have_upt_ras |= (update_ras(request.condition));
     2258         
     2259                    SC_START(0); // fct melay
     2260                   
     2261                    LABEL("DECOD           [%d] %d - %d",
     2262                          port,
     2263                          in_DECOD_VAL [port]->read(),
     2264                          out_DECOD_ACK [port]->read());
     2265                   
     2266                    if (in_DECOD_VAL [port]->read() and out_DECOD_ACK [port]->read())
     2267                      {
     2268                        LABEL("DECOD          [%d] - Transaction accepted",port);
     2269                        have_transaction = true;
     2270                       
     2271                        request.upt_ptr = upt_top [context];
     2272                        upt.push_back(request);
     2273                        ufpt.pop_front();
     2274                       
     2275                        upt_top [context] = (upt_top [context]+1)%_param->_size_upt_queue[context];
     2276                      }
     2277                   
     2278                    SC_START(1); // transition
     2279                   
     2280                  } while (not have_transaction);
     2281               
     2282                in_DECOD_VAL              [port]->write(0);
     2283               
     2284                if (_param->_have_port_depth)
     2285                  {
     2286                TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     2287                TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     2288                  }
     2289              }
     2290          }
     2291
     2292          {
     2293            LABEL("PREDICT - fill the queue");
     2294            uint32_t port = rand() % _param->_nb_inst_predict;
     2295           
     2296            LABEL("  * context : %d",context);
     2297            LABEL("  * port    : %d",port);
     2298           
     2299            for (uint32_t i=0; i<_param->_size_ufpt_queue[context]; i++)
     2300              {
     2301                request_t request;
     2302                request.context          = context;
     2303                request.address_src      = rand();
     2304                request.address_dest     = rand();                                   
     2305                request.address_good     = request.address_dest;
     2306                request.condition        = (rand()%2)?BRANCH_CONDITION_NONE_WITH_WRITE_STACK:BRANCH_CONDITION_FLAG_SET;
     2307               
     2308                have_ufpt_ras |= (update_ras(request.condition));
     2309               
     2310                request.take             = 1;                                             
     2311                request.take_good        = 1;                                             
     2312                request.flag             = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good);
     2313                request.no_sequence      = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag;
     2314                request.is_accurate      = true ;
     2315                request.miss_ifetch      = false;
     2316                request.miss_decod       = false;
     2317                request.miss_commit      = true;
     2318                request.history          = i;                                             
     2319                request.ras_address      = rand();                                   
     2320                request.ras_index        = rand()%_param->_size_ras_index[context];
     2321                request.ufpt_ptr         = ufpt_top [context];
     2322//              request.upt_ptr;
     2323               
     2324                bool have_transaction = false;
     2325                do
     2326                  {
     2327                    in_PREDICT_VAL              [port]->write((rand()%100)<percent_transaction_predict);
     2328                    in_PREDICT_CONTEXT_ID       [port]->write(request.context     );
     2329                    in_PREDICT_BTB_ADDRESS_SRC  [port]->write(request.address_src );
     2330                    in_PREDICT_BTB_ADDRESS_DEST [port]->write(request.address_dest);
     2331                    in_PREDICT_BTB_CONDITION    [port]->write(request.condition   );
     2332                    in_PREDICT_BTB_LAST_TAKE    [port]->write(request.take        );
     2333                    in_PREDICT_BTB_IS_ACCURATE  [port]->write(request.is_accurate );
     2334                    in_PREDICT_DIR_HISTORY      [port]->write(request.history     );
     2335                    in_PREDICT_RAS_ADDRESS      [port]->write(request.ras_address );
     2336                    in_PREDICT_RAS_INDEX        [port]->write(request.ras_index   );
     2337                   
     2338                    if (_param->_have_port_depth)
     2339                      {
     2340                    TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     2341                    TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     2342                      }
     2343                    SC_START(0); // fct melay
     2344                   
     2345                    LABEL("PREDICT         [%d] %d - %d (accurate : %d).",
     2346                          port,
     2347                          in_PREDICT_VAL [port]->read(),
     2348                          out_PREDICT_ACK [port]->read(),
     2349                          in_PREDICT_BTB_IS_ACCURATE [port]->read());
     2350                   
     2351                    if (in_PREDICT_VAL [port]->read() and out_PREDICT_ACK [port]->read())
     2352                      {
     2353                        LABEL("PREDICT         [%d] - Transaction accepted",port);
     2354                        have_transaction = true;
     2355                       
     2356                        if (_param->_have_port_depth)
     2357                          TEST(Tprediction_ptr_t,out_PREDICT_UPDATE_PREDICTION_ID [port]->read(),ufpt_top [context]);
     2358                       
     2359                        ufpt_top [context] = (ufpt_top [context]+1)%_param->_size_ufpt_queue[context];
     2360                      }
     2361                   
     2362                    SC_START(1); // transition
     2363                   
     2364                  } while (not have_transaction);
     2365               
     2366                ufpt.push_back(request); // to update
     2367               
     2368                in_PREDICT_VAL [port]->write(0);
     2369               
     2370                if (_param->_have_port_depth)
     2371                  {
     2372                TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     2373                TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     2374                  }
     2375              }
     2376          }
     2377
     2378          uint32_t nb_branch_before_event = 0;
     2379          {
     2380            // middle
     2381            std::list<request_t>::iterator it_event = upt.begin();
     2382            for (uint32_t i=0; i < (upt.size()>>1); ++i)
     2383              {
     2384                nb_branch_before_event ++;
     2385                it_event ++;
     2386              }
     2387            for (std::list<request_t>::iterator it = it_event; it != upt.end(); ++it)
     2388              it->miss_commit = true;
     2389
     2390            bool have_transaction = false;
     2391           
     2392            do
     2393              {
     2394                PORT_WRITE(in_EVENT_VAL   [context],(rand()%100)<percent_transaction_event);
     2395                PORT_WRITE(in_EVENT_TYPE  [context],EVENT_TYPE_LOAD_MISS_SPECULATION);
     2396                PORT_WRITE(in_EVENT_DEPTH [context],it_event->upt_ptr);
     2397               
     2398                SC_START(0);
     2399               
     2400                if (PORT_READ(in_EVENT_VAL [context]) and PORT_READ(out_EVENT_ACK [context]))
     2401                  {
     2402                    LABEL("EVENT [%d] - Transaction accepted",context);
     2403                   
     2404                    have_transaction = true;
     2405                  }
     2406               
     2407                SC_START(1);
     2408              }
     2409            while (not have_transaction);
     2410            PORT_WRITE(in_EVENT_VAL   [context],0);
     2411
     2412            upt_top_event [it_event->context] = upt_top [it_event->context];
     2413            upt_top       [it_event->context] = it_event->upt_ptr;
     2414          }
     2415         
     2416          {
     2417            LABEL("BRANCH_COMPLETE - Hit ifetch");
     2418           
     2419            uint32_t port = rand() % _param->_nb_inst_branch_complete;
     2420           
     2421            LABEL("  * port    : %d",port);
     2422           
     2423            std::list<request_t>::iterator it_upt = upt.begin();
     2424           
     2425            for (uint32_t i=0; i<nb_branch_before_event; ++i)
     2426              {
     2427              bool have_transaction = false;
     2428             
     2429              do
     2430                {
     2431                  in_BRANCH_COMPLETE_VAL        [port]->write((rand()%100)<percent_transaction_branch_complete);
     2432                  in_BRANCH_COMPLETE_CONTEXT_ID [port]->write(it_upt->context     );
     2433                  in_BRANCH_COMPLETE_DEPTH      [port]->write(it_upt->upt_ptr     );
     2434                  in_BRANCH_COMPLETE_ADDRESS    [port]->write(it_upt->address_dest);
     2435                  in_BRANCH_COMPLETE_NO_SEQUENCE[port]->write(it_upt->no_sequence );
     2436
     2437                  if (_param->_have_port_depth)
     2438                    {
     2439                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     2440                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     2441                    }
     2442                  SC_START(0);
     2443                 
     2444                  LABEL("BRANCH_COMPLETE [%d] %d - %d.",port,in_BRANCH_COMPLETE_VAL [port]->read(),out_BRANCH_COMPLETE_ACK [port]->read());
     2445                 
     2446                  if (in_BRANCH_COMPLETE_VAL [port]->read() and out_BRANCH_COMPLETE_ACK [port]->read())
     2447                    {
     2448                      LABEL("BRANCH_COMPLETE [%d] - Transaction accepted",port);
     2449                      LABEL("  * CONTEXT_ID  : %d"  ,it_upt->context     );
     2450                      LABEL("  * DEPTH       : %d"  ,it_upt->upt_ptr     );
     2451                      LABEL("  * CONDITION   : %d"  ,it_upt->condition   );
     2452                      LABEL("  * ADDRESS     : %.8x",it_upt->address_dest);
     2453                      LABEL("  * FLAG        : %d"  ,it_upt->flag        );
     2454                      LABEL("  * NO_SEQUENCE : %d"  ,it_upt->no_sequence );
     2455
     2456                      have_transaction = true;
     2457                     
     2458                      TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),it_upt->miss_commit );
     2459                      TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE           [port]->read(),it_upt->take        );
     2460                      it_upt->take_good = it_upt->take;
     2461                      TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC    [port]->read(),it_upt->address_src );
     2462                      TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST   [port]->read(),it_upt->address_dest);
     2463
     2464                      it_upt++;
     2465                    }
     2466                 
     2467                  SC_START(1);
     2468                 
     2469                } while (not have_transaction);
     2470             
     2471              in_BRANCH_COMPLETE_VAL [port]->write(0);
     2472             
     2473              if (_param->_have_port_depth)
     2474                {
     2475              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     2476              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     2477                }
     2478            }
     2479          }
     2480         
     2481          if (have_ufpt_ras)
     2482            {
     2483              LABEL("UPDATE - Update UPFT");
     2484             
     2485              uint32_t port = 0;
     2486             
     2487              LABEL("  * port    : %d",port);
     2488              std::list<request_t>::iterator it_ufpt = ufpt.end();
     2489              -- it_ufpt;
     2490             
     2491              for (uint32_t i=0; i<_param->_size_ufpt_queue[context]; i++)
     2492                {
     2493                  bool have_transaction = false;
     2494                 
     2495                  do
     2496                    {
     2497                      in_UPDATE_ACK [port]->write((rand()%100)<percent_transaction_update);
     2498                     
     2499//                    if (_param->_have_port_depth)
     2500//                    TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), ufpt_bottom [context]);
     2501//                    TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), ufpt_top [context]);
     2502                 
     2503                      SC_START(0);
     2504                     
     2505                      LABEL("UPDATE [%d] %d - %d.",port,out_UPDATE_VAL [port]->read(),in_UPDATE_ACK [port]->read());
     2506                     
     2507                      if (out_UPDATE_VAL [port]->read() and in_UPDATE_ACK [port]->read())
     2508                        {
     2509                          LABEL("UPDATE [%d] - Transaction accepted",port);
     2510                          have_transaction = true;
     2511                         
     2512                          if (_param->_have_port_context_id)
     2513                          TEST(Tcontext_t         ,out_UPDATE_CONTEXT_ID            [port]->read(),it_ufpt->context);
     2514                          TEST(Tcontrol_t         ,out_UPDATE_MISS_PREDICTION       [port]->read(),(it_ufpt->miss_ifetch or
     2515                                                                                                    it_ufpt->miss_decod  or
     2516                                                                                                    it_ufpt->miss_commit ));
     2517//                        if (update_btb(it_ufpt->condition) or
     2518//                            update_dir(it_ufpt->condition))
     2519//                        TEST(Tcontrol_t         ,out_UPDATE_DIRECTION_GOOD        [port]->read(),it_ufpt->take_good);
     2520                          TEST(Tcontrol_t         ,out_UPDATE_BTB_VAL               [port]->read(),0);
     2521//                        if (update_btb(it_ufpt->condition))
     2522//                          {
     2523//                        TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_SRC       [port]->read(),it_ufpt->address_src);
     2524//                        TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_DEST      [port]->read(),it_ufpt->address_dest);
     2525//                        TEST(Tbranch_condition_t,out_UPDATE_BTB_CONDITION         [port]->read(),it_ufpt->condition);
     2526//                          }
     2527                          TEST(Tcontrol_t         ,out_UPDATE_DIR_VAL               [port]->read(),0);
     2528
     2529//                        if (update_dir(it_ufpt->condition))
     2530//                        if (_param->_have_port_history)
     2531//                        TEST(Thistory_t         ,out_UPDATE_DIR_HISTORY           [port]->read(),it_ufpt->history);
     2532//                        TEST(Tcontrol_t         ,out_UPDATE_RAS_VAL               [port]->read(),update_ras(it_ufpt->condition));
     2533                          if (update_ras(it_ufpt->condition))
     2534                            {
     2535//                            TEST(Tcontrol_t         ,out_UPDATE_RAS_FLUSH             [port]->read(),0);
     2536                              TEST(Tcontrol_t         ,out_UPDATE_RAS_PUSH              [port]->read(),push_ras  (it_ufpt->condition));
     2537                              TEST(Taddress_t         ,out_UPDATE_RAS_ADDRESS           [port]->read(),it_ufpt->ras_address);
     2538                              TEST(Tptr_t             ,out_UPDATE_RAS_INDEX             [port]->read(),it_ufpt->ras_index);
     2539                              TEST(Tcontrol_t         ,out_UPDATE_RAS_PREDICTION_IFETCH [port]->read(),not it_ufpt->miss_ifetch);
     2540                            }
     2541                        }
     2542                     
     2543                      SC_START(1);
     2544                    } while (not have_transaction);
     2545                 
     2546                  -- it_ufpt;
     2547                 
     2548                 
     2549                  in_UPDATE_ACK [port]->write(0);
     2550//                if (_param->_have_port_depth)
     2551//                TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), ufpt_bottom [context]);
     2552//                TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), ufpt_top [context]);
     2553                }
     2554            }
     2555          ufpt.clear();
     2556
     2557          {
     2558            LABEL("UPDATE - upt (after event)");
     2559           
     2560            uint32_t port = 0;
     2561           
     2562            LABEL("  * port                   : %d",port);
     2563
     2564            std::list<request_t>::iterator it_upt = upt.end();
     2565
     2566//             for (uint32_t i=0; i<upt.size(); i++)
     2567
     2568            uint32_t size = upt.size();
     2569
     2570            LABEL("  * size                   : %d",size);
     2571            LABEL("  * nb_branch_before_event : %d",nb_branch_before_event);
     2572
     2573            for (uint32_t i=nb_branch_before_event; i<size; ++i)
     2574              {
     2575                --it_upt;
     2576               
     2577                bool have_transaction = false;
     2578               
     2579                if (need_update(it_upt->condition))
     2580                do
     2581                  {
     2582                    in_UPDATE_ACK [port]->write((rand()%100)<percent_transaction_update);
     2583
     2584//                   if (_param->_have_port_depth)
     2585//                   TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     2586//                   TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     2587                 
     2588                    SC_START(0);
     2589                   
     2590                    LABEL("UPDATE [%d] %d - %d.",port,out_UPDATE_VAL [port]->read(),in_UPDATE_ACK [port]->read());
     2591                   
     2592                    if (out_UPDATE_VAL [port]->read() and in_UPDATE_ACK [port]->read())
     2593                      {
     2594                        LABEL("UPDATE [%d] - Transaction accepted",port);
     2595                        LABEL("  * address_src                : %.8x",it_upt->address_src);
     2596                        LABEL("  * out_UPDATE_BTB_ADDRESS_SRC : %.8x",out_UPDATE_BTB_ADDRESS_SRC[port]->read());
     2597
     2598                        have_transaction = true;
     2599
     2600                        bool btb_val = ((update_btb(it_upt->condition)));
     2601                        bool dir_val = (update_dir(it_upt->condition) and
     2602                                        not (it_upt->miss_ifetch or it_upt->miss_decod));
     2603                        bool ras_val = update_ras(it_upt->condition);
     2604
     2605                        if (_param->_have_port_context_id)
     2606                        TEST(Tcontext_t         ,out_UPDATE_CONTEXT_ID            [port]->read(),it_upt->context);
     2607                        TEST(Tcontrol_t         ,out_UPDATE_MISS_PREDICTION       [port]->read(),it_upt->miss_commit);
     2608//                         TEST(Tcontrol_t         ,out_UPDATE_BTB_VAL               [port]->read(),btb_val);
     2609
     2610//                         if (btb_val)
     2611//                           {
     2612//                         TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_SRC       [port]->read(),it_upt->address_src);
     2613//                         TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_DEST      [port]->read(),it_upt->address_dest);
     2614//                         TEST(Tbranch_condition_t,out_UPDATE_BTB_CONDITION         [port]->read(),it_upt->condition);
     2615//                           }
     2616//                         TEST(Tcontrol_t         ,out_UPDATE_DIR_VAL               [port]->read(),dir_val);
     2617                       
     2618//                         if (dir_val)
     2619//                           {
     2620//                         TEST(Tcontrol_t         ,out_UPDATE_DIRECTION_GOOD        [port]->read(),it_upt->take_good);
     2621//                         if (_param->_have_port_history)
     2622//                         TEST(Thistory_t         ,out_UPDATE_DIR_HISTORY           [port]->read(),it_upt->history);
     2623//                           }
     2624                        TEST(Tcontrol_t         ,out_UPDATE_RAS_VAL               [port]->read(),ras_val);
     2625
     2626                        if (ras_val)
     2627                          {
     2628//                      TEST(Tcontrol_t         ,out_UPDATE_RAS_FLUSH             [port]->read(),0);
     2629                        TEST(Tcontrol_t         ,out_UPDATE_RAS_PUSH              [port]->read(),push_ras  (it_upt->condition));
     2630                        TEST(Taddress_t         ,out_UPDATE_RAS_ADDRESS           [port]->read(),it_upt->ras_address);
     2631                        TEST(Tptr_t             ,out_UPDATE_RAS_INDEX             [port]->read(),it_upt->ras_index);
     2632                        TEST(Tcontrol_t         ,out_UPDATE_RAS_PREDICTION_IFETCH [port]->read(),not it_upt->miss_ifetch);
     2633                          }
     2634//                         -- it_upt;
     2635                      }
     2636                   
     2637                    SC_START(1);
     2638                  } while (not have_transaction);
     2639             
     2640                upt.pop_back();
     2641                in_UPDATE_ACK [port]->write(0);
     2642//               if (_param->_have_port_depth)
     2643//               TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     2644//               TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     2645              }
     2646          }
     2647
     2648          /*
     2649          {
     2650            LABEL("BRANCH_EVENT - have miss decod");
     2651           
     2652            uint32_t port = context;
     2653           
     2654            {
     2655              bool have_transaction = false;
     2656             
     2657              do
     2658                {
     2659                  in_BRANCH_EVENT_ACK [port]->write((rand()%100)<percent_transaction_branch_event);
     2660                 
     2661                  SC_START(0);
     2662                 
     2663                  LABEL("BRANCH_EVENT [%d] %d - %d.",port,out_BRANCH_EVENT_VAL [port]->read(),in_BRANCH_EVENT_ACK [port]->read());
     2664                 
     2665                  if (out_BRANCH_EVENT_VAL [port]->read() and in_BRANCH_EVENT_ACK [port]->read())
     2666                    {
     2667                      LABEL("BRANCH_EVENT [%d] - Transaction accepted",port);
     2668                      have_transaction = true;
     2669                     
     2670                      LABEL("  * event.address_src  : %.8x,",event.address_src );
     2671                      LABEL("  * event.address_good : %.8x,",event.address_good);
     2672                      LABEL("  * event.take         : %.8x,",event.take        );
     2673                     
     2674                      TEST(Tdepth_t  ,out_BRANCH_EVENT_DEPTH            [port]->read(),event.upt_ptr);
     2675                      TEST(Taddress_t,out_BRANCH_EVENT_ADDRESS_SRC      [port]->read(),event.address_src);
     2676                      TEST(Tcontrol_t,out_BRANCH_EVENT_ADDRESS_DEST_VAL [port]->read(),event.take_good);
     2677                      if (event.take_good)
     2678                      TEST(Taddress_t,out_BRANCH_EVENT_ADDRESS_DEST     [port]->read(),event.address_good);
     2679                     
     2680                      event.address_src  = 0;
     2681                      event.take         = 0;
     2682                      event.address_dest = 0;
     2683                    }
     2684                 
     2685                  SC_START(1);
     2686                } while (not have_transaction);
     2687             
     2688              in_BRANCH_EVENT_ACK [port]->write(0);
     2689            }
     2690          }
     2691
     2692          {
     2693            LABEL("EVENT_STATE");
     2694           
     2695            SC_START(1);
     2696            in_EVENT_VAL   [context]->write(1);
     2697            in_EVENT_TYPE  [context]->write(EVENT_TYPE_BRANCH_MISS_SPECULATION);
     2698           
     2699            SC_START(1);
     2700            in_EVENT_VAL   [context]->write(0);
     2701            in_EVENT_TYPE  [context]->write(EVENT_TYPE_NONE            );
     2702          }
     2703          */
     2704
     2705          {
     2706            LABEL("UPDATE - upt (before event)");
     2707           
     2708            uint32_t port = 0;
     2709           
     2710            LABEL("  * port    : %d",port);
     2711            LABEL("  * size    : %d",upt.size());
     2712            std::list<request_t>::iterator it_upt = upt.begin();
     2713
     2714            for (uint32_t i=0; i<upt.size(); i++)
     2715              {
     2716                bool have_transaction = false;
     2717
     2718                do
     2719                  {
     2720                    in_UPDATE_ACK [port]->write((rand()%100)<percent_transaction_update);
     2721
     2722//                   if (_param->_have_port_depth)
     2723//                   TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     2724//                   TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     2725                 
     2726                    SC_START(0);
     2727                   
     2728                    LABEL("UPDATE [%d] %d - %d.",port,out_UPDATE_VAL [port]->read(),in_UPDATE_ACK [port]->read());
     2729                   
     2730                    if (out_UPDATE_VAL [port]->read() and in_UPDATE_ACK [port]->read())
     2731                      {
     2732                        LABEL("UPDATE [%d] - Transaction accepted",port);
     2733                        have_transaction = true;
     2734                       
     2735                        if (_param->_have_port_context_id)
     2736                        TEST(Tcontext_t         ,out_UPDATE_CONTEXT_ID            [port]->read(),it_upt->context);
     2737                        TEST(Tcontrol_t         ,out_UPDATE_MISS_PREDICTION       [port]->read(),it_upt->miss_commit);
     2738                        TEST(Tcontrol_t         ,out_UPDATE_DIRECTION_GOOD        [port]->read(),it_upt->take_good);
     2739                        TEST(Tcontrol_t         ,out_UPDATE_BTB_VAL               [port]->read(),update_btb(it_upt->condition));
     2740                        if (update_btb(it_upt->condition))
     2741                          {
     2742                        TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_SRC       [port]->read(),it_upt->address_src);
     2743                        TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_DEST      [port]->read(),it_upt->address_dest);
     2744                        TEST(Tbranch_condition_t,out_UPDATE_BTB_CONDITION         [port]->read(),it_upt->condition);
     2745                          }
     2746                        TEST(Tcontrol_t         ,out_UPDATE_DIR_VAL               [port]->read(),update_dir(it_upt->condition) and not (it_upt->miss_ifetch or it_upt->miss_decod));
     2747                       
     2748                        if (update_dir(it_upt->condition))
     2749                        if (_param->_have_port_history)
     2750                        TEST(Thistory_t         ,out_UPDATE_DIR_HISTORY           [port]->read(),it_upt->history);
     2751                        TEST(Tcontrol_t         ,out_UPDATE_RAS_VAL               [port]->read(),update_ras(it_upt->condition));
     2752                        if (update_ras(it_upt->condition))
     2753                          {
     2754//                      TEST(Tcontrol_t         ,out_UPDATE_RAS_FLUSH             [port]->read(),0);
     2755                        TEST(Tcontrol_t         ,out_UPDATE_RAS_PUSH              [port]->read(),push_ras  (it_upt->condition));
     2756                        TEST(Taddress_t         ,out_UPDATE_RAS_ADDRESS           [port]->read(),it_upt->ras_address);
     2757                        TEST(Tptr_t             ,out_UPDATE_RAS_INDEX             [port]->read(),it_upt->ras_index);
     2758                        TEST(Tcontrol_t         ,out_UPDATE_RAS_PREDICTION_IFETCH [port]->read(),not it_upt->miss_ifetch);
     2759                          }
     2760
     2761                        ++ it_upt;
     2762                      }
     2763                   
     2764                    SC_START(1);
     2765                  } while (not have_transaction);
     2766               
     2767                in_UPDATE_ACK [port]->write(0);
     2768//               if (_param->_have_port_depth)
     2769//               TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     2770//               TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     2771              }
     2772          }
     2773
     2774          upt.clear();
     2775
     2776          // Wait Garbage Collector
     2777          {
     2778            LABEL("GARBAGE COLLECTOR");
     2779            LABEL(" * upt bottom : %d",upt_bottom [context]);
     2780            LABEL(" * upt top    : %d",upt_top    [context]);
     2781
     2782            upt_top    [context] = (upt_top_event [context]);
     2783            upt_bottom [context] = (upt_top       [context]);
     2784
     2785            while ((upt_bottom [context] != out_DEPTH_MIN [context]->read()) or
     2786                   (upt_top    [context] != out_DEPTH_MAX [context]->read()))
     2787              {
     2788                SC_START(1);
     2789              }
    21302790          }
    21312791        }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h

    r101 r105  
    2121  typedef enum
    2222    {
    23       EVENT_STATE_OK                    , // Can predict
    24       EVENT_STATE_FLUSH_UFPT            , // in decod  stage, detect a miss, continue to execute but flush ufpt
    25       EVENT_STATE_FLUSH_UFPT_AND_UPT    , // in commit stage, detect a miss, stop context and flush ufpt and upt
    26       EVENT_STATE_FLUSH_UPT             , // in commit stage, detect a miss, context is stop and ufpt is flush, update RAS
    27       EVENT_STATE_UPDATE_CONTEXT        , // prediction unit is update, send signal to context manager
    28       EVENT_STATE_WAIT_END_EVENT          // prediction unit is ok, wait the end of event (send by Context State)
     23      EVENT_STATE_OK                      , // Can predict
     24      EVENT_STATE_MISS_FLUSH_UFPT         , // in decod  stage, detect a miss  , continue to execute but flush ufpt
     25      EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT , // in commit stage, detect a miss  , stop context and flush ufpt and upt
     26      EVENT_STATE_MISS_FLUSH_UPT          , // in commit stage, detect a miss  , context is stop and ufpt is flush, update RAS
     27      EVENT_STATE_EVENT_FLUSH_UFPT        , // in commit stage, detect an event, continue to execute but flush ufpt
     28      EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT, // in commit stage, detect an event, stop context and flush ufpt and upt
     29      EVENT_STATE_EVENT_FLUSH_UPT         , // in commit stage, detect an event, context is stop and ufpt is flush, update RAS
     30      EVENT_STATE_UPDATE_CONTEXT          , // prediction unit is update, send signal to context manager
     31      EVENT_STATE_WAIT_END_EVENT            // prediction unit is ok, wait the end of event (send by Context State)
    2932    } event_state_t;
    3033
     
    116119    switch (x)
    117120      {
    118       case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_OK                      : return "ok"                     ; break;
    119       case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_FLUSH_UFPT              : return "flush_ufpt"             ; break;
    120       case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_FLUSH_UFPT_AND_UPT      : return "flush_ufpt_and_upt"     ; break;
    121       case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_FLUSH_UPT               : return "flush_upt"              ; break;
    122       case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_UPDATE_CONTEXT          : return "update_context"         ; break;
    123       case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_WAIT_END_EVENT          : return "wait_and_event"         ; break;
    124       default    : return ""      ; break;
     121      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_OK                      : return "ok"                      ; break;
     122      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_MISS_FLUSH_UFPT         : return "miss_flush_ufpt"         ; break;
     123      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT : return "miss_flush_ufpt_and_upt" ; break;
     124      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_MISS_FLUSH_UPT          : return "miss_flush_upt"          ; break;
     125      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_EVENT_FLUSH_UPT         : return "event_flush_upt"         ; break;
     126      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_EVENT_FLUSH_UFPT        : return "event_flush_ufpt"        ; break;
     127      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT: return "event_flush_ufpt_and_upt"; break;
     128      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_UPDATE_CONTEXT          : return "update_context"          ; break;
     129      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_WAIT_END_EVENT          : return "wait_and_event"          ; break;
     130      default    : return ""; break;
    125131      }
    126132  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h

    r101 r105  
    178178  private   : bool                          * reg_IS_ACCURATE                    ; //[nb_context]
    179179
     180  private   : bool                          * reg_EVENT_VAL                      ; //[nb_context]
     181  private   : uint32_t                      * reg_EVENT_UPT_PTR                  ; //[nb_context]
     182
    180183  private   : event_state_t                 * reg_EVENT_STATE                    ; //[nb_context]
    181184  private   : Tdepth_t                      * reg_EVENT_DEPTH                    ; //[nb_context]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp

    r101 r105  
    205205    ALLOC1(reg_UPT_EMPTY                    ,bool         ,_param->_nb_context);
    206206
     207    ALLOC1(reg_EVENT_VAL                    ,bool         ,_param->_nb_context);
     208    ALLOC1(reg_EVENT_UPT_PTR                ,uint32_t     ,_param->_nb_context);
     209
    207210    ALLOC1(reg_EVENT_STATE                  ,event_state_t,_param->_nb_context);
    208211    ALLOC1(reg_EVENT_DEPTH                  ,Tdepth_t     ,_param->_nb_context);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp

    r101 r105  
    158158        DELETE1(reg_UPT_EMPTY                    ,_param->_nb_context);
    159159       
     160        DELETE1(reg_EVENT_VAL                    ,_param->_nb_context);
     161        DELETE1(reg_EVENT_UPT_PTR                ,_param->_nb_context);
     162
    160163        DELETE1(reg_EVENT_STATE                  ,_param->_nb_context);
    161164        DELETE1(reg_EVENT_DEPTH                  ,_param->_nb_context);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_decod.cpp

    r95 r105  
    5050                                            is_accurate and
    5151//                                             (
    52                                              (event_state == EVENT_STATE_OK            )//  or
    53 //                                              (event_state == EVENT_STATE_FLUSH_UFPT    ) or
     52                                             (event_state == EVENT_STATE_OK)//  or
     53//                                              (event_state == EVENT_STATE_MISS_FLUSH_UFPT    ) or
    5454//                                              (event_state == EVENT_STATE_UPDATE_CONTEXT))
    5555                                            );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp

    r101 r105  
    4040        //     include ]DEPTH_MIN:DEPTH_MAX] -> speculative
    4141
    42         PORT_WRITE(out_DEPTH_VAL     [i],(reg_UPDATE_PREDICTION_TABLE [i][reg_UPT_TOP [i]]._state == UPDATE_PREDICTION_STATE_EMPTY));
     42        PORT_WRITE(out_DEPTH_VAL     [i],((reg_UPDATE_PREDICTION_TABLE [i][reg_UPT_TOP [i]]._state == UPDATE_PREDICTION_STATE_EMPTY)
     43                                          and (reg_EVENT_STATE [i] == EVENT_STATE_OK)
     44                                          ));
    4345        if (_param->_have_port_depth)
    4446          {
     
    5961    bool     retire_ras_from_ufpt [_param->_nb_context]; // event ufpt -> restore RAS, else update upt
    6062    bool     retire_ras_from_upt  [_param->_nb_context]; // event upt  -> restore RAS, else restore others structure
     63//     bool     have_event           [_param->_nb_context];
    6164    bool     ufpt_update          [_param->_nb_context];
    6265    bool     upt_update           [_param->_nb_context];
     
    6871        event_state_t event_state = reg_EVENT_STATE [i];
    6972
    70         retire_ras_from_ufpt [i] = ((event_state == EVENT_STATE_FLUSH_UFPT            ) or
    71                                     (event_state == EVENT_STATE_FLUSH_UFPT_AND_UPT));
    72         retire_ras_from_upt  [i] = (event_state == EVENT_STATE_FLUSH_UPT);
     73        retire_ras_from_ufpt [i] = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT         ) or
     74                                    (event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or
     75                                    (event_state == EVENT_STATE_EVENT_FLUSH_UFPT        ) or
     76                                    (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT));
     77        retire_ras_from_upt  [i] = ((event_state == EVENT_STATE_MISS_FLUSH_UPT) or
     78                                    (event_state == EVENT_STATE_EVENT_FLUSH_UPT));
     79
     80//         have_event           [i] = (event_state == EVENT_STATE_EVENT_FLUSH_UPT);
    7381
    7482        ufpt_update          [i] = true;
     
    168176                                                                (state == UPDATE_PREDICTION_STATE_KO   ));
    169177                Tcontrol_t          state_is_event           = ((state == UPDATE_PREDICTION_STATE_KO   ) or
    170                                                                 (state == UPDATE_PREDICTION_STATE_EVENT));
     178                                                                (state == UPDATE_PREDICTION_STATE_EVENT)//  or
     179//                                                                 ((have_event[context])?(state == UPDATE_PREDICTION_STATE_OK):false)
     180                                                                );
     181               
    171182                Tcontrol_t          state_is_event_update    = state_is_event and     need_update(condition);
    172183                Tcontrol_t          state_is_event_no_update = state_is_event and not need_update(condition);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp

    r101 r105  
    5050            reg_IS_ACCURATE          [i] = true;
    5151           
     52            reg_EVENT_VAL            [i] = false;
    5253            reg_EVENT_STATE          [i] = EVENT_STATE_OK;
    5354          }
     
    5556    else
    5657      {
    57         bool flush_UFPT [_param->_nb_context];
     58        bool flush_UFPT    [_param->_nb_context];
    5859        for (uint32_t i=0; i<_param->_nb_context; i++)
    59           flush_UFPT [i] = false;
     60          {
     61            flush_UFPT    [i] = false;
     62          }
    6063
    6164        // ===================================================================
     
    6669        //   * Update state -> new status is "empty"
    6770        //   * Update pointer (bottom and accurate)
    68         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * GARBAGE COLLECTOR");
     71        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * GARBAGE COLLECTOR (BEGIN)");
    6972        for (uint32_t i=0; i<_param->_nb_context; i++)
    7073          {
     
    113116//                   if (bottom = reg_UPT_UPDATE [i])
    114117//                     reg_UPT_UPDATE [i] = reg_UPT_BOTTOM [i];
    115                   if (end_ko) // free
     118
     119                  if (reg_EVENT_VAL [i] and (reg_EVENT_UPT_PTR [i] == bottom))
     120//                   if (end_ko) // free
    116121                    {
     122                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * END EVENT");
     123                     
     124                      reg_EVENT_VAL  [i] = false;
    117125                      reg_UPT_TOP    [i] = reg_UPT_TOP_EVENT [i];
    118126                      reg_UPT_UPDATE [i] = reg_UPT_TOP_EVENT [i];
    119 
     127                     
    120128                      if (reg_UPT_BOTTOM [i] != reg_UPT_TOP [i])
    121129                        reg_UPT_EMPTY [i] = false;
     
    124132            }
    125133          }
     134        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * GARBAGE COLLECTOR (END)");
    126135
    127136        // ===================================================================
     
    218227                  else
    219228                    {
    220                       log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_FLUSH_UFPT (decod - miss - flush ufpt)",context);
    221                       reg_EVENT_STATE [context] = EVENT_STATE_FLUSH_UFPT;
     229                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UFPT (decod - miss - flush ufpt)",context);
     230                      reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UFPT;
    222231                    }
    223232
     
    273282                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._address_ras       = reg_UPDATE_FETCH_PREDICTION_TABLE [context][ufpt_ptr_read]._address_ras ;
    274283                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._index_ras         = reg_UPDATE_FETCH_PREDICTION_TABLE [context][ufpt_ptr_read]._index_ras   ;
    275                   reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._ifetch_prediction = true; // prediction from ifetch
     284                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._ifetch_prediction = true ; // prediction from ifetch
    276285
    277286                  // Update pointer
     
    283292
    284293              // All case !!!
    285 
    286294#ifdef DEBUG_TEST
    287295              if (reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._state != UPDATE_PREDICTION_STATE_EMPTY)
     
    352360
    353361                  if (reg_UPT_BOTTOM [context] == reg_UPT_TOP [context])
    354                     reg_UPT_EMPTY [i] = true;
     362                    reg_UPT_EMPTY [context] = true;
    355363
    356364#ifdef DEBUG_TEST
     
    364372                  Taddress_t    address_src         = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src;
    365373                  event_state_t event_state         = reg_EVENT_STATE [context];
    366                   bool          previous_update_ras = (event_state == EVENT_STATE_FLUSH_UPT);
    367                   bool          update_ras          = (new_update != depth);
    368 
    369                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * update_ras : %d",update_ras);
     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);
    370381
    371382                  if (reg_UFPT_NB_NEED_UPDATE [context] > 0)
    372383                    {
    373                       log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_FLUSH_UFPT_AND_UPT (branch_complete - miss)",context);
    374                       reg_EVENT_STATE [context] = EVENT_STATE_FLUSH_UFPT_AND_UPT;
     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;
    375386                    }
    376387                  else
    377388                    {
    378                       if (not previous_update_ras)
     389//                       if (not previous_update_ras)
    379390                        {
    380391                          // have ras prediction ?
    381                           log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_FLUSH_UPT (branch_complete - miss)",context);
    382 
    383                           reg_EVENT_STATE [context] = EVENT_STATE_FLUSH_UPT;
     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;
    384395             
    385396                        }
     
    442453                        switch (reg_EVENT_STATE [context])
    443454                          {
    444                           case EVENT_STATE_FLUSH_UFPT             : reg_EVENT_STATE [context] = EVENT_STATE_UPDATE_CONTEXT; break;
     455                          case EVENT_STATE_MISS_FLUSH_UFPT         : reg_EVENT_STATE [context] = EVENT_STATE_UPDATE_CONTEXT; break;
    445456                            // impossible to have an update on ufpt and reg_upt_update>reg_upt_top
    446                           case EVENT_STATE_FLUSH_UFPT_AND_UPT : reg_EVENT_STATE [context] = EVENT_STATE_FLUSH_UPT ; break;
     457                          case EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT : reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UPT ; break;
     458                          case EVENT_STATE_EVENT_FLUSH_UFPT        : reg_EVENT_STATE [context] = EVENT_STATE_OK             ; break;
     459                          case EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT: reg_EVENT_STATE [context] = EVENT_STATE_EVENT_FLUSH_UPT; break;
    447460                          default : break;
    448461                          }
     
    478491                        {
    479492                          if ((reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_EVENT) and
    480                               (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_KO   ))
     493                              (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_KO   ) )
    481494                            throw ERRORMORPHEO(FUNCTION,_("Update : invalid upt state."));
    482495                        }
     
    507520                         
    508521                          reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_END_KO;
     522
     523                          reg_EVENT_VAL     [context] = true;
     524                          reg_EVENT_UPT_PTR [context] = depth;
    509525
    510526#ifdef STATISTICS
     
    541557                          if (end_event)
    542558                            {
    543                               reg_UPT_UPDATE [context] = reg_UPT_BOTTOM[context];
    544                               reg_EVENT_STATE [context] = EVENT_STATE_UPDATE_CONTEXT;
     559//                               reg_UPT_UPDATE [context] = reg_UPT_BOTTOM[context];
     560
     561                              if (reg_EVENT_STATE [context] == EVENT_STATE_EVENT_FLUSH_UPT)
     562                                {
     563                                  reg_EVENT_STATE [context] = EVENT_STATE_OK;
     564                                }
     565                              else
     566                                reg_EVENT_STATE [context] = EVENT_STATE_UPDATE_CONTEXT;
    545567                            }
    546568                          else
     
    593615          if (PORT_READ(in_EVENT_VAL [i]) and internal_EVENT_ACK [i])
    594616            {
     617              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * EVENT");
     618
    595619              //----------------------------------------------------------------
    596620              // Cases
     
    606630             
    607631              Tevent_type_t  event_type  = PORT_READ(in_EVENT_TYPE  [i]);
    608 //            Tdepth_t       depth       = PORT_READ(in_EVENT_DEPTH [i]);
    609            
     632
    610633              // Test if end of miss -> all previous branch is complete
    611634              //                     -> all next     branch is finish
    612               if (event_type  == EVENT_TYPE_MISS_SPECULATION)
     635
     636              switch (event_type)
    613637                {
    614                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * EVENT");
    615                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * type  : EVENT_TYPE_MISS_SPECULATION");
    616                  
    617 #ifdef DEBUG_TEST
    618                   if (reg_EVENT_STATE [i] != EVENT_STATE_WAIT_END_EVENT)
    619                     throw ERRORMORPHEO(FUNCTION,_("Event : invalid event state."));
    620 #endif
    621                  
    622                   // Change state
    623                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_OK (event)",i);
    624                  
    625                   reg_EVENT_STATE [i] = EVENT_STATE_OK;
    626                   reg_IS_ACCURATE [i] = true;
    627 
    628 //                   Tdepth_t depth = reg_UPT_TOP [i];
    629 
    630 #ifdef DEBUG_TEST
    631 //                   if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END_KO_WAIT_END)
    632 //                     throw ERRORMORPHEO(FUNCTION,_("Event : invalid upt event state."));
    633 //                   if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END_KO)
    634 //                     throw ERRORMORPHEO(FUNCTION,_("Event : invalid upt event state."));
    635 #endif
    636                  
    637 //                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_END_KO (update)",i,depth);
     638                case EVENT_TYPE_BRANCH_MISS_SPECULATION :
     639                  {
     640                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * type  : EVENT_TYPE_BRANCH_MISS_SPECULATION");
     641                   
     642#ifdef DEBUG_TEST
     643                    if (reg_EVENT_STATE [i] != EVENT_STATE_WAIT_END_EVENT)
     644                      throw ERRORMORPHEO(FUNCTION,_("Event : invalid event state."));
     645#endif
     646                   
     647                    // Change state
     648                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_OK (event)",i);
     649                   
     650                    reg_EVENT_STATE [i] = EVENT_STATE_OK;
     651                    reg_IS_ACCURATE [i] = true;
     652                   
     653//                  Tdepth_t depth = reg_UPT_TOP [i];
     654
     655#ifdef DEBUG_TEST
     656//                  if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END_KO_WAIT_END)
     657//                    throw ERRORMORPHEO(FUNCTION,_("Event : invalid upt event state."));
     658//                  if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END_KO)
     659//                    throw ERRORMORPHEO(FUNCTION,_("Event : invalid upt event state."));
     660#endif
     661                 
     662//                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_END_KO (update)",i,depth);
    638663                         
    639 //                   reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_END_KO;
    640 
     664//                  reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_END_KO;
     665
     666                    break;
     667                  }
     668                case EVENT_TYPE_LOAD_MISS_SPECULATION :
     669                case EVENT_TYPE_EXCEPTION             :
     670                  {
     671                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * type  : EVENT_TYPE_LOAD_MISS_SPECULATION");
     672
     673                    // Have a miss !!!
     674                    // Flush UPFT
     675                    flush_UFPT [i] = true;
     676                   
     677                    // Flush UPT
     678                    Tdepth_t depth      = (_param->_have_port_depth)?PORT_READ(in_EVENT_DEPTH [i]):0;
     679                    uint32_t top        = reg_UPT_TOP    [i];
     680                    uint32_t bottom     = reg_UPT_BOTTOM [i];
     681                    uint32_t new_update = ((top==0)?_param->_size_upt_queue[i]:top)-1;
     682                    uint32_t full       = ((depth == top) and (top == bottom) and not reg_UPT_EMPTY [i]);
     683                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * top        : %d",top);
     684                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * depth      : %d",depth);
     685                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * new_update : %d",new_update);
     686
     687                   
     688#ifdef DEBUG_TEST
     689                    if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END)
     690                      throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state."));
     691#endif
     692
     693                    // flush all slot after the event
     694                    for (uint32_t j=depth;
     695                         j!=top;
     696                         j=(j+1)%_param->_size_upt_queue[i])
     697                      reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EVENT;
     698                     
     699                    // test full :
     700                    if (full)
     701                      reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_EVENT;
     702             
     703//                  reg_UPT_BOTTOM    [i];
     704                    // TODO : special case : event is an exception on branch, also depth is not valid
     705                    reg_UPT_TOP       [i] = depth; // depth is again valid
     706                    reg_UPT_TOP_EVENT [i] = top;
     707
     708                    if (bottom == reg_UPT_TOP [i])
     709                      reg_UPT_EMPTY [i] = true;
     710
     711                    reg_EVENT_VAL     [i] = true;
     712                    reg_EVENT_UPT_PTR [i] = depth;
     713                    event_state_t event_state         = reg_EVENT_STATE [i];
     714                    bool          previous_update_ras = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or
     715                                                         (event_state == EVENT_STATE_MISS_FLUSH_UPT          ) or
     716                                                         (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or
     717                                                         (event_state == EVENT_STATE_EVENT_FLUSH_UPT));
     718                    bool          update_ras          = (top != depth) or full;
     719
     720                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * update_ras : %d",update_ras);
     721                   
     722                    // new state :
     723                    //   * test if ufpt is empty
     724                    //     * ok : flush upft and upt
     725                    //     * ko : test if have previous flush upt
     726                    //            * ok : nothing
     727                    //            * ko : flush upt
     728                    if (reg_UFPT_NB_NEED_UPDATE [i] > 0)
     729                      {
     730                        if (update_ras)
     731                          {
     732                            log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT (branch_complete - miss)",i);
     733                            reg_EVENT_STATE [i] = EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT;
     734                          }
     735                        else
     736                          {
     737                            log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_EVENT_FLUSH_UFPT (branch_complete - miss)",i);
     738                            reg_EVENT_STATE [i] = EVENT_STATE_EVENT_FLUSH_UFPT;
     739                          }                         
     740                      }
     741                    else
     742                      {
     743//                         if (not previous_update_ras)
     744                        if (update_ras)
     745                          {
     746                            // have ras prediction ?
     747                            log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_EVENT_FLUSH_UPT (branch_complete - miss)",i);
     748                           
     749                            reg_EVENT_STATE [i] = EVENT_STATE_EVENT_FLUSH_UPT;
     750                          }
     751                        else
     752                          {
     753                            reg_EVENT_STATE [i] = EVENT_STATE_OK;
     754                          }
     755                      }
     756                   
     757                    if (not previous_update_ras and update_ras)
     758                      {
     759                        reg_UPT_UPDATE [i]  = new_update;
     760                      }
     761                    // else no update
     762                   
     763                    reg_EVENT_DEPTH           [i] = depth;
     764//                  reg_EVENT_ADDRESS_SRC     [i] = address_src; // delay_slot is compute in I_State
     765//                  reg_EVENT_ADDRESS_DEST_VAL[i] = good_take;
     766//                  reg_EVENT_ADDRESS_DEST    [i] = good_addr;
     767
     768                    break;
     769                  }
     770                default :
     771                  {
     772                    // nothing
     773                    break;
     774                  }
    641775                }
    642776            }
     
    706840      {
    707841        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_IS_ACCURATE           : %d",reg_IS_ACCURATE        [i]);
     842        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_VAL             : %d"  ,reg_EVENT_VAL             [i]);
     843        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_UPT_PTR         : %d"  ,reg_EVENT_UPT_PTR         [i]);
    708844        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_STATE           : %s"  ,toString(reg_EVENT_STATE [i]).c_str());
    709845        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_DEPTH           : %d"  ,reg_EVENT_DEPTH           [i]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/src/test.cpp

    r101 r105  
    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   ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS                  ,"out_DECOD_ADDRESS                  ",Tgeneral_data_t      ,_param->_sum_inst_decod);
     70  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT             ,"out_DECOD_ADDRESS_NEXT             ",Tgeneral_data_t      ,_param->_sum_inst_decod);
    7171  ALLOC1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT             ,"out_DECOD_HAS_IMMEDIAT             ",Tcontrol_t           ,_param->_sum_inst_decod);
    7272  ALLOC1_SC_SIGNAL(out_DECOD_IMMEDIAT                 ,"out_DECOD_IMMEDIAT                 ",Tgeneral_data_t      ,_param->_sum_inst_decod);
     
    9797  ALLOC0_SC_SIGNAL( in_COMMIT_EVENT_IS_DELAY_SLOT     ," in_COMMIT_EVENT_IS_DELAY_SLOT     ",Tcontrol_t           );
    9898  ALLOC0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS           ," in_COMMIT_EVENT_ADDRESS           ",Taddress_t           );
     99  ALLOC0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EPCR_VAL  ," in_COMMIT_EVENT_ADDRESS_EPCR_VAL  ",Tcontrol_t           );
    99100  ALLOC0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EPCR      ," in_COMMIT_EVENT_ADDRESS_EPCR      ",Taddress_t           );
    100101  ALLOC0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EEAR_VAL  ," in_COMMIT_EVENT_ADDRESS_EEAR_VAL  ",Tcontrol_t           );
     
    155156  INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_NO_EXECUTE               ,_param->_sum_inst_decod);
    156157  INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_IS_DELAY_SLOT            ,_param->_sum_inst_decod);
    157   INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_ADDRESS                  ,_param->_sum_inst_decod);
     158  INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_ADDRESS_NEXT             ,_param->_sum_inst_decod);
    158159  INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_HAS_IMMEDIAT             ,_param->_sum_inst_decod);
    159160  INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_IMMEDIAT                 ,_param->_sum_inst_decod);
     
    188189  INSTANCE0_SC_SIGNAL(_Front_end, in_COMMIT_EVENT_IS_DELAY_SLOT     );
    189190  INSTANCE0_SC_SIGNAL(_Front_end, in_COMMIT_EVENT_ADDRESS           );
     191  INSTANCE0_SC_SIGNAL(_Front_end, in_COMMIT_EVENT_ADDRESS_EPCR_VAL  );
    190192  INSTANCE0_SC_SIGNAL(_Front_end, in_COMMIT_EVENT_ADDRESS_EPCR      );
    191193  INSTANCE0_SC_SIGNAL(_Front_end, in_COMMIT_EVENT_ADDRESS_EEAR_VAL  );
     
    315317  DELETE1_SC_SIGNAL(out_DECOD_NO_EXECUTE               ,_param->_sum_inst_decod);
    316318  DELETE1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT            ,_param->_sum_inst_decod);
    317   DELETE1_SC_SIGNAL(out_DECOD_ADDRESS                  ,_param->_sum_inst_decod);
     319  DELETE1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT             ,_param->_sum_inst_decod);
    318320  DELETE1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT             ,_param->_sum_inst_decod);
    319321  DELETE1_SC_SIGNAL(out_DECOD_IMMEDIAT                 ,_param->_sum_inst_decod);
     
    344346  DELETE0_SC_SIGNAL( in_COMMIT_EVENT_IS_DELAY_SLOT     );
    345347  DELETE0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS           );
     348  DELETE0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EPCR_VAL  );
    346349  DELETE0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EPCR      );
    347350  DELETE0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EEAR_VAL  );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/include/Front_end.h

    r101 r105  
    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   public    : SC_OUT(Tgeneral_data_t      ) ** out_DECOD_ADDRESS                   ;//[sum_inst_decod]
     96  public    : SC_OUT(Tgeneral_data_t      ) ** out_DECOD_ADDRESS_NEXT              ;//[sum_inst_decod]
    9797  public    : SC_OUT(Tcontrol_t           ) ** out_DECOD_HAS_IMMEDIAT              ;//[sum_inst_decod]
    9898  public    : SC_OUT(Tgeneral_data_t      ) ** out_DECOD_IMMEDIAT                  ;//[sum_inst_decod]
     
    127127  public    : SC_IN (Tcontrol_t           )  *  in_COMMIT_EVENT_IS_DELAY_SLOT       ;
    128128  public    : SC_IN (Taddress_t           )  *  in_COMMIT_EVENT_ADDRESS             ;
     129  public    : SC_IN (Tcontrol_t           )  *  in_COMMIT_EVENT_ADDRESS_EPCR_VAL    ;
    129130  public    : SC_IN (Taddress_t           )  *  in_COMMIT_EVENT_ADDRESS_EPCR        ;
    130131  public    : SC_IN (Tcontrol_t           )  *  in_COMMIT_EVENT_ADDRESS_EEAR_VAL    ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_allocation.cpp

    r101 r105  
    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       ALLOC1_SIGNAL_OUT (out_DECOD_ADDRESS                    ,"ADDRESS"          ,Tgeneral_data_t      ,_param->_size_instruction_address   );
     99      ALLOC1_SIGNAL_OUT (out_DECOD_ADDRESS_NEXT               ,"ADDRESS_NEXT"     ,Tgeneral_data_t      ,_param->_size_instruction_address   );
    100100      ALLOC1_SIGNAL_OUT (out_DECOD_HAS_IMMEDIAT               ,"HAS_IMMEDIAT"     ,Tcontrol_t           ,1                                   );
    101101      ALLOC1_SIGNAL_OUT (out_DECOD_IMMEDIAT                   ,"IMMEDIAT"         ,Tgeneral_data_t      ,_param->_size_general_data          );
     
    138138      ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_IS_DELAY_SLOT       ,"IS_DELAY_SLOT"    ,Tcontrol_t           ,1                       );
    139139      ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_ADDRESS             ,"ADDRESS"          ,Taddress_t           ,_param->_size_instruction_address   );
     140      ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL    ,"ADDRESS_EPCR_VAL" ,Tcontrol_t           ,1                       );
    140141      ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_ADDRESS_EPCR        ,"ADDRESS_EPCR"     ,Taddress_t           ,_param->_size_instruction_address   );
    141142      ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL    ,"ADDRESS_EEAR_VAL" ,Tcontrol_t           ,1                       );
     
    698699          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_IS_DELAY_SLOT",
    699700                              dest,"out_DECOD_"+toString(x)+"_IS_DELAY_SLOT");
    700           PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_ADDRESS"      ,
    701                               dest,"out_DECOD_"+toString(x)+"_ADDRESS"      );
     701          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_ADDRESS_NEXT" ,
     702                              dest,"out_DECOD_"+toString(x)+"_ADDRESS_NEXT" );
    702703          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_HAS_IMMEDIAT" ,
    703704                              dest,"out_DECOD_"+toString(x)+"_HAS_IMMEDIAT" );
     
    919920        PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS"         ,
    920921                            dest, "in_COMMIT_EVENT_ADDRESS"         );
     922        PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EPCR_VAL",
     923                            dest, "in_COMMIT_EVENT_ADDRESS_EPCR_VAL");
    921924        PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EPCR"    ,
    922925                            dest, "in_COMMIT_EVENT_ADDRESS_EPCR"    );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_deallocation.cpp

    r101 r105  
    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         DELETE1_SIGNAL(out_DECOD_ADDRESS                    ,_param->_sum_inst_decod,_param->_size_instruction_address   );
     51        DELETE1_SIGNAL(out_DECOD_ADDRESS_NEXT               ,_param->_sum_inst_decod,_param->_size_instruction_address   );
    5252        DELETE1_SIGNAL(out_DECOD_HAS_IMMEDIAT               ,_param->_sum_inst_decod,1                                   );
    5353        DELETE1_SIGNAL(out_DECOD_IMMEDIAT                   ,_param->_sum_inst_decod,_param->_size_general_data          );
     
    8080        DELETE_SIGNAL ( in_COMMIT_EVENT_IS_DELAY_SLOT       ,1                       );
    8181        DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS             ,_param->_size_instruction_address   );
     82        DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL    ,1                       );
    8283        DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR        ,_param->_size_instruction_address   );
    8384        DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL    ,1                       );
Note: See TracChangeset for help on using the changeset viewer.