Ignore:
Timestamp:
Jan 15, 2009, 6:19:08 PM (15 years ago)
Author:
rosiere
Message:

1) Add soc test
2) fix bug (Pc management, Decod and execute, Update prediction ...)

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end
Files:
57 edited

Legend:

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

    r98 r101  
    213213  // Initialisation
    214214
     215  const bool test1  = true;
     216  const bool test2  = true;
     217  const bool test3  = true;
     218  const bool test4  = true;
     219  const bool test5  = true;
     220  const bool test6  = true;
     221  const bool test7  = true;
     222  const bool test8  = true;
     223  const bool test9  = true;
     224  const bool test10 = true;
     225  const bool test11 = true;
     226  const bool test12 = true;
     227
    215228  const uint32_t seed = 0;
    216229//const uint32_t seed = static_cast<uint32_t>(time(NULL));
     
    264277      uint32_t context    = rand()%_param->_nb_context;
    265278
    266       if (1)
     279      if (test1)
    267280        {
    268281          SC_START(3);
     
    285298          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
    286299         
    287           do
    288             {
    289               in_DECOD_EVENT_VAL [port]->write(rand()%percent_transaction_decod_event);
    290              
    291               SC_START(1);
    292             }
    293           while (not ( in_DECOD_EVENT_VAL [port]->read() and
    294                        out_DECOD_EVENT_ACK [port]->read()));
    295           in_DECOD_EVENT_VAL [port]->write(0);
     300          in_DECOD_EVENT_VAL           [port]->write(1);
     301
     302          SC_START(0);
     303          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     304          TEST(Tcontrol_t, out_DECOD_EVENT_ACK     [port]   ->read(), 0);
     305
     306          SC_START(1);
     307
     308          in_NB_INST_DECOD_ALL  [context]->write(0);
     309          in_NB_INST_COMMIT_ALL [context]->write(0);
     310          in_NB_INST_COMMIT_MEM [context]->write(0);
     311         
     312          LABEL("msync (send decod)");
     313          SC_START(0);
     314          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     315          TEST(Tcontrol_t, out_DECOD_EVENT_ACK     [port]   ->read(), 1);
     316
     317          SC_START(1);
     318
     319          in_DECOD_EVENT_VAL     [port]->write(0);
     320          in_NB_INST_COMMIT_ALL  [context]->write(1);
    296321         
    297322          LABEL("msync (wait end)");
     
    300325          SC_START(3);
    301326         
    302           in_NB_INST_DECOD_ALL  [context]->write(0);
    303           in_NB_INST_COMMIT_ALL [context]->write(1);
    304           in_NB_INST_COMMIT_MEM [context]->write(0);
    305          
    306           SC_START(1);
    307          
    308           LABEL("msync (send decod)");
    309           TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
    310          
    311           SC_START(3);
    312          
    313           in_NB_INST_DECOD_ALL  [context]->write(1);
    314           SC_START(1);
    315          
    316           LABEL("msync (wait end)");
    317           TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0);
    318           in_NB_INST_DECOD_ALL  [context]->write(0);
    319           in_NB_INST_COMMIT_MEM [context]->write(1);
    320          
    321           SC_START(3);
    322          
    323           in_NB_INST_COMMIT_MEM [context]->write(0);
     327          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0);
     328          in_NB_INST_COMMIT_ALL [context]->write(0);
     329
    324330          SC_START(1);
    325331          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
    326332        }
    327333     
    328       if (1)
     334      if (test2)
    329335        {
    330336          SC_START(3);
    331 
     337         
    332338          LABEL("psync (begin)");
    333           in_NB_INST_DECOD_ALL  [context]->write(1);
    334           in_NB_INST_COMMIT_ALL [context]->write(1);
    335           in_NB_INST_COMMIT_MEM [context]->write(1);
    336          
    337           uint32_t port = rand()%_param->_nb_decod_unit;
    338          
    339           in_DECOD_EVENT_CONTEXT_ID    [port]->write(context);
    340           in_DECOD_EVENT_IS_DELAY_SLOT [port]->write(0);
    341           in_DECOD_EVENT_ADDRESS       [port]->write(0x200);
    342           in_DECOD_EVENT_ADDRESS_EPCR  [port]->write(0xdeadbebe);
    343           if (_param->_have_port_depth)
    344           in_DECOD_EVENT_DEPTH         [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
    345           in_DECOD_EVENT_TYPE          [port]->write(EVENT_TYPE_PSYNC);
    346          
    347           TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
    348          
    349           do
    350             {
    351               in_DECOD_EVENT_VAL [port]->write(rand()%percent_transaction_decod_event);
    352          
    353               SC_START(1);
    354             }
    355           while (not ( in_DECOD_EVENT_VAL [port]->read() and
    356                        out_DECOD_EVENT_ACK [port]->read()));
    357           in_DECOD_EVENT_VAL [port]->write(0);
    358          
    359           LABEL("psync (wait end)");
    360           TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0);
    361          
    362           SC_START(3);
    363          
    364           in_NB_INST_DECOD_ALL  [context]->write(0);
    365           in_NB_INST_COMMIT_ALL [context]->write(0);
    366           in_NB_INST_COMMIT_MEM [context]->write(0);
    367          
    368           SC_START(1);
    369 
    370           bool find = false;
    371           do
    372             {
    373               in_EVENT_ACK [context]->write(rand()%percent_transaction_event);
    374          
    375               SC_START(0);
    376          
    377               if (out_EVENT_VAL [context]->read() and in_EVENT_ACK [context]->read())
    378                 {
    379                   TEST(Taddress_t,out_EVENT_ADDRESS          [context]->read(),0x201);
    380                   TEST(Taddress_t,out_EVENT_ADDRESS_NEXT     [context]->read(),0xdeadbebe);
    381                   TEST(Tcontrol_t,out_EVENT_ADDRESS_NEXT_VAL [context]->read(),0);
    382                   TEST(Tcontrol_t,out_EVENT_IS_DS_TAKE       [context]->read(),0);
    383                  
    384                   find = true;
    385                 }
    386              
    387               SC_START(1);
    388             }
    389           while (not find);
    390 
    391           in_EVENT_ACK [context]->write(0);
    392           TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
    393         }
    394 
    395       if (1)
    396         {
    397           SC_START(3);
    398 
    399           LABEL("csync (begin)");
    400339          in_NB_INST_DECOD_ALL  [context]->write(1);
    401340          in_NB_INST_COMMIT_ALL [context]->write(1);
     
    410349          if (_param->_have_port_depth)
    411350          in_DECOD_EVENT_DEPTH         [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
    412           in_DECOD_EVENT_TYPE          [port]->write(EVENT_TYPE_CSYNC);
    413          
    414           TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
    415          
    416           do
    417             {
    418               in_DECOD_EVENT_VAL [port]->write(rand()%percent_transaction_decod_event);
    419          
    420               SC_START(1);
    421             }
    422           while (not ( in_DECOD_EVENT_VAL [port]->read() and
    423                        out_DECOD_EVENT_ACK [port]->read()));
    424           in_DECOD_EVENT_VAL [port]->write(0);
    425          
    426           LABEL("csync (wait end)");
    427           TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0);
    428          
    429           SC_START(3);
    430          
     351          in_DECOD_EVENT_TYPE          [port]->write(EVENT_TYPE_PSYNC);
     352         
     353          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     354         
     355          in_DECOD_EVENT_VAL           [port]->write(1);
     356
     357          SC_START(0);
     358          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     359          TEST(Tcontrol_t, out_DECOD_EVENT_ACK     [port]   ->read(), 0);
     360
     361          SC_START(1);
     362
    431363          in_NB_INST_DECOD_ALL  [context]->write(0);
    432364          in_NB_INST_COMMIT_ALL [context]->write(0);
    433365          in_NB_INST_COMMIT_MEM [context]->write(0);
    434          
     366         
     367          LABEL("psync (send decod)");
     368          SC_START(0);
     369          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     370          TEST(Tcontrol_t, out_DECOD_EVENT_ACK     [port]   ->read(), 1);
     371
     372          SC_START(1);
     373
     374          in_DECOD_EVENT_VAL     [port]->write(0);
     375          in_NB_INST_COMMIT_ALL  [context]->write(1);
     376         
     377          LABEL("psync (wait end)");
     378          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0);
     379         
     380          SC_START(3);
     381         
     382          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0);
     383          in_NB_INST_COMMIT_ALL [context]->write(0);
     384
    435385          SC_START(1);
    436386
     
    448398                  TEST(Tcontrol_t,out_EVENT_ADDRESS_NEXT_VAL [context]->read(),0);
    449399                  TEST(Tcontrol_t,out_EVENT_IS_DS_TAKE       [context]->read(),0);
    450          
    451                   find = true;
    452                 }
    453              
    454               SC_START(1);
    455             }
    456           while (not find);
     400                 
     401                  find = true;
     402                }
     403             
     404              SC_START(1);
     405            }
     406          while (not find);
     407
    457408          in_EVENT_ACK [context]->write(0);
     409          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
    458410        }
    459411
    460       if (1)
     412      if (test3)
    461413        {
    462414          SC_START(3);
    463415         
    464           LABEL("spr (begin)");
     416          LABEL("csync (begin)");
    465417          in_NB_INST_DECOD_ALL  [context]->write(1);
    466418          in_NB_INST_COMMIT_ALL [context]->write(1);
     
    471423          in_DECOD_EVENT_CONTEXT_ID    [port]->write(context);
    472424          in_DECOD_EVENT_IS_DELAY_SLOT [port]->write(0);
    473           in_DECOD_EVENT_ADDRESS       [port]->write(0x100);
    474           in_DECOD_EVENT_ADDRESS_EPCR  [port]->write(0xdeadbeef);
     425          in_DECOD_EVENT_ADDRESS       [port]->write(0x300);
     426          in_DECOD_EVENT_ADDRESS_EPCR  [port]->write(0xdead0300);
     427          if (_param->_have_port_depth)
     428          in_DECOD_EVENT_DEPTH         [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
     429          in_DECOD_EVENT_TYPE          [port]->write(EVENT_TYPE_CSYNC);
     430         
     431          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     432         
     433          in_DECOD_EVENT_VAL           [port]->write(1);
     434
     435          SC_START(0);
     436          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     437          TEST(Tcontrol_t, out_DECOD_EVENT_ACK     [port]   ->read(), 0);
     438
     439          SC_START(1);
     440
     441          in_NB_INST_DECOD_ALL  [context]->write(0);
     442          in_NB_INST_COMMIT_ALL [context]->write(0);
     443          in_NB_INST_COMMIT_MEM [context]->write(0);
     444         
     445          LABEL("csync (send decod)");
     446          SC_START(0);
     447          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     448          TEST(Tcontrol_t, out_DECOD_EVENT_ACK     [port]   ->read(), 1);
     449
     450          SC_START(1);
     451
     452          in_DECOD_EVENT_VAL     [port]->write(0);
     453          in_NB_INST_COMMIT_ALL  [context]->write(1);
     454         
     455          LABEL("csync (wait end)");
     456          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0);
     457         
     458          SC_START(3);
     459         
     460          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0);
     461          in_NB_INST_COMMIT_ALL [context]->write(0);
     462
     463          SC_START(1);
     464
     465          bool find = false;
     466          do
     467            {
     468              in_EVENT_ACK [context]->write(rand()%percent_transaction_event);
     469         
     470              SC_START(0);
     471         
     472              if (out_EVENT_VAL [context]->read() and in_EVENT_ACK [context]->read())
     473                {
     474                  TEST(Taddress_t,out_EVENT_ADDRESS          [context]->read(),0x301);
     475                  TEST(Taddress_t,out_EVENT_ADDRESS_NEXT     [context]->read(),0xdead0300);
     476                  TEST(Tcontrol_t,out_EVENT_ADDRESS_NEXT_VAL [context]->read(),0);
     477                  TEST(Tcontrol_t,out_EVENT_IS_DS_TAKE       [context]->read(),0);
     478                 
     479                  find = true;
     480                }
     481             
     482              SC_START(1);
     483            }
     484          while (not find);
     485
     486          in_EVENT_ACK [context]->write(0);
     487          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     488
     489        }
     490
     491      if (test4)
     492        {
     493          SC_START(3);
     494         
     495          LABEL("spr_access (begin)");
     496          in_NB_INST_DECOD_ALL  [context]->write(1);
     497          in_NB_INST_COMMIT_ALL [context]->write(1);
     498          in_NB_INST_COMMIT_MEM [context]->write(1);
     499         
     500          uint32_t port = rand()%_param->_nb_decod_unit;
     501         
     502          in_DECOD_EVENT_CONTEXT_ID    [port]->write(context);
     503          in_DECOD_EVENT_IS_DELAY_SLOT [port]->write(0);
     504          in_DECOD_EVENT_ADDRESS       [port]->write(0x400);
     505          in_DECOD_EVENT_ADDRESS_EPCR  [port]->write(0xdead0400);
    475506          if (_param->_have_port_depth)
    476507          in_DECOD_EVENT_DEPTH         [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
     
    479510          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
    480511         
    481           do
    482             {
    483               in_DECOD_EVENT_VAL [port]->write(rand()%percent_transaction_decod_event);
    484              
    485               SC_START(1);
    486             }
    487           while (not ( in_DECOD_EVENT_VAL [port]->read() and
    488                        out_DECOD_EVENT_ACK [port]->read()));
    489           in_DECOD_EVENT_VAL [port]->write(0);
    490          
    491           LABEL("spr (wait end)");
    492           TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0);
    493          
    494           SC_START(3);
    495          
     512          in_DECOD_EVENT_VAL           [port]->write(1);
     513
     514          SC_START(0);
     515          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     516          TEST(Tcontrol_t, out_DECOD_EVENT_ACK     [port]   ->read(), 0);
     517
     518          SC_START(1);
     519
    496520          in_NB_INST_DECOD_ALL  [context]->write(0);
    497521          in_NB_INST_COMMIT_ALL [context]->write(0);
    498522          in_NB_INST_COMMIT_MEM [context]->write(0);
    499          
    500           SC_START(1);
    501          
    502           LABEL("spr (send decod)");
    503           TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
    504          
    505           SC_START(3);
    506          
    507           in_NB_INST_DECOD_ALL  [context]->write(1);
    508           SC_START(1);
    509          
    510           LABEL("spr (wait end)");
    511           TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0);
    512           in_NB_INST_DECOD_ALL  [context]->write(0);
    513           in_NB_INST_COMMIT_ALL [context]->write(1);
    514          
    515           SC_START(3);
    516          
    517           in_NB_INST_COMMIT_ALL [context]->write(0);
     523         
     524          LABEL("spr_access (send decod)");
     525          SC_START(0);
     526          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     527          TEST(Tcontrol_t, out_DECOD_EVENT_ACK     [port]   ->read(), 1);
     528
     529          SC_START(1);
     530
     531          in_DECOD_EVENT_VAL     [port]->write(0);
     532          in_NB_INST_COMMIT_ALL  [context]->write(1);
     533         
     534          LABEL("spr_access (wait end)");
     535          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0);
     536         
     537          SC_START(3);
     538         
     539          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0);
     540          in_NB_INST_COMMIT_ALL [context]->write(0);
     541
    518542          SC_START(1);
    519543          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
    520544        }
    521545
    522       if (1)
     546      if (test5)
    523547        {
    524548          SC_START(3);
     
    610634        }
    611635
    612       if (1)
     636      if (test6)
    613637        {
    614638          SC_START(3);
     
    697721        }
    698722
    699       if (1)
     723      if (test7)
    700724        {
    701725          SC_START(3);
     
    791815        }
    792816
    793       if (1)
     817      if (test8)
    794818        {
    795819          SC_START(3);
     
    885909        }
    886910
    887       if (1)
     911      if (test9)
    888912        {
    889913          SC_START(3);
     
    9791003        }
    9801004     
    981       if (1)
     1005      if (test10)
    9821006        {
    9831007          SC_START(3);
     
    10731097        }
    10741098
    1075       if (1)
     1099      if (test11)
    10761100        {
    10771101          SC_START(3);
     
    11671191        }
    11681192     
    1169       if (1)
     1193      if (test12)
    11701194        {
    11711195          SC_START(3);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Context_State.h

    r98 r101  
    197197  public  : void        transition                (void);
    198198  public  : void        genMoore                  (void);
     199  public  : void        genMealy_decod_event      (void);
    199200#endif                                         
    200201
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Types.h

    r83 r101  
    2929      CONTEXT_STATE_KO_EXCEP_ADDR   , // update address manager
    3030      CONTEXT_STATE_KO_EXCEP_SPR    , // update spr (epc, esr, sr[DSX])
    31       CONTEXT_STATE_KO_MISS         , // wait end of event (miss (branch, load))
    3231      CONTEXT_STATE_KO_MISS_ADDR    , // update address manager
    33       CONTEXT_STATE_KO_MSYNC        , // wait completion of all memory operation
    34       CONTEXT_STATE_KO_MSYNC_ISSUE  , // issue msync operation
     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
    3535      CONTEXT_STATE_KO_MSYNC_EXEC   , // wait completion of     msync  operation
    36       CONTEXT_STATE_KO_PSYNC        , // wait completion of all        operation and after flush pipeline
     36//    CONTEXT_STATE_KO_PSYNC        , // wait completion of all        operation and after flush pipeline
    3737      CONTEXT_STATE_KO_PSYNC_FLUSH  , // wait completion of all
    3838      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 ...)
     39//    CONTEXT_STATE_KO_CSYNC        , // wait completion of all        operation and after flush pipeline and flush ALL units (MMU, cache ...)
    4040      CONTEXT_STATE_KO_CSYNC_FLUSH  ,
    4141      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
     42//    CONTEXT_STATE_KO_SPR          , // wait completion of all        operation
     43//    CONTEXT_STATE_KO_SPR_ISSUE    , // issue spr's access
    4444      CONTEXT_STATE_KO_SPR_EXEC       // wait completion of all        operation (spr access)
    4545    } context_state_t;
     
    6060      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP_ADDR   : return "context_state_ko_excep_addr"  ; break;
    6161      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         : return "context_state_ko_miss"        ; break;
    6362      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_ADDR    : return "context_state_ko_miss_addr"   ; 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;
     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;
    6666      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;
     67//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC        : return "context_state_ko_psync"       ; break;
    6868      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC_FLUSH  : return "context_state_ko_psync_flush" ; break;
    6969      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;
     70//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC        : return "context_state_ko_csync"       ; break;
    7171      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC_FLUSH  : return "context_state_ko_csync_flush" ; break;
    7272      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;
     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;
    7575      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR_EXEC     : return "context_state_ko_spr_exec"    ; break;
    7676      default    : return ""      ; break;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State.cpp

    r88 r101  
    8282          }
    8383
    84         for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
    85           {
    86             internal_DECOD_EVENT_ACK [i] = 1;
    87             PORT_WRITE(out_DECOD_EVENT_ACK [i], internal_DECOD_EVENT_ACK [i]);
    88           }
     84//      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     85//        {
     86//          internal_DECOD_EVENT_ACK [i] = 1;
     87//          PORT_WRITE(out_DECOD_EVENT_ACK [i], internal_DECOD_EVENT_ACK [i]);
     88//        }
    8989
    9090        internal_COMMIT_EVENT_ACK = 1;
     
    112112        dont_initialize ();
    113113        sensitive << (*(in_CLOCK)).neg(); // use internal register
     114       
     115# ifdef SYSTEMCASS_SPECIFIC
     116        // List dependency information
     117# endif   
     118
     119        log_printf(INFO,Context_State,FUNCTION,_("Method - genMealy_decod_event"));
     120
     121        SC_METHOD (genMealy_decod_event);
     122        dont_initialize ();
     123        sensitive << (*(in_CLOCK)).neg(); // use internal register
     124        for (uint32_t i=0; i<_param->_nb_decod_unit; ++i)
     125          {
     126            sensitive << (*(in_DECOD_EVENT_VAL        [i])) // not necessary
     127                      << (*(in_DECOD_EVENT_TYPE       [i]));
     128            if (_param->_have_port_context_id)                                 
     129            sensitive << (*(in_DECOD_EVENT_CONTEXT_ID [i]));
     130          }
     131        for (uint32_t i=0; i<_param->_nb_context; ++i)
     132          {
     133            sensitive << (*(in_NB_INST_DECOD_ALL      [i]))
     134                      << (*(in_NB_INST_COMMIT_ALL     [i]))
     135                      << (*(in_NB_INST_COMMIT_MEM     [i]));
     136          }
    114137       
    115138# ifdef SYSTEMCASS_SPECIFIC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMoore.cpp

    r97 r101  
    105105        context_state_t state = reg_STATE [i];
    106106
    107         PORT_WRITE(out_CONTEXT_DECOD_ENABLE [i], ((state==CONTEXT_STATE_OK            ) or
    108                                                   (state==CONTEXT_STATE_KO_MSYNC_ISSUE) or
    109                                                   (state==CONTEXT_STATE_KO_SPR_ISSUE  )));
     107//      PORT_WRITE(out_CONTEXT_DECOD_ENABLE [i], ((state==CONTEXT_STATE_OK            ) or
     108//                                                (state==CONTEXT_STATE_KO_MSYNC_ISSUE) or
     109//                                                (state==CONTEXT_STATE_KO_SPR_ISSUE  )));
     110        PORT_WRITE(out_CONTEXT_DECOD_ENABLE [i], (state==CONTEXT_STATE_OK));
    110111      }
    111112
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp

    r98 r101  
    3535      {
    3636        // -------------------------------------------------------------------
     37        // -----[ next state ]------------------------------------------------
     38        // -------------------------------------------------------------------
     39        for (uint32_t i=0; i<_param->_nb_context; i++)
     40          {
     41//             uint32_t x = _param->_link_context_to_decod_unit    [i];
     42
     43            Tcounter_t inst_all = PORT_READ(in_NB_INST_COMMIT_ALL[i]) + PORT_READ(in_NB_INST_DECOD_ALL [i]);
     44//          Tcounter_t inst_mem = PORT_READ(in_NB_INST_COMMIT_MEM[i]) + PORT_READ(in_NB_INST_DECOD_ALL [i]);
     45
     46            context_state_t state = reg_STATE [i];
     47
     48            switch (state)
     49              {
     50              case CONTEXT_STATE_OK              :
     51                {
     52                  // nothing, wait an event
     53                  break;
     54                }
     55              case CONTEXT_STATE_KO_EXCEP        :
     56                {
     57                  // Wait end of all instruction
     58                  if (inst_all == 0)
     59                    state = CONTEXT_STATE_KO_EXCEP_ADDR;
     60                  break;
     61                }
     62              case CONTEXT_STATE_KO_EXCEP_ADDR   :
     63                {
     64                  // nothing, wait the update of internal register (pc)
     65                  break;
     66                }
     67              case CONTEXT_STATE_KO_MISS_WAITEND :
     68                {
     69                  // Wait end of all instruction
     70                  if (inst_all == 0)
     71                   
     72//                  state = CONTEXT_STATE_OK; // @@@ TODO : make MISS fast (miss decod)
     73                    state = CONTEXT_STATE_KO_MISS_ADDR;
     74                  break;
     75                }
     76              case CONTEXT_STATE_KO_EXCEP_SPR    :
     77                {
     78                  // nothing, wait the update of internal register (epcr, eear, sr, esr)
     79                  break;
     80                }
     81              case CONTEXT_STATE_KO_MISS_ADDR    :
     82                {
     83                  // nothing, wait the update of internal register (pc)
     84                  break;
     85                }
     86//               case CONTEXT_STATE_KO_PSYNC        :
     87//                 {
     88//                   // Wait end of all instruction
     89//                   if (inst_all == 0)
     90//                     state = CONTEXT_STATE_KO_PSYNC_FLUSH;
     91//                   break;
     92//                 }
     93              case CONTEXT_STATE_KO_PSYNC_FLUSH  :
     94                {
     95                  // nothing, wait end of flush (ifetch)
     96                  if (inst_all == 0)
     97//                  state = CONTEXT_STATE_KO_PSYNC_ADDR;
     98                    state = CONTEXT_STATE_OK;
     99                   
     100                  break;
     101                }
     102              case CONTEXT_STATE_KO_PSYNC_ADDR   :
     103                {
     104                  // nothing, wait the pc write
     105                  break;
     106                }
     107//               case CONTEXT_STATE_KO_CSYNC        :
     108//                 {
     109//                   // Wait end of all instruction
     110//                   if (inst_all == 0)
     111//                     state = CONTEXT_STATE_KO_CSYNC_FLUSH;
     112//                   break;
     113//                 }
     114              case CONTEXT_STATE_KO_CSYNC_FLUSH  :
     115                {
     116                  // nothing, wait end of flush (all internal structure)
     117                  if (inst_all == 0)
     118                    state = CONTEXT_STATE_KO_CSYNC_ADDR;
     119                  break;
     120                }
     121              case CONTEXT_STATE_KO_CSYNC_ADDR   :
     122                {
     123                  // nothing, wait the pc write
     124                  break;
     125                }
     126//               case CONTEXT_STATE_KO_MSYNC        :
     127//                 {
     128//                   // Wait end of memory instruction
     129//                   if (inst_mem == 0)
     130//                     state = CONTEXT_STATE_KO_MSYNC_ISSUE;
     131//                   break;
     132//                 }
     133//               case CONTEXT_STATE_KO_MSYNC_ISSUE  :
     134//                 {
     135//                   // Wait the msync issue
     136//                   if (inst_mem != 0)
     137//                     state = CONTEXT_STATE_KO_MSYNC_EXEC;
     138//                   break;
     139//                 }
     140              case CONTEXT_STATE_KO_MSYNC_EXEC   :
     141                {
     142                  // Wait the end of msync
     143                  if (inst_all == 0)
     144                    state = CONTEXT_STATE_OK;
     145                  break;
     146                }
     147//               case CONTEXT_STATE_KO_SPR          :
     148//                 {
     149//                   // Wait end of all instruction
     150//                   if (inst_all == 0)
     151//                     state = CONTEXT_STATE_KO_SPR_ISSUE;
     152//                   break;
     153//                 }
     154//               case CONTEXT_STATE_KO_SPR_ISSUE    :
     155//                 {
     156//                   // Wait the spr_access issue
     157//                   if (inst_all != 0)
     158//                     state = CONTEXT_STATE_KO_SPR_EXEC;
     159//                   break;
     160//                 }
     161              case CONTEXT_STATE_KO_SPR_EXEC     :
     162                {
     163                  // Wait the spr_access execution
     164                  if (inst_all == 0)
     165                    state = CONTEXT_STATE_OK;
     166                  break;
     167                }
     168
     169              default :
     170                {
     171                  throw ERRORMORPHEO(FUNCTION,toString(_("Context[%d], Unknow state : %s.\n"),i,toString(state).c_str()));
     172                }
     173              }
     174            reg_STATE [i] = state;
     175          }
     176
     177        // -------------------------------------------------------------------
    37178        // -----[ BRANCH_EVENT ]----------------------------------------------
    38179        // -------------------------------------------------------------------
     
    57198
    58199              // priority : miss > excep > spr/sync
    59               uint8_t    priority0  = (state == CONTEXT_STATE_KO_MISS)?2:((state == EVENT_TYPE_EXCEPTION)?1:0);
     200              uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_ADDR) or (state == CONTEXT_STATE_KO_MISS_WAITEND))?2:((state == EVENT_TYPE_EXCEPTION)?1:0);
    60201              uint8_t    priority1  = 2; // miss
    61202
     
    71212                {
    72213                  Tcontrol_t dest_val = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST_VAL[i]);
    73                   reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS;
     214//                reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_ADDR;
     215                  reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_WAITEND; //@@@ TODO : make MISS fast (miss decod)
    74216                  reg_EVENT_ADDRESS          [i] =  PORT_READ(in_BRANCH_EVENT_ADDRESS_SRC  [i])+1; // address delay slot
    75217                  reg_EVENT_ADDRESS_EPCR     [i] =  PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST [i]);   // address_next
     
    107249             
    108250              // miss > excep > spr/sync
    109               uint8_t    priority0  = (state == CONTEXT_STATE_KO_MISS)?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
     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);
    110252              uint8_t    priority1  = (state == EVENT_TYPE_EXCEPTION)?1:0;
    111253
     
    120262              if (is_valid)
    121263                {
     264                  log_printf(TRACE,Context_State,FUNCTION,"    * is_valid");
     265
    122266                  // decod :
    123267                  // type : csync, psync, msync, spr_access (l.mac, l.maci, l.macrc, l.msb, l.mfspr, l.mtspr), exception (l.sys)
     
    130274                    case EVENT_TYPE_EXCEPTION          :
    131275                      {
     276                        log_printf(TRACE,Context_State,FUNCTION,"    * EVENT_TYPE_EXCEPTION");
     277
    132278                        state_next = CONTEXT_STATE_KO_EXCEP;
    133279
     
    136282                    case EVENT_TYPE_SPR_ACCESS         :
    137283                      {
    138                         state_next = CONTEXT_STATE_KO_SPR  ;
     284                        log_printf(TRACE,Context_State,FUNCTION,"    * EVENT_TYPE_SPR_ACCESS");
     285
     286//                      state_next = CONTEXT_STATE_KO_SPR  ;
     287                        state_next = CONTEXT_STATE_KO_SPR_EXEC;
    139288                        address++; // take next address
    140                         if (is_delay_slot)
    141                           throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");
     289//                         if (is_delay_slot)
     290//                           throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");
    142291                        break;
    143292                      }
    144293                    case EVENT_TYPE_MSYNC              :
    145294                      {
    146                         state_next = CONTEXT_STATE_KO_MSYNC;
     295                        log_printf(TRACE,Context_State,FUNCTION,"    * EVENT_TYPE_MSYNC");
     296
     297//                      state_next = CONTEXT_STATE_KO_MSYNC;
     298                        state_next = CONTEXT_STATE_KO_MSYNC_EXEC;
    147299                        address++;  // take next address
    148                         if (is_delay_slot)
    149                           throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");
     300//                         if (is_delay_slot)
     301//                           throw ERRORMORPHEO(FUNCTION,"MSYNC in delay slot, not supported.\n");
    150302                        break;
    151303                      }
    152304                    case EVENT_TYPE_PSYNC              :
    153305                      {
    154                         state_next = CONTEXT_STATE_KO_PSYNC;
     306                        log_printf(TRACE,Context_State,FUNCTION,"    * EVENT_TYPE_PSYNC");
     307
     308//                      state_next = CONTEXT_STATE_KO_PSYNC;
     309                        state_next = CONTEXT_STATE_KO_PSYNC_FLUSH;
    155310                        address++;  // take next address
    156311                        if (is_delay_slot)
    157                           throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");
     312                          throw ERRORMORPHEO(FUNCTION,"PSYNC in delay slot, not supported.\n");
    158313                        break;
    159314                      }
    160315                    case EVENT_TYPE_CSYNC              :
    161316                      {
    162                         state_next = CONTEXT_STATE_KO_CSYNC;
     317                        log_printf(TRACE,Context_State,FUNCTION,"    * EVENT_TYPE_CSYNC");
     318
     319//                      state_next = CONTEXT_STATE_KO_CSYNC;
     320                        state_next = CONTEXT_STATE_KO_CSYNC_FLUSH;
    163321                        address++;  // take next address
    164322                        if (is_delay_slot)
    165                           throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");
     323                          throw ERRORMORPHEO(FUNCTION,"CSYNC in delay slot, not supported.\n");
    166324                        break;
    167325                      }               
     
    210368           
    211369            // miss > excep > spr/sync
    212             uint8_t    priority0  = (state == CONTEXT_STATE_KO_MISS)?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
     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);
    213371            uint8_t    priority1  = 1; // exception
    214372
     
    277435                 
    278436//                   // miss > excep > spr/sync
    279 //                   uint8_t    priority0  = (state == CONTEXT_STATE_KO_MISS)?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
     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);
    280438//                   uint8_t    priority1  = 2; // miss
    281439                 
     
    323481                  }
    324482                case CONTEXT_STATE_KO_MISS_ADDR  :
     483//                   {
     484//                     reg_STATE [i] = CONTEXT_STATE_KO_MISS_WAITEND; //@@@ TODO : make MISS fast (miss decod)
     485//                     break;
     486//                   }
    325487                case CONTEXT_STATE_KO_PSYNC_ADDR :
    326488                case CONTEXT_STATE_KO_CSYNC_ADDR :
     
    357519              reg_STATE [i] = CONTEXT_STATE_OK;
    358520            }
    359 
    360         // -------------------------------------------------------------------
    361         // -----[ next state ]------------------------------------------------
    362         // -------------------------------------------------------------------
    363         for (uint32_t i=0; i<_param->_nb_context; i++)
    364           {
    365 //             uint32_t x = _param->_link_context_to_decod_unit    [i];
    366 
    367             Tcounter_t inst_all = PORT_READ(in_NB_INST_COMMIT_ALL[i]) + PORT_READ(in_NB_INST_DECOD_ALL [i]);
    368             Tcounter_t inst_mem = PORT_READ(in_NB_INST_COMMIT_MEM[i]) + PORT_READ(in_NB_INST_DECOD_ALL [i]);
    369 
    370             context_state_t state = reg_STATE [i];
    371 
    372             switch (state)
    373               {
    374               case CONTEXT_STATE_OK              :
    375                 {
    376                   // nothing, wait an event
    377                   break;
    378                 }
    379               case CONTEXT_STATE_KO_EXCEP        :
    380                 {
    381                   // Wait end of all instruction
    382                   if (inst_all == 0)
    383                     state = CONTEXT_STATE_KO_EXCEP_ADDR;
    384                   break;
    385                 }
    386               case CONTEXT_STATE_KO_MISS         :
    387                 {
    388                   // Wait end of all instruction
    389                   if (inst_all == 0)
    390                     state = CONTEXT_STATE_KO_MISS_ADDR;
    391                   break;
    392                 }
    393               case CONTEXT_STATE_KO_EXCEP_ADDR   :
    394                 {
    395                   // nothing, wait the update of internal register (pc)
    396                   break;
    397                 }
    398               case CONTEXT_STATE_KO_EXCEP_SPR    :
    399                 {
    400                   // nothing, wait the update of internal register (epcr, eear, sr, esr)
    401                   break;
    402                 }
    403               case CONTEXT_STATE_KO_MISS_ADDR    :
    404                 {
    405                   // nothing, wait the update of internal register (pc)
    406                   break;
    407                 }
    408               case CONTEXT_STATE_KO_PSYNC        :
    409                 {
    410                   // Wait end of all instruction
    411                   if (inst_all == 0)
    412 //                  state = CONTEXT_STATE_KO_PSYNC_FLUSH;
    413                     state = CONTEXT_STATE_KO_PSYNC_ADDR ;
    414                   break;
    415                 }
    416 //            case CONTEXT_STATE_KO_PSYNC_FLUSH  :
    417 //              {
    418 //                // nothing, wait end of flush (ifetch)
    419 //                break;
    420 //              }
    421               case CONTEXT_STATE_KO_PSYNC_ADDR   :
    422                 {
    423                   // nothing, wait the pc write
    424                   break;
    425                 }
    426               case CONTEXT_STATE_KO_CSYNC        :
    427                 {
    428                   // Wait end of all instruction
    429                   if (inst_all == 0)
    430                     state = CONTEXT_STATE_KO_CSYNC_ADDR ;
    431 //                  state = CONTEXT_STATE_KO_CSYNC_FLUSH;
    432                   break;
    433                 }
    434 //            case CONTEXT_STATE_KO_CSYNC_FLUSH  :
    435 //              {
    436 //                // nothing, wait end of flush (all internal structure)
    437 //                break;
    438 //              }
    439               case CONTEXT_STATE_KO_CSYNC_ADDR   :
    440                 {
    441                   // nothing, wait the pc write
    442                   break;
    443                 }
    444               case CONTEXT_STATE_KO_MSYNC        :
    445                 {
    446                   // Wait end of memory instruction
    447                   if (inst_mem == 0)
    448                     state = CONTEXT_STATE_KO_MSYNC_ISSUE;
    449                   break;
    450                 }
    451               case CONTEXT_STATE_KO_MSYNC_ISSUE  :
    452                 {
    453                   // Wait the msync issue
    454                   if (inst_mem != 0)
    455                     state = CONTEXT_STATE_KO_MSYNC_EXEC;
    456                   break;
    457                 }
    458               case CONTEXT_STATE_KO_MSYNC_EXEC   :
    459                 {
    460                   // Wait the end of msync
    461                   if (inst_mem == 0)
    462                     state = CONTEXT_STATE_OK;
    463                   break;
    464                 }
    465               case CONTEXT_STATE_KO_SPR          :
    466                 {
    467                   // Wait end of all instruction
    468                   if (inst_all == 0)
    469                     state = CONTEXT_STATE_KO_SPR_ISSUE;
    470                   break;
    471                 }
    472               case CONTEXT_STATE_KO_SPR_ISSUE    :
    473                 {
    474                   // Wait the spr_access issue
    475                   if (inst_all != 0)
    476                     state = CONTEXT_STATE_KO_SPR_EXEC;
    477                   break;
    478                 }
    479               case CONTEXT_STATE_KO_SPR_EXEC     :
    480                 {
    481                   // Wait the spr_access execution
    482                   if (inst_all == 0)
    483                     state = CONTEXT_STATE_OK;
    484                   break;
    485                 }
    486 
    487               default :
    488                 {
    489                   throw ERRORMORPHEO(FUNCTION,toString(_("Context[%d], Unknow state : %s.\n"),i,toString(state).c_str()));
    490                 }
    491               }
    492             reg_STATE [i] = state;
    493           }
    494521
    495522        for (uint32_t i=0; i<_param->_nb_context; ++i)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/src/Instruction.cpp

    r100 r101  
    2929  void instruction_decod               (decod_instruction_t * inst, decod_param_t * param)
    3030  {
     31    log_printf(TRACE,Decod,"instruction_decod","  * instruction   : decod");
     32
    3133//     instruction_decod_type_0 (inst,param);
    3234
    3335    uint32_t opcod = range<uint32_t>(inst->_instruction,31,26);
     36
     37    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     38
    3439    (* param->_function_decod[ 0][opcod]) (inst,param);
    3540  }
     
    4348  void instruction_decod_type_1        (decod_instruction_t * inst, decod_param_t * param)
    4449  {
     50    log_printf(TRACE,Decod,"instruction_decod_type_1","  * instruction   : decod type_1");
     51   
    4552    uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 0);
     53
     54    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     55
    4656    (* param->_function_decod[ 1][opcod]) (inst,param);
    4757  }
     
    4959  void instruction_decod_type_2        (decod_instruction_t * inst, decod_param_t * param)
    5060  {
     61    log_printf(TRACE,Decod,"instruction_decod_type_2","  * instruction   : decod type_2");
     62
    5163    uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 0);
     64
     65    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     66
    5267    (* param->_function_decod[ 2][opcod]) (inst,param);
    5368  }
     
    5570  void instruction_decod_type_3        (decod_instruction_t * inst, decod_param_t * param)
    5671  {
     72    log_printf(TRACE,Decod,"instruction_decod_type_3","  * instruction   : decod type_3");
     73
    5774    uint32_t opcod = ((range<uint32_t>(inst->_instruction, 9, 8)<<4) |
    5875                      (range<uint32_t>(inst->_instruction, 3, 0)));
     76
     77    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     78
    5979    (* param->_function_decod[ 3][opcod]) (inst,param);
    6080  }
     
    6282  void instruction_decod_type_4        (decod_instruction_t * inst, decod_param_t * param)
    6383  {
     84    log_printf(TRACE,Decod,"instruction_decod_type_4","  * instruction   : decod type_4");
     85
    6486    uint32_t opcod = range<uint32_t>(inst->_instruction,25,21);
     87
     88    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     89
    6590    (* param->_function_decod[ 4][opcod]) (inst,param);
    6691  }
     
    6893  void instruction_decod_type_5        (decod_instruction_t * inst, decod_param_t * param)
    6994  {
     95    log_printf(TRACE,Decod,"instruction_decod_type_5","  * instruction   : decod type_5");
     96
    7097    uint32_t opcod = range<uint32_t>(inst->_instruction,25,21);
     98
     99    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     100
    71101    (* param->_function_decod[ 5][opcod]) (inst,param);
    72102  }
     
    74104  void instruction_decod_type_6        (decod_instruction_t * inst, decod_param_t * param)
    75105  {
     106    log_printf(TRACE,Decod,"instruction_decod_type_6","  * instruction   : decod type_6");
     107
    76108    uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 6);
     109
     110    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     111
    77112    (* param->_function_decod[ 6][opcod]) (inst,param);
    78113  }
     
    80115  void instruction_decod_type_7        (decod_instruction_t * inst, decod_param_t * param)
    81116  {
     117    log_printf(TRACE,Decod,"instruction_decod_type_7","  * instruction   : decod type_7");
     118
    82119    uint32_t opcod = range<uint32_t>(inst->_instruction, 3, 0);
     120
     121    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     122
    83123    (* param->_function_decod[ 7][opcod]) (inst,param);
    84124  }
     
    86126  void instruction_decod_type_8        (decod_instruction_t * inst, decod_param_t * param)
    87127  {
     128    log_printf(TRACE,Decod,"instruction_decod_type_8","  * instruction   : decod type_8");
     129
    88130    uint32_t opcod = range<uint32_t>(inst->_instruction,16,16);
     131
     132    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     133
    89134    (* param->_function_decod[ 8][opcod]) (inst,param);
    90135  }
     
    92137  void instruction_decod_type_9        (decod_instruction_t * inst, decod_param_t * param)
    93138  {
     139    log_printf(TRACE,Decod,"instruction_decod_type_9","  * instruction   : decod type_9");
     140
    94141    uint32_t opcod = range<uint32_t>(inst->_instruction,25,23);
     142
     143    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     144
    95145    (* param->_function_decod[ 9][opcod]) (inst,param);
    96146  }
     
    98148  void instruction_decod_type_10       (decod_instruction_t * inst, decod_param_t * param)
    99149  {
     150    log_printf(TRACE,Decod,"instruction_decod_type_10","  * instruction   : decod type_10");
     151
    100152    uint32_t opcod = range<uint32_t>(inst->_instruction,25,24);
     153
     154    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     155
    101156    (* param->_function_decod[10][opcod]) (inst,param);
    102157  }
     
    104159  void instruction_decod_type_11       (decod_instruction_t * inst, decod_param_t * param)
    105160  {
     161    log_printf(TRACE,Decod,"instruction_decod_type_11","  * instruction   : decod type_11");
     162
    106163    uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 6);
     164
     165    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     166
    107167    (* param->_function_decod[11][opcod]) (inst,param);
    108168  }
     
    110170  void instruction_decod_type_12       (decod_instruction_t * inst, decod_param_t * param)
    111171  {
     172    log_printf(TRACE,Decod,"instruction_decod_type_12","  * instruction   : decod type_12");
     173
    112174    uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 6);
     175
     176    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     177
    113178    (* param->_function_decod[12][opcod]) (inst,param);
    114179  }
     
    116181  void instruction_decod_type_13       (decod_instruction_t * inst, decod_param_t * param)
    117182  {
     183    log_printf(TRACE,Decod,"instruction_decod_type_13","  * instruction   : decod type_13");
     184
    118185    uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 6);
     186
     187    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     188
    119189    (* param->_function_decod[13][opcod]) (inst,param);
    120190  }
     
    122192  void instruction_illegal             (decod_instruction_t * inst, decod_param_t * param)
    123193  {
    124     log_printf(TRACE,Decod,"instruction_illegal","instruction_illegal");
     194    log_printf(TRACE,Decod,"instruction_illegal","  * instruction   : illegal");
     195
     196    msgWarning(_("Instruction \"%.8x\" at address \"%.8x\" is illegal.\n"),inst->_instruction,inst->_address);
    125197       
    126198    inst->_exception_use = EXCEPTION_USE_ILLEGAL_INSTRUCTION;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/include/Decod_request.h

    r95 r101  
    156156    0xe1e4f801,x,y,z,
    157157    BRANCH_STATE_NONE,0,BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK,0,0x0,
    158     0,TYPE_ALU,OPERATION_ALU_L_ADD,false,
     158    0,TYPE_ALU,OPERATION_ALU_L_ADDC,false,
    159159    0,0x00000000,1, 4,1,31,1,SPR_LOGIC_SR_CY_OV,1,15,1,SPR_LOGIC_SR_CY_OV,
    160160    EXCEPTION_USE_RANGE,EVENT_TYPE_NONE));
     
    192192    0xa0ecffff,x,y,z,
    193193    BRANCH_STATE_NONE,0,BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK,0, 0x0,
    194     0,TYPE_ALU,OPERATION_ALU_L_ADD,false,
     194    0,TYPE_ALU,OPERATION_ALU_L_ADDC,false,
    195195    1,0xffffffff,1,12,0, 0,1,SPR_LOGIC_SR_CY_OV,1,7 ,1,SPR_LOGIC_SR_CY_OV,
    196196    EXCEPTION_USE_RANGE,EVENT_TYPE_NONE));
     
    201201    0xa1110000,x,y,z,
    202202    BRANCH_STATE_NONE,0,BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK,0, 0x0,
    203     0,TYPE_ALU,OPERATION_ALU_L_ADD,false,
     203    0,TYPE_ALU,OPERATION_ALU_L_ADDC,false,
    204204    1,0x00000000,1,17,0, 0,1,SPR_LOGIC_SR_CY_OV,1,8 ,1,SPR_LOGIC_SR_CY_OV,
    205205    EXCEPTION_USE_RANGE,EVENT_TYPE_NONE));
     
    210210    0xa2a707bd,x,y,z,
    211211    BRANCH_STATE_NONE,0,BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK,0, 0x0,
    212     0,TYPE_ALU,OPERATION_ALU_L_ADD,false,
     212    0,TYPE_ALU,OPERATION_ALU_L_ADDC,false,
    213213    1,0x000007bd,1, 7,0, 0,1,SPR_LOGIC_SR_CY_OV,1,21,1,SPR_LOGIC_SR_CY_OV,
    214214    EXCEPTION_USE_RANGE,EVENT_TYPE_NONE));
     
    358358    0x23000000,x,y,z,
    359359    BRANCH_STATE_NONE,0,BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK,0, 0x0,
    360     0,TYPE_SPECIAL,OPERATION_SPECIAL_L_CSYNC,false,
     360    0,TYPE_MEMORY,OPERATION_MEMORY_SYNCHRONIZATION,false,
    361361    0,0  ,0,0 ,0,0 ,0,0                 ,0,0 ,0,0                 ,
    362362    EXCEPTION_USE_NONE,EVENT_TYPE_CSYNC));
     
    498498    BRANCH_STATE_NONE,0,BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK,1, z, // branch_address_dest can be determined if BRANCH_STATE != NONE (also : previous prediction)
    499499    0,TYPE_BRANCH,OPERATION_BRANCH_L_JALR,false,
    500     0,0   ,0,0 ,1,20,0,0,1,9 ,0,0,
     500    1,z+1,0,0 ,1,20,0,0,1,9 ,0,0,
    501501    EXCEPTION_USE_NONE,EVENT_TYPE_NONE));
    502502    SEQ;
     
    605605    0x22000000,x,y,z,
    606606    0,0,0,0,0,0,
    607     TYPE_SPECIAL,OPERATION_SPECIAL_L_MSYNC,false,
     607    TYPE_MEMORY,OPERATION_MEMORY_SYNCHRONIZATION,false,
    608608    0,0, 0,0, 0,0, 0,0, 0,0, 0,0,
    609609    EXCEPTION_USE_NONE,EVENT_TYPE_MSYNC));
     
    713713    0x22800000,x,y,z,
    714714    0,0,0,0,0,0,
    715     TYPE_SPECIAL,OPERATION_SPECIAL_L_PSYNC,false,
     715    TYPE_MEMORY,OPERATION_MEMORY_SYNCHRONIZATION,false,
    716716    0,0, 0,0, 0,0, 0,0, 0,0, 0,0,
    717717    EXCEPTION_USE_NONE,EVENT_TYPE_PSYNC));
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp

    r88 r101  
    9999//   ALLOC1_SC_SIGNAL( in_PREDICT_CAN_CONTINUE               ," in_PREDICT_CAN_CONTINUE               ",Tcontrol_t         ,_param->_nb_inst_decod);
    100100  ALLOC1_SC_SIGNAL( in_CONTEXT_DECOD_ENABLE               ," in_CONTEXT_DECOD_ENABLE               ",Tcontrol_t         ,_param->_nb_context);
     101  ALLOC1_SC_SIGNAL( in_CONTEXT_DEPTH_VAL                  ," in_CONTEXT_DEPTH_VAL                  ",Tcontrol_t         ,_param->_nb_context);
    101102  ALLOC1_SC_SIGNAL( in_CONTEXT_DEPTH                      ," in_CONTEXT_DEPTH                      ",Tdepth_t           ,_param->_nb_context);
    102103  ALLOC_SC_SIGNAL (out_CONTEXT_EVENT_VAL                  ,"out_CONTEXT_EVENT_VAL                  ",Tcontrol_t         );
     
    178179//   INSTANCE1_SC_SIGNAL(_Decod, in_PREDICT_CAN_CONTINUE               ,_param->_nb_inst_decod);
    179180  INSTANCE1_SC_SIGNAL(_Decod, in_CONTEXT_DECOD_ENABLE               ,_param->_nb_context);
     181  INSTANCE1_SC_SIGNAL(_Decod, in_CONTEXT_DEPTH_VAL                  ,_param->_nb_context);
    180182  for (uint32_t i=0; i<_param->_nb_context; i++)
    181183    if (_param->_have_port_depth)
     
    221223
    222224  LABEL("Loop of Test");
     225
     226  for (uint32_t i=0; i<_param->_nb_context; i++)
     227    in_CONTEXT_DEPTH_VAL [i]->write(1);
    223228
    224229  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
     
    475480 
    476481  delete []  in_CONTEXT_DECOD_ENABLE               ;
     482  delete []  in_CONTEXT_DEPTH_VAL                  ;
    477483  delete []  in_CONTEXT_DEPTH                      ;
    478484 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h

    r88 r101  
    120120    // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    121121  public    : SC_IN (Tcontrol_t         )  **  in_CONTEXT_DECOD_ENABLE               ;//[nb_context]
     122  public    : SC_IN (Tcontrol_t         )  **  in_CONTEXT_DEPTH_VAL                  ;//[nb_context]
    122123  public    : SC_IN (Tdepth_t           )  **  in_CONTEXT_DEPTH                      ;//[nb_context]
    123124                                                                                     
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod.cpp

    r88 r101  
    103103            if (_param->_have_port_depth)
    104104            sensitive << (*(in_IFETCH_BRANCH_UPDATE_PREDICTION_ID [i]));
     105            sensitive << (*(in_CONTEXT_DEPTH_VAL                  [i]));
    105106            if (_param->_have_port_depth)
    106107            sensitive << (*(in_CONTEXT_DEPTH                      [i]));
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_allocation.cpp

    r95 r101  
    2323  void Decod::allocation (
    2424#ifdef STATISTICS
    25                                morpheo::behavioural::Parameters_Statistics * param_statistics
     25                               morpheo::behavioural::Parameters_Statistics * param_statistics
    2626#else
    27                                void
     27                               void
    2828#endif
    29                                )
     29                               )
    3030  {
    3131    log_printf(FUNC,Decod,FUNCTION,"Begin");
     
    3434
    3535    Entity * entity = _component->set_entity (_name       
    36                                               ,"Decod"
     36                                              ,"Decod"
    3737#ifdef POSITION
    38                                               ,COMBINATORY
     38                                              ,COMBINATORY
    3939#endif
    40                                               );
     40                                              );
    4141
    4242    _interfaces = entity->set_interfaces();
     
    4646      Interface * interface = _interfaces->set_interface(""
    4747#ifdef POSITION
    48                                                         ,IN
    49                                                         ,SOUTH,
    50                                                         "Generalist interface"
     48                                                        ,IN
     49                                                        ,SOUTH,
     50                                                        "Generalist interface"
    5151#endif
    52                                                         );
     52                                                        );
    5353     
    5454      in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
     
    7777    }
    7878
    79     // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     79    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
    8080    {
    8181      ALLOC1_INTERFACE("decod", OUT, EAST, "Instructiont decoded", _param->_nb_inst_decod);
     
    129129
    130130      ALLOC1_SIGNAL_IN (in_CONTEXT_DECOD_ENABLE,"decod_enable",Tcontrol_t,1);
     131      ALLOC1_SIGNAL_IN (in_CONTEXT_DEPTH_VAL   ,"depth_val"   ,Tcontrol_t,1);
    131132      ALLOC1_SIGNAL_IN (in_CONTEXT_DEPTH       ,"depth"       ,Tdepth_t  ,_param->_size_depth);
    132133    }
    133134
    134     // ~~~~~[ Interface : "context_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     135    // ~~~~~[ Interface : "context_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
    135136    {
    136137      ALLOC_INTERFACE("context_event", OUT, NORTH, "context's evenement");
     
    164165    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    165166    _priority = new generic::priority::Priority (_name+"_priority"      ,
    166                                                 _param->_priority      ,
    167                                                 _param->_load_balancing,
    168                                                 _param->_nb_context    ,
    169                                                 _param->_nb_inst_fetch ,
    170                                                 _param->_nb_context_select);
     167                                                _param->_priority      ,
     168                                                _param->_load_balancing,
     169                                                _param->_nb_context    ,
     170                                                _param->_nb_inst_fetch ,
     171                                                _param->_nb_context_select);
    171172
    172173    const uint32_t nb_opcod_type = 14;
    173174    const uint32_t tab_opcod_type [] = {MAX_OPCOD_0,
    174                                         MAX_OPCOD_1 ,
    175                                         MAX_OPCOD_2 ,
    176                                         MAX_OPCOD_3 ,
    177                                         MAX_OPCOD_4 ,
    178                                         MAX_OPCOD_5 ,
    179                                         MAX_OPCOD_6 ,
    180                                         MAX_OPCOD_7 ,
    181                                         MAX_OPCOD_8 ,
    182                                         MAX_OPCOD_9 ,
    183                                         MAX_OPCOD_10,
    184                                         MAX_OPCOD_11,
    185                                         MAX_OPCOD_12,
    186                                         MAX_OPCOD_13};
     175                                        MAX_OPCOD_1 ,
     176                                        MAX_OPCOD_2 ,
     177                                        MAX_OPCOD_3 ,
     178                                        MAX_OPCOD_4 ,
     179                                        MAX_OPCOD_5 ,
     180                                        MAX_OPCOD_6 ,
     181                                        MAX_OPCOD_7 ,
     182                                        MAX_OPCOD_8 ,
     183                                        MAX_OPCOD_9 ,
     184                                        MAX_OPCOD_10,
     185                                        MAX_OPCOD_11,
     186                                        MAX_OPCOD_12,
     187                                        MAX_OPCOD_13};
    187188   
    188189    _function_decod  = new function_decod_t *** [_param->_nb_context];
     
    190191    for (uint32_t i=0; i<_param->_nb_context; i++)
    191192      {
    192         _function_decod  [i] = new function_decod_t ** [nb_opcod_type];
    193         _function_custom [i] = new function_decod_t ** [nb_opcod_type];
    194         for (uint32_t j=0; j<nb_opcod_type; j++)
    195           {
    196             _function_decod  [i][j] = new function_decod_t * [tab_opcod_type[j]];
    197             _function_custom [i][j] = new function_decod_t * [tab_opcod_type[j]];
    198             for (uint32_t k=0; k<tab_opcod_type[j]; k++)
    199               {
    200                 _function_decod  [i][j][k] = &(instruction_illegal);
    201                 _function_custom [i][j][k] = &(instruction_illegal);
    202               }
    203           }
    204 
    205         // Create indirection
    206         _function_decod[i][0][OPCOD_1 ] = &(instruction_decod_type_1 ); // Instruction ORFPX32/64               
    207         _function_decod[i][0][OPCOD_2 ] = &(instruction_decod_type_2 ); // Instruction ORVDX64                   
    208         _function_decod[i][0][OPCOD_3 ] = &(instruction_decod_type_3 ); // Instructions Register-Register        
    209         _function_decod[i][0][OPCOD_4 ] = &(instruction_decod_type_4 ); // Instructions "set flag" with register
    210         _function_decod[i][0][OPCOD_5 ] = &(instruction_decod_type_5 ); // Instructions "set flag" with immediat
    211         _function_decod[i][0][OPCOD_6 ] = &(instruction_decod_type_6 ); // Instruction Shift/Rotate with immediat
    212         _function_decod[i][0][OPCOD_7 ] = &(instruction_decod_type_7 ); // Instructions multiply with HI-LO      
    213         _function_decod[i][0][OPCOD_8 ] = &(instruction_decod_type_8 ); // Instructions acces at HI-LO     
    214         _function_decod[i][0][OPCOD_9 ] = &(instruction_decod_type_9 ); // Instructions special            
    215         _function_decod[i][0][OPCOD_10] = &(instruction_decod_type_10); // Instructions no operation             
    216         _function_decod[i][3][OPCOD_11] = &(instruction_decod_type_11); // Instruction Shift/Rotate with register
    217         _function_decod[i][3][OPCOD_12] = &(instruction_decod_type_12); // Instructions extend                   
    218         _function_decod[i][3][OPCOD_13] = &(instruction_decod_type_13); // Instructions extend (64b)             
    219 
    220         if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADD      ]) _function_decod[i][ 3][OPCOD_L_ADD      ] = &(instruction_l_add       );
    221         if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADDC     ]) _function_decod[i][ 3][OPCOD_L_ADDC     ] = &(instruction_l_addc           );
    222         if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADDI     ]) _function_decod[i][ 0][OPCOD_L_ADDI     ] = &(instruction_l_addi           );
    223         if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADDIC    ]) _function_decod[i][ 0][OPCOD_L_ADDIC    ] = &(instruction_l_addic          );
    224         if (_param->_instruction_implemeted[i][INSTRUCTION_L_AND      ]) _function_decod[i][ 3][OPCOD_L_AND      ] = &(instruction_l_and            );
    225         if (_param->_instruction_implemeted[i][INSTRUCTION_L_ANDI     ]) _function_decod[i][ 0][OPCOD_L_ANDI     ] = &(instruction_l_andi           );
    226         if (_param->_instruction_implemeted[i][INSTRUCTION_L_BF       ]) _function_decod[i][ 0][OPCOD_L_BF       ] = &(instruction_l_bf     );
    227         if (_param->_instruction_implemeted[i][INSTRUCTION_L_BNF      ]) _function_decod[i][ 0][OPCOD_L_BNF      ] = &(instruction_l_bnf            );
    228         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CMOV     ]) _function_decod[i][ 3][OPCOD_L_CMOV     ] = &(instruction_l_cmov           );
    229         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CSYNC    ]) _function_decod[i][ 9][OPCOD_L_CSYNC    ] = &(instruction_l_csync          );
    230         if (_param->_instruction_implemeted[i][INSTRUCTION_L_DIV      ]) _function_decod[i][ 3][OPCOD_L_DIV      ] = &(instruction_l_div            );
    231         if (_param->_instruction_implemeted[i][INSTRUCTION_L_DIVU     ]) _function_decod[i][ 3][OPCOD_L_DIVU     ] = &(instruction_l_divu           );
    232         if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTBS    ]) _function_decod[i][12][OPCOD_L_EXTBS    ] = &(instruction_l_extbs          );
    233         if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTBZ    ]) _function_decod[i][12][OPCOD_L_EXTBZ    ] = &(instruction_l_extbz          );
    234         if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTHS    ]) _function_decod[i][12][OPCOD_L_EXTHS    ] = &(instruction_l_exths          );
    235         if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTHZ    ]) _function_decod[i][12][OPCOD_L_EXTHZ    ] = &(instruction_l_exthz          );
    236         if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTWS    ]) _function_decod[i][13][OPCOD_L_EXTWS    ] = &(instruction_l_extws          );
    237         if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTWZ    ]) _function_decod[i][13][OPCOD_L_EXTWZ    ] = &(instruction_l_extwz          );
    238         if (_param->_instruction_implemeted[i][INSTRUCTION_L_FF1      ]) _function_decod[i][ 3][OPCOD_L_FF1      ] = &(instruction_l_ff1            );
    239         if (_param->_instruction_implemeted[i][INSTRUCTION_L_FL1      ]) _function_decod[i][ 3][OPCOD_L_FL1      ] = &(instruction_l_fl1            );
    240         if (_param->_instruction_implemeted[i][INSTRUCTION_L_J        ]) _function_decod[i][ 0][OPCOD_L_J        ] = &(instruction_l_j      );
    241         if (_param->_instruction_implemeted[i][INSTRUCTION_L_JAL      ]) _function_decod[i][ 0][OPCOD_L_JAL      ] = &(instruction_l_jal            );
    242         if (_param->_instruction_implemeted[i][INSTRUCTION_L_JALR     ]) _function_decod[i][ 0][OPCOD_L_JALR     ] = &(instruction_l_jalr           );
    243         if (_param->_instruction_implemeted[i][INSTRUCTION_L_JR       ]) _function_decod[i][ 0][OPCOD_L_JR       ] = &(instruction_l_jr     );
    244         if (_param->_instruction_implemeted[i][INSTRUCTION_L_LBS      ]) _function_decod[i][ 0][OPCOD_L_LBS      ] = &(instruction_l_lbs            );
    245         if (_param->_instruction_implemeted[i][INSTRUCTION_L_LBZ      ]) _function_decod[i][ 0][OPCOD_L_LBZ      ] = &(instruction_l_lbz            );
    246         if (_param->_instruction_implemeted[i][INSTRUCTION_L_LD       ]) _function_decod[i][ 0][OPCOD_L_LD       ] = &(instruction_l_ld     );
    247         if (_param->_instruction_implemeted[i][INSTRUCTION_L_LHS      ]) _function_decod[i][ 0][OPCOD_L_LHS      ] = &(instruction_l_lhs            );
    248         if (_param->_instruction_implemeted[i][INSTRUCTION_L_LHZ      ]) _function_decod[i][ 0][OPCOD_L_LHZ      ] = &(instruction_l_lhz            );
    249         if (_param->_instruction_implemeted[i][INSTRUCTION_L_LWS      ]) _function_decod[i][ 0][OPCOD_L_LWS      ] = &(instruction_l_lws            );
    250         if (_param->_instruction_implemeted[i][INSTRUCTION_L_LWZ      ]) _function_decod[i][ 0][OPCOD_L_LWZ      ] = &(instruction_l_lwz            );
    251         if (_param->_instruction_implemeted[i][INSTRUCTION_L_MAC      ]) _function_decod[i][ 7][OPCOD_L_MAC      ] = &(instruction_l_mac            );
    252         if (_param->_instruction_implemeted[i][INSTRUCTION_L_MACI     ]) _function_decod[i][ 0][OPCOD_L_MACI     ] = &(instruction_l_maci           );
    253         if (_param->_instruction_implemeted[i][INSTRUCTION_L_MACRC    ]) _function_decod[i][ 8][OPCOD_L_MACRC    ] = &(instruction_l_macrc          );
    254         if (_param->_instruction_implemeted[i][INSTRUCTION_L_MFSPR    ]) _function_decod[i][ 0][OPCOD_L_MFSPR    ] = &(instruction_l_mfspr          );
    255         if (_param->_instruction_implemeted[i][INSTRUCTION_L_MOVHI    ]) _function_decod[i][ 8][OPCOD_L_MOVHI    ] = &(instruction_l_movhi          );
    256         if (_param->_instruction_implemeted[i][INSTRUCTION_L_MSB      ]) _function_decod[i][ 7][OPCOD_L_MSB      ] = &(instruction_l_msb            );
    257         if (_param->_instruction_implemeted[i][INSTRUCTION_L_MSYNC    ]) _function_decod[i][ 9][OPCOD_L_MSYNC    ] = &(instruction_l_msync          );
    258         if (_param->_instruction_implemeted[i][INSTRUCTION_L_MTSPR    ]) _function_decod[i][ 0][OPCOD_L_MTSPR    ] = &(instruction_l_mtspr          );
    259         if (_param->_instruction_implemeted[i][INSTRUCTION_L_MUL      ]) _function_decod[i][ 3][OPCOD_L_MUL      ] = &(instruction_l_mul            );
    260         if (_param->_instruction_implemeted[i][INSTRUCTION_L_MULI     ]) _function_decod[i][ 0][OPCOD_L_MULI     ] = &(instruction_l_muli           );
    261         if (_param->_instruction_implemeted[i][INSTRUCTION_L_MULU     ]) _function_decod[i][ 3][OPCOD_L_MULU     ] = &(instruction_l_mulu           );
    262         if (_param->_instruction_implemeted[i][INSTRUCTION_L_NOP      ]) _function_decod[i][10][OPCOD_L_NOP      ] = &(instruction_l_nop            );
    263         if (_param->_instruction_implemeted[i][INSTRUCTION_L_OR       ]) _function_decod[i][ 3][OPCOD_L_OR       ] = &(instruction_l_or     );
    264         if (_param->_instruction_implemeted[i][INSTRUCTION_L_ORI      ]) _function_decod[i][ 0][OPCOD_L_ORI      ] = &(instruction_l_ori            );
    265         if (_param->_instruction_implemeted[i][INSTRUCTION_L_PSYNC    ]) _function_decod[i][ 9][OPCOD_L_PSYNC    ] = &(instruction_l_psync          );
    266         if (_param->_instruction_implemeted[i][INSTRUCTION_L_RFE      ]) _function_decod[i][ 0][OPCOD_L_RFE      ] = &(instruction_l_rfe            );
    267         if (_param->_instruction_implemeted[i][INSTRUCTION_L_ROR      ]) _function_decod[i][11][OPCOD_L_ROR      ] = &(instruction_l_ror            );
    268         if (_param->_instruction_implemeted[i][INSTRUCTION_L_RORI     ]) _function_decod[i][ 6][OPCOD_L_RORI     ] = &(instruction_l_rori           );
    269         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SB       ]) _function_decod[i][ 0][OPCOD_L_SB       ] = &(instruction_l_sb     );
    270         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SD       ]) _function_decod[i][ 0][OPCOD_L_SD       ] = &(instruction_l_sd     );
    271         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFEQ     ]) _function_decod[i][ 4][OPCOD_L_SFEQ     ] = &(instruction_l_sfeq           );
    272         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFEQI    ]) _function_decod[i][ 5][OPCOD_L_SFEQI    ] = &(instruction_l_sfeqi          );
    273         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGES    ]) _function_decod[i][ 4][OPCOD_L_SFGES    ] = &(instruction_l_sfges          );
    274         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGESI   ]) _function_decod[i][ 5][OPCOD_L_SFGESI   ] = &(instruction_l_sfgesi    );
    275         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGEU    ]) _function_decod[i][ 4][OPCOD_L_SFGEU    ] = &(instruction_l_sfgeu          );
    276         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGEUI   ]) _function_decod[i][ 5][OPCOD_L_SFGEUI   ] = &(instruction_l_sfgeui    );
    277         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTS    ]) _function_decod[i][ 4][OPCOD_L_SFGTS    ] = &(instruction_l_sfgts          );
    278         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTSI   ]) _function_decod[i][ 5][OPCOD_L_SFGTSI   ] = &(instruction_l_sfgtsi    );
    279         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTU    ]) _function_decod[i][ 4][OPCOD_L_SFGTU    ] = &(instruction_l_sfgtu          );
    280         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTUI   ]) _function_decod[i][ 5][OPCOD_L_SFGTUI   ] = &(instruction_l_sfgtui    );
    281         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLES    ]) _function_decod[i][ 4][OPCOD_L_SFLES    ] = &(instruction_l_sfles          );
    282         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLESI   ]) _function_decod[i][ 5][OPCOD_L_SFLESI   ] = &(instruction_l_sflesi    );
    283         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLEU    ]) _function_decod[i][ 4][OPCOD_L_SFLEU    ] = &(instruction_l_sfleu          );
    284         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLEUI   ]) _function_decod[i][ 5][OPCOD_L_SFLEUI   ] = &(instruction_l_sfleui    );
    285         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTS    ]) _function_decod[i][ 4][OPCOD_L_SFLTS    ] = &(instruction_l_sflts          );
    286         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTSI   ]) _function_decod[i][ 5][OPCOD_L_SFLTSI   ] = &(instruction_l_sfltsi    );
    287         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTU    ]) _function_decod[i][ 4][OPCOD_L_SFLTU    ] = &(instruction_l_sfltu          );
    288         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTUI   ]) _function_decod[i][ 5][OPCOD_L_SFLTUI   ] = &(instruction_l_sfltui    );
    289         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFNE     ]) _function_decod[i][ 4][OPCOD_L_SFNE     ] = &(instruction_l_sfne           );
    290         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFNEI    ]) _function_decod[i][ 5][OPCOD_L_SFNEI    ] = &(instruction_l_sfnei          );
    291         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SH       ]) _function_decod[i][ 0][OPCOD_L_SH       ] = &(instruction_l_sh     );
    292         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SLL      ]) _function_decod[i][11][OPCOD_L_SLL      ] = &(instruction_l_sll            );
    293         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SLLI     ]) _function_decod[i][ 6][OPCOD_L_SLLI     ] = &(instruction_l_slli           );
    294         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRA      ]) _function_decod[i][11][OPCOD_L_SRA      ] = &(instruction_l_sra            );
    295         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRAI     ]) _function_decod[i][ 6][OPCOD_L_SRAI     ] = &(instruction_l_srai           );
    296         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRL      ]) _function_decod[i][11][OPCOD_L_SRL      ] = &(instruction_l_srl            );
    297         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRLI     ]) _function_decod[i][ 6][OPCOD_L_SRLI     ] = &(instruction_l_srli           );
    298         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SUB      ]) _function_decod[i][ 3][OPCOD_L_SUB      ] = &(instruction_l_sub            );
    299         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SW       ]) _function_decod[i][ 0][OPCOD_L_SW       ] = &(instruction_l_sw     );
    300         if (_param->_instruction_implemeted[i][INSTRUCTION_L_SYS      ]) _function_decod[i][ 9][OPCOD_L_SYS      ] = &(instruction_l_sys            );
    301         if (_param->_instruction_implemeted[i][INSTRUCTION_L_TRAP     ]) _function_decod[i][ 9][OPCOD_L_TRAP     ] = &(instruction_l_trap           );
    302         if (_param->_instruction_implemeted[i][INSTRUCTION_L_XOR      ]) _function_decod[i][ 3][OPCOD_L_XOR      ] = &(instruction_l_xor            );
    303         if (_param->_instruction_implemeted[i][INSTRUCTION_L_XORI     ]) _function_decod[i][ 0][OPCOD_L_XORI     ] = &(instruction_l_xori           );
    304 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_ADD_D   ]) _function_decod[i][ 1][OPCOD_LF_ADD_D   ] = &(instruction_lf_add_d    );
    305 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_ADD_S   ]) _function_decod[i][ 1][OPCOD_LF_ADD_S   ] = &(instruction_lf_add_s    );
    306 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_DIV_D   ]) _function_decod[i][ 1][OPCOD_LF_DIV_D   ] = &(instruction_lf_div_d    );
    307 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_DIV_S   ]) _function_decod[i][ 1][OPCOD_LF_DIV_S   ] = &(instruction_lf_div_s    );
    308 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_FTOI_D  ]) _function_decod[i][ 1][OPCOD_LF_FTOI_D  ] = &(instruction_lf_ftoi_d   );
    309 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_FTOI_S  ]) _function_decod[i][ 1][OPCOD_LF_FTOI_S  ] = &(instruction_lf_ftoi_s   );
    310 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_ITOF_D  ]) _function_decod[i][ 1][OPCOD_LF_ITOF_D  ] = &(instruction_lf_itof_d   );
    311 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_ITOF_S  ]) _function_decod[i][ 1][OPCOD_LF_ITOF_S  ] = &(instruction_lf_itof_s   );
    312 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_MADD_D  ]) _function_decod[i][ 1][OPCOD_LF_MADD_D  ] = &(instruction_lf_madd_d   );
    313 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_MADD_S  ]) _function_decod[i][ 1][OPCOD_LF_MADD_S  ] = &(instruction_lf_madd_s   );
    314 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_MUL_D   ]) _function_decod[i][ 1][OPCOD_LF_MUL_D   ] = &(instruction_lf_mul_d    );
    315 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_MUL_S   ]) _function_decod[i][ 1][OPCOD_LF_MUL_S   ] = &(instruction_lf_mul_s    );
    316 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_REM_D   ]) _function_decod[i][ 1][OPCOD_LF_REM_D   ] = &(instruction_lf_rem_d    );
    317 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_REM_S   ]) _function_decod[i][ 1][OPCOD_LF_REM_S   ] = &(instruction_lf_rem_s    );
    318 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFEQ_D  ]) _function_decod[i][ 1][OPCOD_LF_SFEQ_D  ] = &(instruction_lf_sfeq_d   );
    319 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFEQ_S  ]) _function_decod[i][ 1][OPCOD_LF_SFEQ_S  ] = &(instruction_lf_sfeq_s   );
    320 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFGE_D  ]) _function_decod[i][ 1][OPCOD_LF_SFGE_D  ] = &(instruction_lf_sfge_d   );
    321 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFGE_S  ]) _function_decod[i][ 1][OPCOD_LF_SFGE_S  ] = &(instruction_lf_sfge_s   );
    322 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFGT_D  ]) _function_decod[i][ 1][OPCOD_LF_SFGT_D  ] = &(instruction_lf_sfgt_d   );
    323 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFGT_S  ]) _function_decod[i][ 1][OPCOD_LF_SFGT_S  ] = &(instruction_lf_sfgt_s   );
    324 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFLE_D  ]) _function_decod[i][ 1][OPCOD_LF_SFLE_D  ] = &(instruction_lf_sfle_d   );
    325 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFLE_S  ]) _function_decod[i][ 1][OPCOD_LF_SFLE_S  ] = &(instruction_lf_sfle_s   );
    326 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFLT_D  ]) _function_decod[i][ 1][OPCOD_LF_SFLT_D  ] = &(instruction_lf_sflt_d   );
    327 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFLT_S  ]) _function_decod[i][ 1][OPCOD_LF_SFLT_S  ] = &(instruction_lf_sflt_s   );
    328 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFNE_D  ]) _function_decod[i][ 1][OPCOD_LF_SFNE_D  ] = &(instruction_lf_sfne_d   );
    329 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFNE_S  ]) _function_decod[i][ 1][OPCOD_LF_SFNE_S  ] = &(instruction_lf_sfne_s   );
    330 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SUB_D   ]) _function_decod[i][ 1][OPCOD_LF_SUB_D   ] = &(instruction_lf_sub_d    );
    331 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SUB_S   ]) _function_decod[i][ 1][OPCOD_LF_SUB_S   ] = &(instruction_lf_sub_s    );
    332 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADD_B   ]) _function_decod[i][ 2][OPCOD_LV_ADD_B   ] = &(instruction_lv_add_b    );
    333 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADD_H   ]) _function_decod[i][ 2][OPCOD_LV_ADD_H   ] = &(instruction_lv_add_h    );
    334 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDS_B  ]) _function_decod[i][ 2][OPCOD_LV_ADDS_B  ] = &(instruction_lv_adds_b   );
    335 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDS_H  ]) _function_decod[i][ 2][OPCOD_LV_ADDS_H  ] = &(instruction_lv_adds_h   );
    336 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDU_B  ]) _function_decod[i][ 2][OPCOD_LV_ADDU_B  ] = &(instruction_lv_addu_b   );
    337 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDU_H  ]) _function_decod[i][ 2][OPCOD_LV_ADDU_H  ] = &(instruction_lv_addu_h   );
    338 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDUS_B ]) _function_decod[i][ 2][OPCOD_LV_ADDUS_B ] = &(instruction_lv_addus_b  );
    339 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDUS_H ]) _function_decod[i][ 2][OPCOD_LV_ADDUS_H ] = &(instruction_lv_addus_h  );
    340 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_EQ_B]) _function_decod[i][ 2][OPCOD_LV_ALL_EQ_B] = &(instruction_lv_all_eq_b );
    341 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_EQ_H]) _function_decod[i][ 2][OPCOD_LV_ALL_EQ_H] = &(instruction_lv_all_eq_h );
    342 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_GE_B]) _function_decod[i][ 2][OPCOD_LV_ALL_GE_B] = &(instruction_lv_all_ge_b );
    343 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_GE_H]) _function_decod[i][ 2][OPCOD_LV_ALL_GE_H] = &(instruction_lv_all_ge_h );
    344 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_GT_B]) _function_decod[i][ 2][OPCOD_LV_ALL_GT_B] = &(instruction_lv_all_gt_b );
    345 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_GT_H]) _function_decod[i][ 2][OPCOD_LV_ALL_GT_H] = &(instruction_lv_all_gt_h );
    346 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_LE_B]) _function_decod[i][ 2][OPCOD_LV_ALL_LE_B] = &(instruction_lv_all_le_b );
    347 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_LE_H]) _function_decod[i][ 2][OPCOD_LV_ALL_LE_H] = &(instruction_lv_all_le_h );
    348 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_LT_B]) _function_decod[i][ 2][OPCOD_LV_ALL_LT_B] = &(instruction_lv_all_lt_b );
    349 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_LT_H]) _function_decod[i][ 2][OPCOD_LV_ALL_LT_H] = &(instruction_lv_all_lt_h );
    350 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_NE_B]) _function_decod[i][ 2][OPCOD_LV_ALL_NE_B] = &(instruction_lv_all_ne_b );
    351 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_NE_H]) _function_decod[i][ 2][OPCOD_LV_ALL_NE_H] = &(instruction_lv_all_ne_h );
    352 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_AND     ]) _function_decod[i][ 2][OPCOD_LV_AND     ] = &(instruction_lv_and           );
    353 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_EQ_B]) _function_decod[i][ 2][OPCOD_LV_ANY_EQ_B] = &(instruction_lv_any_eq_b );
    354 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_EQ_H]) _function_decod[i][ 2][OPCOD_LV_ANY_EQ_H] = &(instruction_lv_any_eq_h );
    355 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_GE_B]) _function_decod[i][ 2][OPCOD_LV_ANY_GE_B] = &(instruction_lv_any_ge_b );
    356 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_GE_H]) _function_decod[i][ 2][OPCOD_LV_ANY_GE_H] = &(instruction_lv_any_ge_h );
    357 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_GT_B]) _function_decod[i][ 2][OPCOD_LV_ANY_GT_B] = &(instruction_lv_any_gt_b );
    358 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_GT_H]) _function_decod[i][ 2][OPCOD_LV_ANY_GT_H] = &(instruction_lv_any_gt_h );
    359 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_LE_B]) _function_decod[i][ 2][OPCOD_LV_ANY_LE_B] = &(instruction_lv_any_le_b );
    360 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_LE_H]) _function_decod[i][ 2][OPCOD_LV_ANY_LE_H] = &(instruction_lv_any_le_h );
    361 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_LT_B]) _function_decod[i][ 2][OPCOD_LV_ANY_LT_B] = &(instruction_lv_any_lt_b );
    362 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_LT_H]) _function_decod[i][ 2][OPCOD_LV_ANY_LT_H] = &(instruction_lv_any_lt_h );
    363 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_NE_B]) _function_decod[i][ 2][OPCOD_LV_ANY_NE_B] = &(instruction_lv_any_ne_b );
    364 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_NE_H]) _function_decod[i][ 2][OPCOD_LV_ANY_NE_H] = &(instruction_lv_any_ne_h );
    365 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_AVG_B   ]) _function_decod[i][ 2][OPCOD_LV_AVG_B   ] = &(instruction_lv_avg_b    );
    366 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_AVG_H   ]) _function_decod[i][ 2][OPCOD_LV_AVG_H   ] = &(instruction_lv_avg_h    );
    367 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_EQ_B]) _function_decod[i][ 2][OPCOD_LV_CMP_EQ_B] = &(instruction_lv_cmp_eq_b );
    368 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_EQ_H]) _function_decod[i][ 2][OPCOD_LV_CMP_EQ_H] = &(instruction_lv_cmp_eq_h );
    369 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_GE_B]) _function_decod[i][ 2][OPCOD_LV_CMP_GE_B] = &(instruction_lv_cmp_ge_b );
    370 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_GE_H]) _function_decod[i][ 2][OPCOD_LV_CMP_GE_H] = &(instruction_lv_cmp_ge_h );
    371 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_GT_B]) _function_decod[i][ 2][OPCOD_LV_CMP_GT_B] = &(instruction_lv_cmp_gt_b );
    372 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_GT_H]) _function_decod[i][ 2][OPCOD_LV_CMP_GT_H] = &(instruction_lv_cmp_gt_h );
    373 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_LE_B]) _function_decod[i][ 2][OPCOD_LV_CMP_LE_B] = &(instruction_lv_cmp_le_b );
    374 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_LE_H]) _function_decod[i][ 2][OPCOD_LV_CMP_LE_H] = &(instruction_lv_cmp_le_h );
    375 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_LT_B]) _function_decod[i][ 2][OPCOD_LV_CMP_LT_B] = &(instruction_lv_cmp_lt_b );
    376 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_LT_H]) _function_decod[i][ 2][OPCOD_LV_CMP_LT_H] = &(instruction_lv_cmp_lt_h );
    377 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_NE_B]) _function_decod[i][ 2][OPCOD_LV_CMP_NE_B] = &(instruction_lv_cmp_ne_b );
    378 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_NE_H]) _function_decod[i][ 2][OPCOD_LV_CMP_NE_H] = &(instruction_lv_cmp_ne_h );
    379 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MADDS_H ]) _function_decod[i][ 2][OPCOD_LV_MADDS_H ] = &(instruction_lv_madds_h  );
    380 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MAX_B   ]) _function_decod[i][ 2][OPCOD_LV_MAX_B   ] = &(instruction_lv_max_b    );
    381 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MAX_H   ]) _function_decod[i][ 2][OPCOD_LV_MAX_H   ] = &(instruction_lv_max_h    );
    382 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MERGE_B ]) _function_decod[i][ 2][OPCOD_LV_MERGE_B ] = &(instruction_lv_merge_b  );
    383 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MERGE_H ]) _function_decod[i][ 2][OPCOD_LV_MERGE_H ] = &(instruction_lv_merge_h  );
    384 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MIN_B   ]) _function_decod[i][ 2][OPCOD_LV_MIN_B   ] = &(instruction_lv_min_b    );
    385 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MIN_H   ]) _function_decod[i][ 2][OPCOD_LV_MIN_H   ] = &(instruction_lv_min_h    );
    386 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MSUBS_H ]) _function_decod[i][ 2][OPCOD_LV_MSUBS_H ] = &(instruction_lv_msubs_h  );
    387 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MULS_H  ]) _function_decod[i][ 2][OPCOD_LV_MULS_H  ] = &(instruction_lv_muls_h   );
    388 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_NAND    ]) _function_decod[i][ 2][OPCOD_LV_NAND    ] = &(instruction_lv_nand          );
    389 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_NOR     ]) _function_decod[i][ 2][OPCOD_LV_NOR     ] = &(instruction_lv_nor           );
    390 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_OR      ]) _function_decod[i][ 2][OPCOD_LV_OR      ] = &(instruction_lv_or            );
    391 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACK_B  ]) _function_decod[i][ 2][OPCOD_LV_PACK_B  ] = &(instruction_lv_pack_b   );
    392 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACK_H  ]) _function_decod[i][ 2][OPCOD_LV_PACK_H  ] = &(instruction_lv_pack_h   );
    393 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACKS_B ]) _function_decod[i][ 2][OPCOD_LV_PACKS_B ] = &(instruction_lv_packs_b  );
    394 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACKS_H ]) _function_decod[i][ 2][OPCOD_LV_PACKS_H ] = &(instruction_lv_packs_h  );
    395 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACKUS_B]) _function_decod[i][ 2][OPCOD_LV_PACKUS_B] = &(instruction_lv_packus_b );
    396 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACKUS_H]) _function_decod[i][ 2][OPCOD_LV_PACKUS_H] = &(instruction_lv_packus_h );
    397 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PERM_N  ]) _function_decod[i][ 2][OPCOD_LV_PERM_N  ] = &(instruction_lv_perm_n   );
    398 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_RL_B    ]) _function_decod[i][ 2][OPCOD_LV_RL_B    ] = &(instruction_lv_rl_b          );
    399 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_RL_H    ]) _function_decod[i][ 2][OPCOD_LV_RL_H    ] = &(instruction_lv_rl_h          );
    400 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SLL     ]) _function_decod[i][ 2][OPCOD_LV_SLL     ] = &(instruction_lv_sll           );
    401 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SLL_B   ]) _function_decod[i][ 2][OPCOD_LV_SLL_B   ] = &(instruction_lv_sll_b    );
    402 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SLL_H   ]) _function_decod[i][ 2][OPCOD_LV_SLL_H   ] = &(instruction_lv_sll_h    );
    403 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRA_B   ]) _function_decod[i][ 2][OPCOD_LV_SRA_B   ] = &(instruction_lv_sra_b    );
    404 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRA_H   ]) _function_decod[i][ 2][OPCOD_LV_SRA_H   ] = &(instruction_lv_sra_h    );
    405 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRL     ]) _function_decod[i][ 2][OPCOD_LV_SRL     ] = &(instruction_lv_srl           );
    406 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRL_B   ]) _function_decod[i][ 2][OPCOD_LV_SRL_B   ] = &(instruction_lv_srl_b    );
    407 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRL_H   ]) _function_decod[i][ 2][OPCOD_LV_SRL_H   ] = &(instruction_lv_srl_h    );
    408 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUB_B   ]) _function_decod[i][ 2][OPCOD_LV_SUB_B   ] = &(instruction_lv_sub_b    );
    409 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUB_H   ]) _function_decod[i][ 2][OPCOD_LV_SUB_H   ] = &(instruction_lv_sub_h    );
    410 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBS_B  ]) _function_decod[i][ 2][OPCOD_LV_SUBS_B  ] = &(instruction_lv_subs_b   );
    411 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBS_H  ]) _function_decod[i][ 2][OPCOD_LV_SUBS_H  ] = &(instruction_lv_subs_h   );
    412 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBU_B  ]) _function_decod[i][ 2][OPCOD_LV_SUBU_B  ] = &(instruction_lv_subu_b   );
    413 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBU_H  ]) _function_decod[i][ 2][OPCOD_LV_SUBU_H  ] = &(instruction_lv_subu_h   );
    414 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBUS_B ]) _function_decod[i][ 2][OPCOD_LV_SUBUS_B ] = &(instruction_lv_subus_b  );
    415 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBUS_H ]) _function_decod[i][ 2][OPCOD_LV_SUBUS_H ] = &(instruction_lv_subus_h  );
    416 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_UNPACK_B]) _function_decod[i][ 2][OPCOD_LV_UNPACK_B] = &(instruction_lv_unpack_b );
    417 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_UNPACK_H]) _function_decod[i][ 2][OPCOD_LV_UNPACK_H] = &(instruction_lv_unpack_h );
    418 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_XOR     ]) _function_decod[i][ 2][OPCOD_LV_XOR     ] = &(instruction_lv_xor      );
    419 
    420         // Custom Instruction
    421         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST1    ]) _function_decod [i][ 0][OPCOD_L_CUST1    ] = &(instruction_l_custom );
    422         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST2    ]) _function_decod [i][ 0][OPCOD_L_CUST2    ] = &(instruction_l_custom );
    423         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST3    ]) _function_decod [i][ 0][OPCOD_L_CUST3    ] = &(instruction_l_custom );
    424         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST4    ]) _function_decod [i][ 0][OPCOD_L_CUST4    ] = &(instruction_l_custom );
    425         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST5    ]) _function_decod [i][ 0][OPCOD_L_CUST5    ] = &(instruction_l_custom );
    426         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST6    ]) _function_decod [i][ 0][OPCOD_L_CUST6    ] = &(instruction_l_custom );
    427         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST7    ]) _function_decod [i][ 0][OPCOD_L_CUST7    ] = &(instruction_l_custom );
    428         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST8    ]) _function_decod [i][ 0][OPCOD_L_CUST8    ] = &(instruction_l_custom );
    429 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_D ]) _function_decod [i][ 1][OPCOD_LF_CUST1_D ] = &(instruction_lf_custom);
    430 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_S ]) _function_decod [i][ 1][OPCOD_LF_CUST1_S ] = &(instruction_lf_custom);
    431 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST1   ]) _function_decod [i][ 2][OPCOD_LV_CUST1   ] = &(instruction_lv_custom);
    432 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST2   ]) _function_decod [i][ 2][OPCOD_LV_CUST2   ] = &(instruction_lv_custom);
    433 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST3   ]) _function_decod [i][ 2][OPCOD_LV_CUST3   ] = &(instruction_lv_custom);
    434 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST4   ]) _function_decod [i][ 2][OPCOD_LV_CUST4   ] = &(instruction_lv_custom);
    435 
    436         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST1    ]) _function_custom[i][ 0][OPCOD_L_CUST1    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_1   );
    437         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST2    ]) _function_custom[i][ 0][OPCOD_L_CUST2    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_2   );
    438         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST3    ]) _function_custom[i][ 0][OPCOD_L_CUST3    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_3   );
    439         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST4    ]) _function_custom[i][ 0][OPCOD_L_CUST4    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_4   );
    440         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST5    ]) _function_custom[i][ 0][OPCOD_L_CUST5    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_5   );
    441         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST6    ]) _function_custom[i][ 0][OPCOD_L_CUST6    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_6   );
    442         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST7    ]) _function_custom[i][ 0][OPCOD_L_CUST7    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_7   );
    443         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST8    ]) _function_custom[i][ 0][OPCOD_L_CUST8    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_8   );
    444 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_D ]) _function_custom[i][ 1][OPCOD_LF_CUST1_D ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LF_1_D);
    445 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_S ]) _function_custom[i][ 1][OPCOD_LF_CUST1_S ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LF_1_S);
    446 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST1   ]) _function_custom[i][ 2][OPCOD_LV_CUST1   ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_1  );
    447 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST2   ]) _function_custom[i][ 2][OPCOD_LV_CUST2   ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_2  );
    448 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST3   ]) _function_custom[i][ 2][OPCOD_LV_CUST3   ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_3  );
    449 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST4   ]) _function_custom[i][ 2][OPCOD_LV_CUST4   ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_4  );
     193        _function_decod  [i] = new function_decod_t ** [nb_opcod_type];
     194        _function_custom [i] = new function_decod_t ** [nb_opcod_type];
     195        for (uint32_t j=0; j<nb_opcod_type; j++)
     196          {
     197            _function_decod  [i][j] = new function_decod_t * [tab_opcod_type[j]];
     198            _function_custom [i][j] = new function_decod_t * [tab_opcod_type[j]];
     199            for (uint32_t k=0; k<tab_opcod_type[j]; k++)
     200              {
     201                _function_decod  [i][j][k] = &(instruction_illegal);
     202                _function_custom [i][j][k] = &(instruction_illegal);
     203              }
     204          }
     205
     206        // Create indirection
     207        _function_decod[i][0][OPCOD_1 ] = &(instruction_decod_type_1 ); // Instruction ORFPX32/64               
     208        _function_decod[i][0][OPCOD_2 ] = &(instruction_decod_type_2 ); // Instruction ORVDX64                   
     209        _function_decod[i][0][OPCOD_3 ] = &(instruction_decod_type_3 ); // Instructions Register-Register        
     210        _function_decod[i][0][OPCOD_4 ] = &(instruction_decod_type_4 ); // Instructions "set flag" with register
     211        _function_decod[i][0][OPCOD_5 ] = &(instruction_decod_type_5 ); // Instructions "set flag" with immediat
     212        _function_decod[i][0][OPCOD_6 ] = &(instruction_decod_type_6 ); // Instruction Shift/Rotate with immediat
     213        _function_decod[i][0][OPCOD_7 ] = &(instruction_decod_type_7 ); // Instructions multiply with HI-LO      
     214        _function_decod[i][0][OPCOD_8 ] = &(instruction_decod_type_8 ); // Instructions acces at HI-LO     
     215        _function_decod[i][0][OPCOD_9 ] = &(instruction_decod_type_9 ); // Instructions special            
     216        _function_decod[i][0][OPCOD_10] = &(instruction_decod_type_10); // Instructions no operation             
     217        _function_decod[i][3][OPCOD_11] = &(instruction_decod_type_11); // Instruction Shift/Rotate with register
     218        _function_decod[i][3][OPCOD_12] = &(instruction_decod_type_12); // Instructions extend                   
     219        _function_decod[i][3][OPCOD_13] = &(instruction_decod_type_13); // Instructions extend (64b)             
     220
     221        if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADD      ]) _function_decod[i][ 3][OPCOD_L_ADD      ] = &(instruction_l_add            );
     222        if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADDC     ]) _function_decod[i][ 3][OPCOD_L_ADDC     ] = &(instruction_l_addc           );
     223        if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADDI     ]) _function_decod[i][ 0][OPCOD_L_ADDI     ] = &(instruction_l_addi           );
     224        if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADDIC    ]) _function_decod[i][ 0][OPCOD_L_ADDIC    ] = &(instruction_l_addic          );
     225        if (_param->_instruction_implemeted[i][INSTRUCTION_L_AND      ]) _function_decod[i][ 3][OPCOD_L_AND      ] = &(instruction_l_and            );
     226        if (_param->_instruction_implemeted[i][INSTRUCTION_L_ANDI     ]) _function_decod[i][ 0][OPCOD_L_ANDI     ] = &(instruction_l_andi           );
     227        if (_param->_instruction_implemeted[i][INSTRUCTION_L_BF       ]) _function_decod[i][ 0][OPCOD_L_BF       ] = &(instruction_l_bf             );
     228        if (_param->_instruction_implemeted[i][INSTRUCTION_L_BNF      ]) _function_decod[i][ 0][OPCOD_L_BNF      ] = &(instruction_l_bnf            );
     229        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CMOV     ]) _function_decod[i][ 3][OPCOD_L_CMOV     ] = &(instruction_l_cmov           );
     230        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CSYNC    ]) _function_decod[i][ 9][OPCOD_L_CSYNC    ] = &(instruction_l_csync          );
     231        if (_param->_instruction_implemeted[i][INSTRUCTION_L_DIV      ]) _function_decod[i][ 3][OPCOD_L_DIV      ] = &(instruction_l_div            );
     232        if (_param->_instruction_implemeted[i][INSTRUCTION_L_DIVU     ]) _function_decod[i][ 3][OPCOD_L_DIVU     ] = &(instruction_l_divu           );
     233        if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTBS    ]) _function_decod[i][12][OPCOD_L_EXTBS    ] = &(instruction_l_extbs          );
     234        if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTBZ    ]) _function_decod[i][12][OPCOD_L_EXTBZ    ] = &(instruction_l_extbz          );
     235        if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTHS    ]) _function_decod[i][12][OPCOD_L_EXTHS    ] = &(instruction_l_exths          );
     236        if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTHZ    ]) _function_decod[i][12][OPCOD_L_EXTHZ    ] = &(instruction_l_exthz          );
     237        if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTWS    ]) _function_decod[i][13][OPCOD_L_EXTWS    ] = &(instruction_l_extws          );
     238        if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTWZ    ]) _function_decod[i][13][OPCOD_L_EXTWZ    ] = &(instruction_l_extwz          );
     239        if (_param->_instruction_implemeted[i][INSTRUCTION_L_FF1      ]) _function_decod[i][ 3][OPCOD_L_FF1      ] = &(instruction_l_ff1            );
     240        if (_param->_instruction_implemeted[i][INSTRUCTION_L_FL1      ]) _function_decod[i][ 3][OPCOD_L_FL1      ] = &(instruction_l_fl1            );
     241        if (_param->_instruction_implemeted[i][INSTRUCTION_L_J        ]) _function_decod[i][ 0][OPCOD_L_J        ] = &(instruction_l_j              );
     242        if (_param->_instruction_implemeted[i][INSTRUCTION_L_JAL      ]) _function_decod[i][ 0][OPCOD_L_JAL      ] = &(instruction_l_jal            );
     243        if (_param->_instruction_implemeted[i][INSTRUCTION_L_JALR     ]) _function_decod[i][ 0][OPCOD_L_JALR     ] = &(instruction_l_jalr           );
     244        if (_param->_instruction_implemeted[i][INSTRUCTION_L_JR       ]) _function_decod[i][ 0][OPCOD_L_JR       ] = &(instruction_l_jr             );
     245        if (_param->_instruction_implemeted[i][INSTRUCTION_L_LBS      ]) _function_decod[i][ 0][OPCOD_L_LBS      ] = &(instruction_l_lbs            );
     246        if (_param->_instruction_implemeted[i][INSTRUCTION_L_LBZ      ]) _function_decod[i][ 0][OPCOD_L_LBZ      ] = &(instruction_l_lbz            );
     247        if (_param->_instruction_implemeted[i][INSTRUCTION_L_LD       ]) _function_decod[i][ 0][OPCOD_L_LD       ] = &(instruction_l_ld             );
     248        if (_param->_instruction_implemeted[i][INSTRUCTION_L_LHS      ]) _function_decod[i][ 0][OPCOD_L_LHS      ] = &(instruction_l_lhs            );
     249        if (_param->_instruction_implemeted[i][INSTRUCTION_L_LHZ      ]) _function_decod[i][ 0][OPCOD_L_LHZ      ] = &(instruction_l_lhz            );
     250        if (_param->_instruction_implemeted[i][INSTRUCTION_L_LWS      ]) _function_decod[i][ 0][OPCOD_L_LWS      ] = &(instruction_l_lws            );
     251        if (_param->_instruction_implemeted[i][INSTRUCTION_L_LWZ      ]) _function_decod[i][ 0][OPCOD_L_LWZ      ] = &(instruction_l_lwz            );
     252        if (_param->_instruction_implemeted[i][INSTRUCTION_L_MAC      ]) _function_decod[i][ 7][OPCOD_L_MAC      ] = &(instruction_l_mac            );
     253        if (_param->_instruction_implemeted[i][INSTRUCTION_L_MACI     ]) _function_decod[i][ 0][OPCOD_L_MACI     ] = &(instruction_l_maci           );
     254        if (_param->_instruction_implemeted[i][INSTRUCTION_L_MACRC    ]) _function_decod[i][ 8][OPCOD_L_MACRC    ] = &(instruction_l_macrc          );
     255        if (_param->_instruction_implemeted[i][INSTRUCTION_L_MFSPR    ]) _function_decod[i][ 0][OPCOD_L_MFSPR    ] = &(instruction_l_mfspr          );
     256        if (_param->_instruction_implemeted[i][INSTRUCTION_L_MOVHI    ]) _function_decod[i][ 8][OPCOD_L_MOVHI    ] = &(instruction_l_movhi          );
     257        if (_param->_instruction_implemeted[i][INSTRUCTION_L_MSB      ]) _function_decod[i][ 7][OPCOD_L_MSB      ] = &(instruction_l_msb            );
     258        if (_param->_instruction_implemeted[i][INSTRUCTION_L_MSYNC    ]) _function_decod[i][ 9][OPCOD_L_MSYNC    ] = &(instruction_l_msync          );
     259        if (_param->_instruction_implemeted[i][INSTRUCTION_L_MTSPR    ]) _function_decod[i][ 0][OPCOD_L_MTSPR    ] = &(instruction_l_mtspr          );
     260        if (_param->_instruction_implemeted[i][INSTRUCTION_L_MUL      ]) _function_decod[i][ 3][OPCOD_L_MUL      ] = &(instruction_l_mul            );
     261        if (_param->_instruction_implemeted[i][INSTRUCTION_L_MULI     ]) _function_decod[i][ 0][OPCOD_L_MULI     ] = &(instruction_l_muli           );
     262        if (_param->_instruction_implemeted[i][INSTRUCTION_L_MULU     ]) _function_decod[i][ 3][OPCOD_L_MULU     ] = &(instruction_l_mulu           );
     263        if (_param->_instruction_implemeted[i][INSTRUCTION_L_NOP      ]) _function_decod[i][10][OPCOD_L_NOP      ] = &(instruction_l_nop            );
     264        if (_param->_instruction_implemeted[i][INSTRUCTION_L_OR       ]) _function_decod[i][ 3][OPCOD_L_OR       ] = &(instruction_l_or             );
     265        if (_param->_instruction_implemeted[i][INSTRUCTION_L_ORI      ]) _function_decod[i][ 0][OPCOD_L_ORI      ] = &(instruction_l_ori            );
     266        if (_param->_instruction_implemeted[i][INSTRUCTION_L_PSYNC    ]) _function_decod[i][ 9][OPCOD_L_PSYNC    ] = &(instruction_l_psync          );
     267        if (_param->_instruction_implemeted[i][INSTRUCTION_L_RFE      ]) _function_decod[i][ 0][OPCOD_L_RFE      ] = &(instruction_l_rfe            );
     268        if (_param->_instruction_implemeted[i][INSTRUCTION_L_ROR      ]) _function_decod[i][11][OPCOD_L_ROR      ] = &(instruction_l_ror            );
     269        if (_param->_instruction_implemeted[i][INSTRUCTION_L_RORI     ]) _function_decod[i][ 6][OPCOD_L_RORI     ] = &(instruction_l_rori           );
     270        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SB       ]) _function_decod[i][ 0][OPCOD_L_SB       ] = &(instruction_l_sb             );
     271        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SD       ]) _function_decod[i][ 0][OPCOD_L_SD       ] = &(instruction_l_sd             );
     272        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFEQ     ]) _function_decod[i][ 4][OPCOD_L_SFEQ     ] = &(instruction_l_sfeq           );
     273        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFEQI    ]) _function_decod[i][ 5][OPCOD_L_SFEQI    ] = &(instruction_l_sfeqi          );
     274        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGES    ]) _function_decod[i][ 4][OPCOD_L_SFGES    ] = &(instruction_l_sfges          );
     275        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGESI   ]) _function_decod[i][ 5][OPCOD_L_SFGESI   ] = &(instruction_l_sfgesi         );
     276        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGEU    ]) _function_decod[i][ 4][OPCOD_L_SFGEU    ] = &(instruction_l_sfgeu          );
     277        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGEUI   ]) _function_decod[i][ 5][OPCOD_L_SFGEUI   ] = &(instruction_l_sfgeui         );
     278        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTS    ]) _function_decod[i][ 4][OPCOD_L_SFGTS    ] = &(instruction_l_sfgts          );
     279        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTSI   ]) _function_decod[i][ 5][OPCOD_L_SFGTSI   ] = &(instruction_l_sfgtsi         );
     280        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTU    ]) _function_decod[i][ 4][OPCOD_L_SFGTU    ] = &(instruction_l_sfgtu          );
     281        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTUI   ]) _function_decod[i][ 5][OPCOD_L_SFGTUI   ] = &(instruction_l_sfgtui         );
     282        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLES    ]) _function_decod[i][ 4][OPCOD_L_SFLES    ] = &(instruction_l_sfles          );
     283        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLESI   ]) _function_decod[i][ 5][OPCOD_L_SFLESI   ] = &(instruction_l_sflesi         );
     284        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLEU    ]) _function_decod[i][ 4][OPCOD_L_SFLEU    ] = &(instruction_l_sfleu          );
     285        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLEUI   ]) _function_decod[i][ 5][OPCOD_L_SFLEUI   ] = &(instruction_l_sfleui         );
     286        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTS    ]) _function_decod[i][ 4][OPCOD_L_SFLTS    ] = &(instruction_l_sflts          );
     287        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTSI   ]) _function_decod[i][ 5][OPCOD_L_SFLTSI   ] = &(instruction_l_sfltsi         );
     288        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTU    ]) _function_decod[i][ 4][OPCOD_L_SFLTU    ] = &(instruction_l_sfltu          );
     289        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTUI   ]) _function_decod[i][ 5][OPCOD_L_SFLTUI   ] = &(instruction_l_sfltui         );
     290        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFNE     ]) _function_decod[i][ 4][OPCOD_L_SFNE     ] = &(instruction_l_sfne           );
     291        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFNEI    ]) _function_decod[i][ 5][OPCOD_L_SFNEI    ] = &(instruction_l_sfnei          );
     292        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SH       ]) _function_decod[i][ 0][OPCOD_L_SH       ] = &(instruction_l_sh             );
     293        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SLL      ]) _function_decod[i][11][OPCOD_L_SLL      ] = &(instruction_l_sll            );
     294        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SLLI     ]) _function_decod[i][ 6][OPCOD_L_SLLI     ] = &(instruction_l_slli           );
     295        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRA      ]) _function_decod[i][11][OPCOD_L_SRA      ] = &(instruction_l_sra            );
     296        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRAI     ]) _function_decod[i][ 6][OPCOD_L_SRAI     ] = &(instruction_l_srai           );
     297        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRL      ]) _function_decod[i][11][OPCOD_L_SRL      ] = &(instruction_l_srl            );
     298        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRLI     ]) _function_decod[i][ 6][OPCOD_L_SRLI     ] = &(instruction_l_srli           );
     299        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SUB      ]) _function_decod[i][ 3][OPCOD_L_SUB      ] = &(instruction_l_sub            );
     300        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SW       ]) _function_decod[i][ 0][OPCOD_L_SW       ] = &(instruction_l_sw             );
     301        if (_param->_instruction_implemeted[i][INSTRUCTION_L_SYS      ]) _function_decod[i][ 9][OPCOD_L_SYS      ] = &(instruction_l_sys            );
     302        if (_param->_instruction_implemeted[i][INSTRUCTION_L_TRAP     ]) _function_decod[i][ 9][OPCOD_L_TRAP     ] = &(instruction_l_trap           );
     303        if (_param->_instruction_implemeted[i][INSTRUCTION_L_XOR      ]) _function_decod[i][ 3][OPCOD_L_XOR      ] = &(instruction_l_xor            );
     304        if (_param->_instruction_implemeted[i][INSTRUCTION_L_XORI     ]) _function_decod[i][ 0][OPCOD_L_XORI     ] = &(instruction_l_xori           );
     305//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_ADD_D   ]) _function_decod[i][ 1][OPCOD_LF_ADD_D   ] = &(instruction_lf_add_d    );
     306//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_ADD_S   ]) _function_decod[i][ 1][OPCOD_LF_ADD_S   ] = &(instruction_lf_add_s    );
     307//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_DIV_D   ]) _function_decod[i][ 1][OPCOD_LF_DIV_D   ] = &(instruction_lf_div_d    );
     308//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_DIV_S   ]) _function_decod[i][ 1][OPCOD_LF_DIV_S   ] = &(instruction_lf_div_s    );
     309//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_FTOI_D  ]) _function_decod[i][ 1][OPCOD_LF_FTOI_D  ] = &(instruction_lf_ftoi_d   );
     310//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_FTOI_S  ]) _function_decod[i][ 1][OPCOD_LF_FTOI_S  ] = &(instruction_lf_ftoi_s   );
     311//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_ITOF_D  ]) _function_decod[i][ 1][OPCOD_LF_ITOF_D  ] = &(instruction_lf_itof_d   );
     312//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_ITOF_S  ]) _function_decod[i][ 1][OPCOD_LF_ITOF_S  ] = &(instruction_lf_itof_s   );
     313//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_MADD_D  ]) _function_decod[i][ 1][OPCOD_LF_MADD_D  ] = &(instruction_lf_madd_d   );
     314//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_MADD_S  ]) _function_decod[i][ 1][OPCOD_LF_MADD_S  ] = &(instruction_lf_madd_s   );
     315//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_MUL_D   ]) _function_decod[i][ 1][OPCOD_LF_MUL_D   ] = &(instruction_lf_mul_d    );
     316//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_MUL_S   ]) _function_decod[i][ 1][OPCOD_LF_MUL_S   ] = &(instruction_lf_mul_s    );
     317//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_REM_D   ]) _function_decod[i][ 1][OPCOD_LF_REM_D   ] = &(instruction_lf_rem_d    );
     318//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_REM_S   ]) _function_decod[i][ 1][OPCOD_LF_REM_S   ] = &(instruction_lf_rem_s    );
     319//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFEQ_D  ]) _function_decod[i][ 1][OPCOD_LF_SFEQ_D  ] = &(instruction_lf_sfeq_d   );
     320//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFEQ_S  ]) _function_decod[i][ 1][OPCOD_LF_SFEQ_S  ] = &(instruction_lf_sfeq_s   );
     321//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFGE_D  ]) _function_decod[i][ 1][OPCOD_LF_SFGE_D  ] = &(instruction_lf_sfge_d   );
     322//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFGE_S  ]) _function_decod[i][ 1][OPCOD_LF_SFGE_S  ] = &(instruction_lf_sfge_s   );
     323//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFGT_D  ]) _function_decod[i][ 1][OPCOD_LF_SFGT_D  ] = &(instruction_lf_sfgt_d   );
     324//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFGT_S  ]) _function_decod[i][ 1][OPCOD_LF_SFGT_S  ] = &(instruction_lf_sfgt_s   );
     325//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFLE_D  ]) _function_decod[i][ 1][OPCOD_LF_SFLE_D  ] = &(instruction_lf_sfle_d   );
     326//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFLE_S  ]) _function_decod[i][ 1][OPCOD_LF_SFLE_S  ] = &(instruction_lf_sfle_s   );
     327//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFLT_D  ]) _function_decod[i][ 1][OPCOD_LF_SFLT_D  ] = &(instruction_lf_sflt_d   );
     328//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFLT_S  ]) _function_decod[i][ 1][OPCOD_LF_SFLT_S  ] = &(instruction_lf_sflt_s   );
     329//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFNE_D  ]) _function_decod[i][ 1][OPCOD_LF_SFNE_D  ] = &(instruction_lf_sfne_d   );
     330//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFNE_S  ]) _function_decod[i][ 1][OPCOD_LF_SFNE_S  ] = &(instruction_lf_sfne_s   );
     331//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SUB_D   ]) _function_decod[i][ 1][OPCOD_LF_SUB_D   ] = &(instruction_lf_sub_d    );
     332//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SUB_S   ]) _function_decod[i][ 1][OPCOD_LF_SUB_S   ] = &(instruction_lf_sub_s    );
     333//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADD_B   ]) _function_decod[i][ 2][OPCOD_LV_ADD_B   ] = &(instruction_lv_add_b    );
     334//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADD_H   ]) _function_decod[i][ 2][OPCOD_LV_ADD_H   ] = &(instruction_lv_add_h    );
     335//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDS_B  ]) _function_decod[i][ 2][OPCOD_LV_ADDS_B  ] = &(instruction_lv_adds_b   );
     336//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDS_H  ]) _function_decod[i][ 2][OPCOD_LV_ADDS_H  ] = &(instruction_lv_adds_h   );
     337//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDU_B  ]) _function_decod[i][ 2][OPCOD_LV_ADDU_B  ] = &(instruction_lv_addu_b   );
     338//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDU_H  ]) _function_decod[i][ 2][OPCOD_LV_ADDU_H  ] = &(instruction_lv_addu_h   );
     339//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDUS_B ]) _function_decod[i][ 2][OPCOD_LV_ADDUS_B ] = &(instruction_lv_addus_b  );
     340//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDUS_H ]) _function_decod[i][ 2][OPCOD_LV_ADDUS_H ] = &(instruction_lv_addus_h  );
     341//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_EQ_B]) _function_decod[i][ 2][OPCOD_LV_ALL_EQ_B] = &(instruction_lv_all_eq_b );
     342//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_EQ_H]) _function_decod[i][ 2][OPCOD_LV_ALL_EQ_H] = &(instruction_lv_all_eq_h );
     343//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_GE_B]) _function_decod[i][ 2][OPCOD_LV_ALL_GE_B] = &(instruction_lv_all_ge_b );
     344//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_GE_H]) _function_decod[i][ 2][OPCOD_LV_ALL_GE_H] = &(instruction_lv_all_ge_h );
     345//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_GT_B]) _function_decod[i][ 2][OPCOD_LV_ALL_GT_B] = &(instruction_lv_all_gt_b );
     346//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_GT_H]) _function_decod[i][ 2][OPCOD_LV_ALL_GT_H] = &(instruction_lv_all_gt_h );
     347//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_LE_B]) _function_decod[i][ 2][OPCOD_LV_ALL_LE_B] = &(instruction_lv_all_le_b );
     348//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_LE_H]) _function_decod[i][ 2][OPCOD_LV_ALL_LE_H] = &(instruction_lv_all_le_h );
     349//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_LT_B]) _function_decod[i][ 2][OPCOD_LV_ALL_LT_B] = &(instruction_lv_all_lt_b );
     350//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_LT_H]) _function_decod[i][ 2][OPCOD_LV_ALL_LT_H] = &(instruction_lv_all_lt_h );
     351//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_NE_B]) _function_decod[i][ 2][OPCOD_LV_ALL_NE_B] = &(instruction_lv_all_ne_b );
     352//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_NE_H]) _function_decod[i][ 2][OPCOD_LV_ALL_NE_H] = &(instruction_lv_all_ne_h );
     353//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_AND     ]) _function_decod[i][ 2][OPCOD_LV_AND     ] = &(instruction_lv_and           );
     354//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_EQ_B]) _function_decod[i][ 2][OPCOD_LV_ANY_EQ_B] = &(instruction_lv_any_eq_b );
     355//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_EQ_H]) _function_decod[i][ 2][OPCOD_LV_ANY_EQ_H] = &(instruction_lv_any_eq_h );
     356//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_GE_B]) _function_decod[i][ 2][OPCOD_LV_ANY_GE_B] = &(instruction_lv_any_ge_b );
     357//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_GE_H]) _function_decod[i][ 2][OPCOD_LV_ANY_GE_H] = &(instruction_lv_any_ge_h );
     358//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_GT_B]) _function_decod[i][ 2][OPCOD_LV_ANY_GT_B] = &(instruction_lv_any_gt_b );
     359//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_GT_H]) _function_decod[i][ 2][OPCOD_LV_ANY_GT_H] = &(instruction_lv_any_gt_h );
     360//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_LE_B]) _function_decod[i][ 2][OPCOD_LV_ANY_LE_B] = &(instruction_lv_any_le_b );
     361//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_LE_H]) _function_decod[i][ 2][OPCOD_LV_ANY_LE_H] = &(instruction_lv_any_le_h );
     362//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_LT_B]) _function_decod[i][ 2][OPCOD_LV_ANY_LT_B] = &(instruction_lv_any_lt_b );
     363//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_LT_H]) _function_decod[i][ 2][OPCOD_LV_ANY_LT_H] = &(instruction_lv_any_lt_h );
     364//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_NE_B]) _function_decod[i][ 2][OPCOD_LV_ANY_NE_B] = &(instruction_lv_any_ne_b );
     365//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_NE_H]) _function_decod[i][ 2][OPCOD_LV_ANY_NE_H] = &(instruction_lv_any_ne_h );
     366//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_AVG_B   ]) _function_decod[i][ 2][OPCOD_LV_AVG_B   ] = &(instruction_lv_avg_b    );
     367//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_AVG_H   ]) _function_decod[i][ 2][OPCOD_LV_AVG_H   ] = &(instruction_lv_avg_h    );
     368//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_EQ_B]) _function_decod[i][ 2][OPCOD_LV_CMP_EQ_B] = &(instruction_lv_cmp_eq_b );
     369//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_EQ_H]) _function_decod[i][ 2][OPCOD_LV_CMP_EQ_H] = &(instruction_lv_cmp_eq_h );
     370//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_GE_B]) _function_decod[i][ 2][OPCOD_LV_CMP_GE_B] = &(instruction_lv_cmp_ge_b );
     371//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_GE_H]) _function_decod[i][ 2][OPCOD_LV_CMP_GE_H] = &(instruction_lv_cmp_ge_h );
     372//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_GT_B]) _function_decod[i][ 2][OPCOD_LV_CMP_GT_B] = &(instruction_lv_cmp_gt_b );
     373//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_GT_H]) _function_decod[i][ 2][OPCOD_LV_CMP_GT_H] = &(instruction_lv_cmp_gt_h );
     374//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_LE_B]) _function_decod[i][ 2][OPCOD_LV_CMP_LE_B] = &(instruction_lv_cmp_le_b );
     375//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_LE_H]) _function_decod[i][ 2][OPCOD_LV_CMP_LE_H] = &(instruction_lv_cmp_le_h );
     376//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_LT_B]) _function_decod[i][ 2][OPCOD_LV_CMP_LT_B] = &(instruction_lv_cmp_lt_b );
     377//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_LT_H]) _function_decod[i][ 2][OPCOD_LV_CMP_LT_H] = &(instruction_lv_cmp_lt_h );
     378//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_NE_B]) _function_decod[i][ 2][OPCOD_LV_CMP_NE_B] = &(instruction_lv_cmp_ne_b );
     379//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_NE_H]) _function_decod[i][ 2][OPCOD_LV_CMP_NE_H] = &(instruction_lv_cmp_ne_h );
     380//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MADDS_H ]) _function_decod[i][ 2][OPCOD_LV_MADDS_H ] = &(instruction_lv_madds_h  );
     381//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MAX_B   ]) _function_decod[i][ 2][OPCOD_LV_MAX_B   ] = &(instruction_lv_max_b    );
     382//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MAX_H   ]) _function_decod[i][ 2][OPCOD_LV_MAX_H   ] = &(instruction_lv_max_h    );
     383//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MERGE_B ]) _function_decod[i][ 2][OPCOD_LV_MERGE_B ] = &(instruction_lv_merge_b  );
     384//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MERGE_H ]) _function_decod[i][ 2][OPCOD_LV_MERGE_H ] = &(instruction_lv_merge_h  );
     385//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MIN_B   ]) _function_decod[i][ 2][OPCOD_LV_MIN_B   ] = &(instruction_lv_min_b    );
     386//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MIN_H   ]) _function_decod[i][ 2][OPCOD_LV_MIN_H   ] = &(instruction_lv_min_h    );
     387//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MSUBS_H ]) _function_decod[i][ 2][OPCOD_LV_MSUBS_H ] = &(instruction_lv_msubs_h  );
     388//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MULS_H  ]) _function_decod[i][ 2][OPCOD_LV_MULS_H  ] = &(instruction_lv_muls_h   );
     389//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_NAND    ]) _function_decod[i][ 2][OPCOD_LV_NAND    ] = &(instruction_lv_nand          );
     390//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_NOR     ]) _function_decod[i][ 2][OPCOD_LV_NOR     ] = &(instruction_lv_nor           );
     391//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_OR      ]) _function_decod[i][ 2][OPCOD_LV_OR      ] = &(instruction_lv_or            );
     392//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACK_B  ]) _function_decod[i][ 2][OPCOD_LV_PACK_B  ] = &(instruction_lv_pack_b   );
     393//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACK_H  ]) _function_decod[i][ 2][OPCOD_LV_PACK_H  ] = &(instruction_lv_pack_h   );
     394//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACKS_B ]) _function_decod[i][ 2][OPCOD_LV_PACKS_B ] = &(instruction_lv_packs_b  );
     395//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACKS_H ]) _function_decod[i][ 2][OPCOD_LV_PACKS_H ] = &(instruction_lv_packs_h  );
     396//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACKUS_B]) _function_decod[i][ 2][OPCOD_LV_PACKUS_B] = &(instruction_lv_packus_b );
     397//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACKUS_H]) _function_decod[i][ 2][OPCOD_LV_PACKUS_H] = &(instruction_lv_packus_h );
     398//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PERM_N  ]) _function_decod[i][ 2][OPCOD_LV_PERM_N  ] = &(instruction_lv_perm_n   );
     399//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_RL_B    ]) _function_decod[i][ 2][OPCOD_LV_RL_B    ] = &(instruction_lv_rl_b          );
     400//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_RL_H    ]) _function_decod[i][ 2][OPCOD_LV_RL_H    ] = &(instruction_lv_rl_h          );
     401//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SLL     ]) _function_decod[i][ 2][OPCOD_LV_SLL     ] = &(instruction_lv_sll           );
     402//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SLL_B   ]) _function_decod[i][ 2][OPCOD_LV_SLL_B   ] = &(instruction_lv_sll_b    );
     403//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SLL_H   ]) _function_decod[i][ 2][OPCOD_LV_SLL_H   ] = &(instruction_lv_sll_h    );
     404//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRA_B   ]) _function_decod[i][ 2][OPCOD_LV_SRA_B   ] = &(instruction_lv_sra_b    );
     405//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRA_H   ]) _function_decod[i][ 2][OPCOD_LV_SRA_H   ] = &(instruction_lv_sra_h    );
     406//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRL     ]) _function_decod[i][ 2][OPCOD_LV_SRL     ] = &(instruction_lv_srl           );
     407//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRL_B   ]) _function_decod[i][ 2][OPCOD_LV_SRL_B   ] = &(instruction_lv_srl_b    );
     408//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRL_H   ]) _function_decod[i][ 2][OPCOD_LV_SRL_H   ] = &(instruction_lv_srl_h    );
     409//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUB_B   ]) _function_decod[i][ 2][OPCOD_LV_SUB_B   ] = &(instruction_lv_sub_b    );
     410//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUB_H   ]) _function_decod[i][ 2][OPCOD_LV_SUB_H   ] = &(instruction_lv_sub_h    );
     411//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBS_B  ]) _function_decod[i][ 2][OPCOD_LV_SUBS_B  ] = &(instruction_lv_subs_b   );
     412//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBS_H  ]) _function_decod[i][ 2][OPCOD_LV_SUBS_H  ] = &(instruction_lv_subs_h   );
     413//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBU_B  ]) _function_decod[i][ 2][OPCOD_LV_SUBU_B  ] = &(instruction_lv_subu_b   );
     414//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBU_H  ]) _function_decod[i][ 2][OPCOD_LV_SUBU_H  ] = &(instruction_lv_subu_h   );
     415//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBUS_B ]) _function_decod[i][ 2][OPCOD_LV_SUBUS_B ] = &(instruction_lv_subus_b  );
     416//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBUS_H ]) _function_decod[i][ 2][OPCOD_LV_SUBUS_H ] = &(instruction_lv_subus_h  );
     417//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_UNPACK_B]) _function_decod[i][ 2][OPCOD_LV_UNPACK_B] = &(instruction_lv_unpack_b );
     418//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_UNPACK_H]) _function_decod[i][ 2][OPCOD_LV_UNPACK_H] = &(instruction_lv_unpack_h );
     419//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_XOR     ]) _function_decod[i][ 2][OPCOD_LV_XOR     ] = &(instruction_lv_xor      );
     420
     421        // Custom Instruction
     422        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST1    ]) _function_decod [i][ 0][OPCOD_L_CUST1    ] = &(instruction_l_custom );
     423        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST2    ]) _function_decod [i][ 0][OPCOD_L_CUST2    ] = &(instruction_l_custom );
     424        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST3    ]) _function_decod [i][ 0][OPCOD_L_CUST3    ] = &(instruction_l_custom );
     425        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST4    ]) _function_decod [i][ 0][OPCOD_L_CUST4    ] = &(instruction_l_custom );
     426        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST5    ]) _function_decod [i][ 0][OPCOD_L_CUST5    ] = &(instruction_l_custom );
     427        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST6    ]) _function_decod [i][ 0][OPCOD_L_CUST6    ] = &(instruction_l_custom );
     428        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST7    ]) _function_decod [i][ 0][OPCOD_L_CUST7    ] = &(instruction_l_custom );
     429        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST8    ]) _function_decod [i][ 0][OPCOD_L_CUST8    ] = &(instruction_l_custom );
     430//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_D ]) _function_decod [i][ 1][OPCOD_LF_CUST1_D ] = &(instruction_lf_custom);
     431//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_S ]) _function_decod [i][ 1][OPCOD_LF_CUST1_S ] = &(instruction_lf_custom);
     432//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST1   ]) _function_decod [i][ 2][OPCOD_LV_CUST1   ] = &(instruction_lv_custom);
     433//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST2   ]) _function_decod [i][ 2][OPCOD_LV_CUST2   ] = &(instruction_lv_custom);
     434//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST3   ]) _function_decod [i][ 2][OPCOD_LV_CUST3   ] = &(instruction_lv_custom);
     435//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST4   ]) _function_decod [i][ 2][OPCOD_LV_CUST4   ] = &(instruction_lv_custom);
     436
     437        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST1    ]) _function_custom[i][ 0][OPCOD_L_CUST1    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_1   );
     438        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST2    ]) _function_custom[i][ 0][OPCOD_L_CUST2    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_2   );
     439        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST3    ]) _function_custom[i][ 0][OPCOD_L_CUST3    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_3   );
     440        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST4    ]) _function_custom[i][ 0][OPCOD_L_CUST4    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_4   );
     441        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST5    ]) _function_custom[i][ 0][OPCOD_L_CUST5    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_5   );
     442        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST6    ]) _function_custom[i][ 0][OPCOD_L_CUST6    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_6   );
     443        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST7    ]) _function_custom[i][ 0][OPCOD_L_CUST7    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_7   );
     444        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST8    ]) _function_custom[i][ 0][OPCOD_L_CUST8    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_8   );
     445//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_D ]) _function_custom[i][ 1][OPCOD_LF_CUST1_D ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LF_1_D);
     446//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_S ]) _function_custom[i][ 1][OPCOD_LF_CUST1_S ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LF_1_S);
     447//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST1   ]) _function_custom[i][ 2][OPCOD_LV_CUST1   ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_1  );
     448//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST2   ]) _function_custom[i][ 2][OPCOD_LV_CUST2   ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_2  );
     449//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST3   ]) _function_custom[i][ 2][OPCOD_LV_CUST3   ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_3  );
     450//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST4   ]) _function_custom[i][ 2][OPCOD_LV_CUST4   ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_4  );
    450451      }
    451452
     
    455456    for (uint32_t i=0; i<_param->_nb_context; i++)
    456457      _decod_param [i] = new decod_param_t (_param->_size_general_data,
    457                                             _function_decod [i],
    458                                             _function_custom[i]);
     458                                            _function_decod [i],
     459                                            _function_custom[i]);
    459460
    460461#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_deallocation.cpp

    r88 r101  
    7979
    8080        DELETE1_SIGNAL(in_CONTEXT_DECOD_ENABLE, _param->_nb_context,1);
     81        DELETE1_SIGNAL(in_CONTEXT_DEPTH_VAL   , _param->_nb_context,1);
    8182        DELETE1_SIGNAL(in_CONTEXT_DEPTH       , _param->_nb_context,_param->_size_depth);
    8283
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp

    r88 r101  
    7777              {
    7878                log_printf(TRACE,Decod,FUNCTION,"  * IFETCH [%d][%d]",x,y);   
     79                log_printf(TRACE,Decod,FUNCTION,"    * decod_ack [%d] : %d",i,PORT_READ(in_DECOD_ACK [i]));
    7980
    8081                can_continue [x] = can_continue_next [x];
     
    145146                PORT_WRITE(out_DECOD_READ_RC       [i], _decod_instruction->_read_rc       );
    146147                PORT_WRITE(out_DECOD_NUM_REG_RC    [i], _decod_instruction->_num_reg_rc    );
    147                 PORT_WRITE(out_DECOD_WRITE_RD      [i], _decod_instruction->_write_rd      );
     148                PORT_WRITE(out_DECOD_WRITE_RD      [i],(_decod_instruction->_num_reg_rd!=0)?_decod_instruction->_write_rd:0);
    148149                PORT_WRITE(out_DECOD_NUM_REG_RD    [i], _decod_instruction->_num_reg_rd    );
    149150                PORT_WRITE(out_DECOD_WRITE_RE      [i], _decod_instruction->_write_re      );
     
    152153//              PORT_WRITE(out_DECOD_EXCEPTION     [i], _decod_instruction->_exception     );
    153154
     155                // Branch predictor can accept : the depth is valid
     156                log_printf(TRACE,Decod,FUNCTION,"    * context_depth_val : %d",PORT_READ(in_CONTEXT_DEPTH_VAL [x]));
     157                decod_val   [i]    &= PORT_READ(in_CONTEXT_DEPTH_VAL [x]);
     158                ifetch_ack  [x][y] &= PORT_READ(in_CONTEXT_DEPTH_VAL [x]);
     159
    154160                if (type == TYPE_BRANCH)
    155161                  {
    156162                    log_printf(TRACE,Decod,FUNCTION,"    * type is branch");
     163                    log_printf(TRACE,Decod,FUNCTION,"      * predict_ack  : %d",PORT_READ(in_PREDICT_ACK [i]));
     164
    157165                    log_printf(TRACE,Decod,FUNCTION,"      * address src  : %.8x (%.8x)",_decod_instruction->_address     ,_decod_instruction->_address     <<2);
    158166                    log_printf(TRACE,Decod,FUNCTION,"      * address dest : %.8x (%.8x)",_decod_instruction->_address_next,_decod_instruction->_address_next<<2);
     
    160168                    predict_val [i]     = ifetch_ack  [x][y] // and decod_val [i]
    161169                      ;
    162                     decod_val   [i]    &= PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable               
    163                     ifetch_ack  [x][y] &= PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable and decod_ack
    164 
     170                    decod_val   [i]    &= PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable               
     171                    ifetch_ack  [x][y] &= PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable and decod_ack
     172               
    165173                    if (_param->_have_port_context_id)
    166174                    PORT_WRITE(out_PREDICT_CONTEXT_ID                  [i],x);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/test.cpp

    r88 r101  
    102102  ALLOC1_SC_SIGNAL( in_DEPTH_MIN               ," in_DEPTH_MIN              ",Tdepth_t           ,_param->_nb_context);
    103103  ALLOC1_SC_SIGNAL( in_DEPTH_MAX               ," in_DEPTH_MAX              ",Tdepth_t           ,_param->_nb_context);
     104  ALLOC1_SC_SIGNAL( in_DEPTH_FULL              ," in_DEPTH_FULL             ",Tcontrol_t         ,_param->_nb_context);
    104105
    105106  ALLOC1_SC_SIGNAL(out_NB_INST_ALL             ,"out_NB_INST_ALL            ",Tcounter_t         ,_param->_nb_context);
     
    166167  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_EXCEPTION     ,_param->_nb_inst_decod);
    167168
    168   for (uint32_t i=0; i<_param->_nb_context; ++i)
    169     if (_param->_have_port_depth)
    170       INSTANCE_SC_SIGNAL(_Decod_queue, in_DEPTH_MIN  [i]);
     169  if (_param->_have_port_depth)
     170    {
     171  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DEPTH_MIN               ,_param->_nb_context);
    171172  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DEPTH_MAX               ,_param->_nb_context);
    172  
     173    }
     174  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DEPTH_FULL              ,_param->_nb_context);
    173175  INSTANCE1_SC_SIGNAL(_Decod_queue,out_NB_INST_ALL             ,_param->_nb_context);
    174176  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    344346  DELETE1_SC_SIGNAL( in_DEPTH_MIN               ,_param->_nb_context);
    345347  DELETE1_SC_SIGNAL( in_DEPTH_MAX               ,_param->_nb_context);
     348  DELETE1_SC_SIGNAL( in_DEPTH_FULL              ,_param->_nb_context);
    346349
    347350  DELETE1_SC_SIGNAL(out_NB_INST_ALL             ,_param->_nb_context);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Decod_queue.h

    r88 r101  
    119119  public    : SC_IN (Tdepth_t           )  **  in_DEPTH_MIN               ;//[nb_context]
    120120  public    : SC_IN (Tdepth_t           )  **  in_DEPTH_MAX               ;//[nb_context]
     121  public    : SC_IN (Tcontrol_t         )  **  in_DEPTH_FULL              ;//[nb_context]
    121122
    122123    // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue.cpp

    r88 r101  
    107107            {
    108108              if (_param->_have_port_depth)
     109                {
    109110              sensitive << (*(in_DEPTH_MIN [i]));
    110111              sensitive << (*(in_DEPTH_MAX [i]));
     112                }
     113              sensitive << (*(in_DEPTH_FULL[i]));
    111114            }
    112115
     
    119122              {
    120123                if (_param->_have_port_depth)
     124                  {
    121125                (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MIN [j]));
    122126                (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MAX [j]));
     127                  }
    123128              }
    124129          }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_allocation.cpp

    r95 r101  
    117117      ALLOC1_INTERFACE("depth",IN ,NORTH,"Depth", _param->_nb_context);
    118118
    119       ALLOC1_SIGNAL_IN ( in_DEPTH_MIN      ,"min"      ,Tdepth_t           ,_param->_size_depth  );
    120       ALLOC1_SIGNAL_IN ( in_DEPTH_MAX      ,"max"      ,Tdepth_t           ,_param->_size_depth+1);
     119      ALLOC1_SIGNAL_IN ( in_DEPTH_MIN      ,"min"      ,Tdepth_t           ,_param->_size_depth);
     120      ALLOC1_SIGNAL_IN ( in_DEPTH_MAX      ,"max"      ,Tdepth_t           ,_param->_size_depth);
     121      ALLOC1_SIGNAL_IN ( in_DEPTH_FULL     ,"full"     ,Tcontrol_t         ,1);
    121122    }
    122123
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_deallocation.cpp

    r88 r101  
    7777        DELETE1_SIGNAL(out_DECOD_OUT_EXCEPTION     ,_param->_nb_inst_decod,_param->_size_exception             );
    7878       
    79         DELETE1_SIGNAL( in_DEPTH_MIN               ,_param->_nb_context,_param->_size_depth  );
    80         DELETE1_SIGNAL( in_DEPTH_MAX               ,_param->_nb_context,_param->_size_depth+1);
     79        DELETE1_SIGNAL( in_DEPTH_MIN               ,_param->_nb_context,_param->_size_depth);
     80        DELETE1_SIGNAL( in_DEPTH_MAX               ,_param->_nb_context,_param->_size_depth);
     81        DELETE1_SIGNAL( in_DEPTH_FULL              ,_param->_nb_context,1);
    8182
    8283        DELETE1_SIGNAL(out_NB_INST_ALL             ,_param->_nb_context,_param->_size_nb_inst_decod);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp

    r88 r101  
    4242            Tdepth_t   depth           = reg_QUEUE->front()->_depth         [i];
    4343            Tdepth_t   depth_min       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0;
    44             Tdepth_t   depth_max       = PORT_READ(in_DEPTH_MAX[context]);
     44            Tdepth_t   depth_max       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX [context]):0;
     45            Tcontrol_t depth_full      = PORT_READ(in_DEPTH_FULL[context]);
    4546
    4647            // is a valid instruction ?
    4748            // If DEPTH_CURRENT :
    4849            // equal at     DEPTH_MIN            -> not speculative
    49             // not include ]DEPTH_MIN:DEPTH_MAX[ -> previous branch miss
    50             //     include ]DEPTH_MIN:DEPTH_MAX[ -> speculative
     50            // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss
     51            //     include ]DEPTH_MIN:DEPTH_MAX] -> speculative
    5152
    5253            // All case
     
    5859            // ....... max ...X... min ....... KO
    5960
    60             Tcontrol_t is_valid        = ((depth == depth_min) or
    61                                           ((depth_min < depth_max)?
    62                                            (depth<depth_max):
    63                                            ((depth > depth_min) or (depth < depth_max))));
     61            Tcontrol_t   is_valid      = ((depth == depth_min) or
     62                                          depth_full or
     63                                          ((depth_min <= depth_max)?
     64                                           ((depth >= depth_min) and (depth <=depth_max)):
     65                                           ((depth >= depth_min) or  (depth <=depth_max))));
     66//          Tcontrol_t is_valid        = ((depth == depth_min) or
     67//                                           ((depth_min < depth_max)?
     68//                                            (depth<=depth_max):
     69//                                            ((depth > depth_min) or (depth <= depth_max))));
    6470//          Tcontrol_t is_valid        = depth <= depth_max;
    6571
    66             log_printf(TRACE,Decod_queue,FUNCTION,_("    * is_valid : %d"),is_valid);
    67 
     72            log_printf(TRACE,Decod_queue,FUNCTION,"    * is_valid : %d",is_valid);
     73            log_printf(TRACE,Decod_queue,FUNCTION,"      * context   : %d",context);
     74            log_printf(TRACE,Decod_queue,FUNCTION,"      * depth     : %d",depth);
     75            log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_min : %d",depth_min);
     76            log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_max : %d",depth_max);
     77            log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_full: %d",depth_full);
     78            log_printf(TRACE,Decod_queue,FUNCTION,"      * address   : 0x%x (0x%x)",reg_QUEUE->front()->_address[i],reg_QUEUE->front()->_address[i]<<2);
    6879            internal_DECOD_OUT_VAL [i] = 1; // in all case, val is set (entry is not empty, and instruction is valid)
    6980            if (is_valid)
     
    8192    for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    8293      {
    83         log_printf(TRACE,Decod_queue,FUNCTION,_("  * DECOD_OUT_VAL : %d"),val [i]);
     94        log_printf(TRACE,Decod_queue,FUNCTION,"  * DECOD_OUT_VAL : %d",val [i]);
    8495
    8596        PORT_WRITE(out_DECOD_OUT_VAL [i],val [i]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_transition.cpp

    r88 r101  
    135135          {
    136136            if ((*it)->_val [i])
    137               log_printf(TRACE,Decod_queue,FUNCTION,"      * [%d] %d, %d %d, %d %d %d %d, 0x%x, %d 0x%x, %d %d, %d %d, %d %d, %d %d, %d %d, %d %d"
     137              log_printf(TRACE,Decod_queue,FUNCTION,"      * [%.4d] %.1d, %.3d %.2d, %.2d %.3d %.1d %.1d, 0x%.8x (0x%.8x), %.1d 0x%.8x, %.1d %.2d, %.1d %.2d, %.1d %.2d, %.1d %.2d, %.1d %.2d, %.1d %.2d"
    138138                         ,i
    139139                         ,(*it)->_val           [i]
     
    145145                         ,(*it)->_is_delay_slot [i]
    146146                         ,(*it)->_address       [i]
     147                         ,(*it)->_address       [i]<<2
    147148                         ,(*it)->_has_immediat  [i]
    148149                         ,(*it)->_immediat      [i]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/test.cpp

    r88 r101  
    104104  ALLOC1_SC_SIGNAL( in_DEPTH_MIN                          ," in_DEPTH_MIN                          ",Tdepth_t           ,_param->_nb_context);
    105105  ALLOC1_SC_SIGNAL( in_DEPTH_MAX                          ," in_DEPTH_MAX                          ",Tdepth_t           ,_param->_nb_context);
     106  ALLOC1_SC_SIGNAL( in_DEPTH_FULL                         ," in_DEPTH_FULL                         ",Tcontrol_t         ,_param->_nb_context);
    106107
    107108  ALLOC1_SC_SIGNAL(out_NB_INST_DECOD_ALL                  ,"out_NB_INST_DECOD_ALL                  ",Tcounter_t         ,_param->_nb_context);
    108109
    109110  ALLOC1_SC_SIGNAL( in_CONTEXT_DECOD_ENABLE               ," in_CONTEXT_DECOD_ENABLE               ",Tcontrol_t         ,_param->_nb_context);
     111  ALLOC1_SC_SIGNAL( in_CONTEXT_DEPTH_VAL                  ," in_CONTEXT_DEPTH_VAL                  ",Tcontrol_t         ,_param->_nb_context);
    110112  ALLOC1_SC_SIGNAL( in_CONTEXT_DEPTH                      ," in_CONTEXT_DEPTH                      ",Tdepth_t           ,_param->_nb_context);
    111113
     
    188190//INSTANCE1_SC_SIGNAL(_Decod_unit, in_PREDICT_CAN_CONTINUE               ,_param->_nb_inst_decod);
    189191
     192  if (_param->_have_port_depth)
     193    {
     194  INSTANCE1_SC_SIGNAL(_Decod_unit, in_DEPTH_MIN                          ,_param->_nb_context);
    190195  INSTANCE1_SC_SIGNAL(_Decod_unit, in_DEPTH_MAX                          ,_param->_nb_context);
    191 
     196    }
     197  INSTANCE1_SC_SIGNAL(_Decod_unit, in_DEPTH_FULL                         ,_param->_nb_context);
    192198  INSTANCE1_SC_SIGNAL(_Decod_unit,out_NB_INST_DECOD_ALL                  ,_param->_nb_context);
    193199
    194200  INSTANCE1_SC_SIGNAL(_Decod_unit, in_CONTEXT_DECOD_ENABLE               ,_param->_nb_context);
    195201
    196   for (uint32_t i=0; i<_param->_nb_context; ++i)
    197     if (_param->_have_port_depth)
    198       {
    199         INSTANCE_SC_SIGNAL(_Decod_unit, in_DEPTH_MIN     [i]);
    200         INSTANCE_SC_SIGNAL(_Decod_unit, in_CONTEXT_DEPTH [i]);
    201       }
     202  INSTANCE1_SC_SIGNAL(_Decod_unit, in_CONTEXT_DEPTH_VAL                  ,_param->_nb_context);
     203  if (_param->_have_port_depth)
     204  INSTANCE1_SC_SIGNAL(_Decod_unit, in_CONTEXT_DEPTH                      ,_param->_nb_context);
    202205
    203206  INSTANCE_SC_SIGNAL( _Decod_unit,out_CONTEXT_EVENT_VAL                  );
     
    239242  SC_START(5);
    240243  in_NRESET->write(1); 
     244
     245  for (uint32_t i=0; i<_param->_nb_context; i++)
     246    in_CONTEXT_DEPTH_VAL [i]->write(1);
    241247
    242248  LABEL("Loop of Test");
     
    515521  DELETE1_SC_SIGNAL( in_DEPTH_MIN                          ,_param->_nb_context);
    516522  DELETE1_SC_SIGNAL( in_DEPTH_MAX                          ,_param->_nb_context);
     523  DELETE1_SC_SIGNAL( in_DEPTH_FULL                         ,_param->_nb_context);
    517524
    518525  DELETE1_SC_SIGNAL(out_NB_INST_DECOD_ALL                  ,_param->_nb_context);
    519526
    520527  DELETE1_SC_SIGNAL( in_CONTEXT_DECOD_ENABLE               ,_param->_nb_context);
     528  DELETE1_SC_SIGNAL( in_CONTEXT_DEPTH_VAL                  ,_param->_nb_context);
    521529  DELETE1_SC_SIGNAL( in_CONTEXT_DEPTH                      ,_param->_nb_context);
    522530
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/include/Decod_unit.h

    r88 r101  
    120120  public    : SC_IN (Tdepth_t           )  **  in_DEPTH_MIN                          ;//[nb_context]
    121121  public    : SC_IN (Tdepth_t           )  **  in_DEPTH_MAX                          ;//[nb_context]
     122  public    : SC_IN (Tcontrol_t         )  **  in_DEPTH_FULL                         ;//[nb_context]
    122123
    123124    // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    126127    // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    127128  public    : SC_IN (Tcontrol_t         )  **  in_CONTEXT_DECOD_ENABLE               ;//[nb_context]
     129  public    : SC_IN (Tcontrol_t         )  **  in_CONTEXT_DEPTH_VAL                  ;//[nb_context]
    128130  public    : SC_IN (Tdepth_t           )  **  in_CONTEXT_DEPTH                      ;//[nb_context]
    129131                                                                                     
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_allocation.cpp

    r88 r101  
    128128      ALLOC1_INTERFACE("depth",IN ,NORTH,"Depth", _param->_nb_context);
    129129
    130       ALLOC1_SIGNAL_IN ( in_DEPTH_MIN      ,"min"      ,Tdepth_t           ,_param->_size_depth  );
    131       ALLOC1_SIGNAL_IN ( in_DEPTH_MAX      ,"max"      ,Tdepth_t           ,_param->_size_depth+1);
     130      ALLOC1_SIGNAL_IN ( in_DEPTH_MIN      ,"min"      ,Tdepth_t           ,_param->_size_depth);
     131      ALLOC1_SIGNAL_IN ( in_DEPTH_MAX      ,"max"      ,Tdepth_t           ,_param->_size_depth);
     132      ALLOC1_SIGNAL_IN ( in_DEPTH_FULL     ,"full"     ,Tcontrol_t         ,1);
    132133    }
    133134
     
    144145
    145146      ALLOC1_SIGNAL_IN (in_CONTEXT_DECOD_ENABLE,"decod_enable",Tcontrol_t,1);
     147      ALLOC1_SIGNAL_IN (in_CONTEXT_DEPTH_VAL   ,"depth_val"   ,Tcontrol_t,1);
    146148      ALLOC1_SIGNAL_IN (in_CONTEXT_DEPTH       ,"depth"       ,Tdepth_t  ,_param->_size_depth);
    147149    }
     
    365367
    366368#ifdef POSITION
    367           _component->interface_map (src ,"context"+toString(i),
    368                                      dest,"context"+toString(i));
     369          _component->interface_map (src ,"context_"+toString(i),
     370                                     dest,"context_"+toString(i));
    369371#endif
    370372         
    371373          PORT_MAP(_component,src , "in_CONTEXT_"+toString(i)+"_DECOD_ENABLE",
    372374                              dest, "in_CONTEXT_"+toString(i)+"_DECOD_ENABLE");
     375          PORT_MAP(_component,src , "in_CONTEXT_"+toString(i)+"_DEPTH_VAL"   ,
     376                              dest, "in_CONTEXT_"+toString(i)+"_DEPTH_VAL"   );
    373377          if (_param->_have_port_depth)
    374378          PORT_MAP(_component,src , "in_CONTEXT_"+toString(i)+"_DEPTH"       ,
     
    516520
    517521          if (_param->_have_port_depth)
     522            {
    518523          PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_MIN",
    519524                              dest, "in_DEPTH_"+toString(i)+"_MIN");
    520525          PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_MAX",
    521526                              dest, "in_DEPTH_"+toString(i)+"_MAX");
     527            }
     528          PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_FULL",
     529                              dest, "in_DEPTH_"+toString(i)+"_FULL");
    522530        }
    523531
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_deallocation.cpp

    r88 r101  
    7777//      DELETE1_SIGNAL( in_PREDICT_CAN_CONTINUE               ,_param->_nb_inst_decod,1                             );
    7878       
    79         DELETE1_SIGNAL( in_DEPTH_MIN                          ,_param->_nb_context,_param->_size_depth  );
    80         DELETE1_SIGNAL( in_DEPTH_MAX                          ,_param->_nb_context,_param->_size_depth+1);
     79        DELETE1_SIGNAL( in_DEPTH_MIN                          ,_param->_nb_context,_param->_size_depth);
     80        DELETE1_SIGNAL( in_DEPTH_MAX                          ,_param->_nb_context,_param->_size_depth);
     81        DELETE1_SIGNAL( in_DEPTH_FULL                         ,_param->_nb_context,1);
    8182       
    8283        DELETE1_SIGNAL(out_NB_INST_DECOD_ALL                  ,_param->_nb_context,_param->_size_nb_inst_decod);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/src/test.cpp

    r97 r101  
    9191  ALLOC1_SC_SIGNAL(out_DEPTH_MIN                                      ,"out_DEPTH_MIN                                      ",Tdepth_t  ,_param->_nb_context);
    9292  ALLOC1_SC_SIGNAL(out_DEPTH_MAX                                      ,"out_DEPTH_MAX                                      ",Tdepth_t  ,_param->_nb_context);
     93  ALLOC1_SC_SIGNAL(out_DEPTH_FULL                                     ,"out_DEPTH_FULL                                     ",Tcontrol_t,_param->_nb_context);
     94  ALLOC1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_VAL                      ," in_DEPTH_PREDICTION_UNIT_VAL                      ",Tcontrol_t,_param->_nb_context);
    9395  ALLOC1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_CURRENT                  ," in_DEPTH_PREDICTION_UNIT_CURRENT                  ",Tdepth_t  ,_param->_nb_context);
    9496  ALLOC1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_MIN                      ," in_DEPTH_PREDICTION_UNIT_MIN                      ",Tdepth_t  ,_param->_nb_context);
    9597  ALLOC1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_MAX                      ," in_DEPTH_PREDICTION_UNIT_MAX                      ",Tdepth_t  ,_param->_nb_context);
     98  ALLOC1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_FULL                     ," in_DEPTH_PREDICTION_UNIT_FULL                     ",Tcontrol_t,_param->_nb_context);
    9699  ALLOC1_SC_SIGNAL(out_DEPTH_CONTEXT_STATE_MIN                        ,"out_DEPTH_CONTEXT_STATE_MIN                        ",Tdepth_t  ,_param->_nb_context);
    97100  ALLOC2_SC_SIGNAL(out_DEPTH_DECOD_UNIT_MIN                           ,"out_DEPTH_DECOD_UNIT_MIN                           ",Tdepth_t  ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    98101  ALLOC2_SC_SIGNAL(out_DEPTH_DECOD_UNIT_MAX                           ,"out_DEPTH_DECOD_UNIT_MAX                           ",Tdepth_t  ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    99 
     102  ALLOC2_SC_SIGNAL(out_DEPTH_DECOD_UNIT_FULL                          ,"out_DEPTH_DECOD_UNIT_FULL                          ",Tcontrol_t,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
     103
     104  ALLOC2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH_VAL                   ,"out_CONTEXT_DECOD_UNIT_DEPTH_VAL                   ",Tcontrol_t,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    100105  ALLOC2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH                       ,"out_CONTEXT_DECOD_UNIT_DEPTH                       ",Tdepth_t  ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    101106 
     
    153158  INSTANCE1_SC_SIGNAL(_Front_end_Glue, in_EVENT_CONTEXT_STATE_DEPTH                        ,_param->_nb_context);
    154159
    155   for (uint32_t i=0; i<_param->_nb_context; ++i)
    156     if (_param->_have_port_depth)
    157       {
    158         INSTANCE_SC_SIGNAL(_Front_end_Glue,out_DEPTH_MIN                     [i]);
    159         INSTANCE_SC_SIGNAL(_Front_end_Glue, in_DEPTH_PREDICTION_UNIT_CURRENT [i]);
    160         INSTANCE_SC_SIGNAL(_Front_end_Glue, in_DEPTH_PREDICTION_UNIT_MIN     [i]);
    161         INSTANCE_SC_SIGNAL(_Front_end_Glue,out_DEPTH_CONTEXT_STATE_MIN       [i]);
    162       }
     160  INSTANCE1_SC_SIGNAL(_Front_end_Glue, in_DEPTH_PREDICTION_UNIT_VAL                        ,_param->_nb_context);
     161  if (_param->_have_port_depth)
     162    {
     163  INSTANCE1_SC_SIGNAL(_Front_end_Glue,out_DEPTH_MIN                                        ,_param->_nb_context);
     164  INSTANCE1_SC_SIGNAL(_Front_end_Glue, in_DEPTH_PREDICTION_UNIT_CURRENT                    ,_param->_nb_context);
     165  INSTANCE1_SC_SIGNAL(_Front_end_Glue, in_DEPTH_PREDICTION_UNIT_MIN                        ,_param->_nb_context);
     166  INSTANCE1_SC_SIGNAL(_Front_end_Glue,out_DEPTH_CONTEXT_STATE_MIN                          ,_param->_nb_context);
    163167  INSTANCE1_SC_SIGNAL(_Front_end_Glue,out_DEPTH_MAX                                        ,_param->_nb_context);
    164168  INSTANCE1_SC_SIGNAL(_Front_end_Glue, in_DEPTH_PREDICTION_UNIT_MAX                        ,_param->_nb_context);
    165169  INSTANCE2_SC_SIGNAL(_Front_end_Glue,out_DEPTH_DECOD_UNIT_MAX                             ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    166 
     170    }
     171  INSTANCE1_SC_SIGNAL(_Front_end_Glue,out_DEPTH_FULL                                       ,_param->_nb_context);
     172  INSTANCE1_SC_SIGNAL(_Front_end_Glue, in_DEPTH_PREDICTION_UNIT_FULL                       ,_param->_nb_context);
     173  INSTANCE2_SC_SIGNAL(_Front_end_Glue,out_DEPTH_DECOD_UNIT_FULL                            ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
     174
     175  INSTANCE2_SC_SIGNAL(_Front_end_Glue,out_CONTEXT_DECOD_UNIT_DEPTH_VAL                     ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    167176  for (uint32_t i=0; i<_param->_nb_decod_unit; ++i)
    168177    for (uint32_t j=0; j<_param->_decod_unit_nb_context [i]; ++j)
     
    259268  DELETE1_SC_SIGNAL(out_DEPTH_MIN                                        ,_param->_nb_context);
    260269  DELETE1_SC_SIGNAL(out_DEPTH_MAX                                        ,_param->_nb_context);
     270  DELETE1_SC_SIGNAL(out_DEPTH_FULL                                       ,_param->_nb_context);
     271  DELETE1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_VAL                        ,_param->_nb_context);
    261272  DELETE1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_CURRENT                    ,_param->_nb_context);
    262273  DELETE1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_MIN                        ,_param->_nb_context);
    263274  DELETE1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_MAX                        ,_param->_nb_context);
     275  DELETE1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_FULL                       ,_param->_nb_context);
    264276  DELETE1_SC_SIGNAL(out_DEPTH_CONTEXT_STATE_MIN                          ,_param->_nb_context);
    265277
     278  DELETE2_SC_SIGNAL(out_DEPTH_DECOD_UNIT_MIN                             ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    266279  DELETE2_SC_SIGNAL(out_DEPTH_DECOD_UNIT_MAX                             ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    267   DELETE2_SC_SIGNAL(out_DEPTH_DECOD_UNIT_MIN                             ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    268 
     280  DELETE2_SC_SIGNAL(out_DEPTH_DECOD_UNIT_FULL                            ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
     281
     282  DELETE2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH_VAL                     ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    269283  DELETE2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH                         ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    270284    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/include/Front_end_Glue.h

    r97 r101  
    115115  public    : SC_OUT(Tdepth_t             )  ** out_DEPTH_MIN                                         ;//[nb_context]
    116116  public    : SC_OUT(Tdepth_t             )  ** out_DEPTH_MAX                                         ;//[nb_context]
    117                                            
     117  public    : SC_OUT(Tcontrol_t           )  ** out_DEPTH_FULL                                        ;//[nb_context]
     118                                           
     119  public    : SC_IN (Tcontrol_t           )  **  in_DEPTH_PREDICTION_UNIT_VAL                         ;//[nb_context]
    118120  public    : SC_IN (Tdepth_t             )  **  in_DEPTH_PREDICTION_UNIT_CURRENT                     ;//[nb_context]
    119121  public    : SC_IN (Tdepth_t             )  **  in_DEPTH_PREDICTION_UNIT_MIN                         ;//[nb_context]
    120122  public    : SC_IN (Tdepth_t             )  **  in_DEPTH_PREDICTION_UNIT_MAX                         ;//[nb_context]
     123  public    : SC_IN (Tcontrol_t           )  **  in_DEPTH_PREDICTION_UNIT_FULL                        ;//[nb_context]
    121124                                           
    122125//public    : SC_OUT(Tdepth_t             ) *** out_DEPTH_DECOD_UNIT_CURRENT                          ;//[nb_decod_unit][nb_decod_unit_context]
    123126  public    : SC_OUT(Tdepth_t             ) *** out_DEPTH_DECOD_UNIT_MIN                              ;//[nb_decod_unit][nb_decod_unit_context]
    124127  public    : SC_OUT(Tdepth_t             ) *** out_DEPTH_DECOD_UNIT_MAX                              ;//[nb_decod_unit][nb_decod_unit_context]
     128  public    : SC_OUT(Tcontrol_t           ) *** out_DEPTH_DECOD_UNIT_FULL                             ;//[nb_decod_unit][nb_decod_unit_context]
    125129                                           
    126130  public    : SC_OUT(Tdepth_t             )  ** out_DEPTH_CONTEXT_STATE_MIN                           ;//[nb_context]
    127131
    128132    // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     133  public    : SC_OUT(Tcontrol_t           ) *** out_CONTEXT_DECOD_UNIT_DEPTH_VAL                      ;//[nb_decod_unit][nb_decod_unit_context]
    129134  public    : SC_OUT(Tdepth_t             ) *** out_CONTEXT_DECOD_UNIT_DEPTH                          ;//[nb_decod_unit][nb_decod_unit_context]
    130135
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue.cpp

    r97 r101  
    165165            if (_param->_have_port_depth)
    166166            sensitive << (*( in_DEPTH_PREDICTION_UNIT_CURRENT [i]))
    167                       << (*( in_DEPTH_PREDICTION_UNIT_MIN     [i]));
    168 
    169             sensitive << (*( in_DEPTH_PREDICTION_UNIT_MAX     [i]));
     167                      << (*( in_DEPTH_PREDICTION_UNIT_MIN     [i]))
     168                      << (*( in_DEPTH_PREDICTION_UNIT_MAX     [i]));
     169
     170            sensitive << (*( in_DEPTH_PREDICTION_UNIT_VAL     [i]))
     171                      << (*( in_DEPTH_PREDICTION_UNIT_FULL    [i]));
    170172          }
    171173
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_allocation.cpp

    r97 r101  
    128128//    ALLOC1_SIGNAL_OUT (out_DEPTH_CURRENT                                     ,"CURRENT"                       ,Tdepth_t             ,_param->_size_depth  );
    129129      ALLOC1_SIGNAL_OUT (out_DEPTH_MIN                                         ,"MIN"                           ,Tdepth_t             ,_param->_size_depth  );
    130       ALLOC1_SIGNAL_OUT (out_DEPTH_MAX                                         ,"MAX"                           ,Tdepth_t             ,_param->_size_depth+1);
     130      ALLOC1_SIGNAL_OUT (out_DEPTH_MAX                                         ,"MAX"                           ,Tdepth_t             ,_param->_size_depth  );
     131      ALLOC1_SIGNAL_OUT (out_DEPTH_FULL                                        ,"FULL"                          ,Tcontrol_t           ,1);
    131132                                                                                                               
     133      ALLOC1_SIGNAL_IN  ( in_DEPTH_PREDICTION_UNIT_VAL                         ,"PREDICTION_UNIT_VAL"           ,Tcontrol_t           ,1);
    132134      ALLOC1_SIGNAL_IN  ( in_DEPTH_PREDICTION_UNIT_CURRENT                     ,"PREDICTION_UNIT_CURRENT"       ,Tdepth_t             ,_param->_size_depth  );
    133135      ALLOC1_SIGNAL_IN  ( in_DEPTH_PREDICTION_UNIT_MIN                         ,"PREDICTION_UNIT_MIN"           ,Tdepth_t             ,_param->_size_depth  );
    134       ALLOC1_SIGNAL_IN  ( in_DEPTH_PREDICTION_UNIT_MAX                         ,"PREDICTION_UNIT_MAX"           ,Tdepth_t             ,_param->_size_depth+1);
     136      ALLOC1_SIGNAL_IN  ( in_DEPTH_PREDICTION_UNIT_MAX                         ,"PREDICTION_UNIT_MAX"           ,Tdepth_t             ,_param->_size_depth  );
     137      ALLOC1_SIGNAL_IN  ( in_DEPTH_PREDICTION_UNIT_FULL                        ,"PREDICTION_UNIT_FULL"          ,Tcontrol_t           ,1);
    135138                                                                                                               
    136139      ALLOC1_SIGNAL_OUT (out_DEPTH_CONTEXT_STATE_MIN                           ,"CONTEXT_STATE_MIN"             ,Tdepth_t             ,_param->_size_depth  );
     
    141144//    _ALLOC2_SIGNAL_OUT(out_DEPTH_DECOD_UNIT_CURRENT                          ,"DECOD_UNIT_CURRENT"            ,Tdepth_t             ,_param->_size_depth  ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    142145      _ALLOC2_SIGNAL_OUT(out_DEPTH_DECOD_UNIT_MIN                              ,"DECOD_UNIT_MIN"                ,Tdepth_t             ,_param->_size_depth  ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    143       _ALLOC2_SIGNAL_OUT(out_DEPTH_DECOD_UNIT_MAX                              ,"DECOD_UNIT_MAX"                ,Tdepth_t             ,_param->_size_depth+1,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
     146      _ALLOC2_SIGNAL_OUT(out_DEPTH_DECOD_UNIT_MAX                              ,"DECOD_UNIT_MAX"                ,Tdepth_t             ,_param->_size_depth  ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
     147      _ALLOC2_SIGNAL_OUT(out_DEPTH_DECOD_UNIT_FULL                             ,"DECOD_UNIT_FULL"               ,Tcontrol_t           ,1                    ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    144148    }
    145149
     
    148152      ALLOC2_INTERFACE("context",OUT,EAST,_("context"),_param->_nb_decod_unit,_param->_translate_context_id_from_decod_unit[it1].size());
    149153     
     154      _ALLOC2_SIGNAL_OUT(out_CONTEXT_DECOD_UNIT_DEPTH_VAL                      ,"DECOD_UNIT_DEPTH_VAL"          ,Tcontrol_t           ,1                    ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    150155      _ALLOC2_SIGNAL_OUT(out_CONTEXT_DECOD_UNIT_DEPTH                          ,"DECOD_UNIT_DEPTH"              ,Tdepth_t             ,_param->_size_depth  ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]);
    151156    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_deallocation.cpp

    r97 r101  
    7070        DELETE1_SIGNAL( in_EVENT_CONTEXT_STATE_DEPTH                        ,_param->_nb_context,_param->_size_depth);
    7171       
    72         DELETE1_SIGNAL(out_DEPTH_MIN                                        ,_param->_nb_context,_param->_size_depth  );
    73         DELETE1_SIGNAL(out_DEPTH_MAX                                        ,_param->_nb_context,_param->_size_depth+1);
    74         DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_CURRENT                    ,_param->_nb_context,_param->_size_depth  );
    75         DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_MIN                        ,_param->_nb_context,_param->_size_depth  );
    76         DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_MAX                        ,_param->_nb_context,_param->_size_depth+1);
    77         DELETE1_SIGNAL(out_DEPTH_CONTEXT_STATE_MIN                          ,_param->_nb_context,_param->_size_depth  );
     72        DELETE1_SIGNAL(out_DEPTH_MIN                                        ,_param->_nb_context,_param->_size_depth);
     73        DELETE1_SIGNAL(out_DEPTH_MAX                                        ,_param->_nb_context,_param->_size_depth);
     74        DELETE1_SIGNAL(out_DEPTH_FULL                                       ,_param->_nb_context,1);
     75        DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_VAL                        ,_param->_nb_context,1);
     76        DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_CURRENT                    ,_param->_nb_context,_param->_size_depth);
     77        DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_MIN                        ,_param->_nb_context,_param->_size_depth);
     78        DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_MAX                        ,_param->_nb_context,_param->_size_depth);
     79        DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_FULL                       ,_param->_nb_context,1);
     80        DELETE1_SIGNAL(out_DEPTH_CONTEXT_STATE_MIN                          ,_param->_nb_context,_param->_size_depth);
    7881       
    79 //      DELETE2_SIGNAL(out_DEPTH_DECOD_UNIT_CURRENT                         ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth  );
    80         DELETE2_SIGNAL(out_DEPTH_DECOD_UNIT_MIN                             ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth  );
    81         DELETE2_SIGNAL(out_DEPTH_DECOD_UNIT_MAX                             ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth+1);
     82//      DELETE2_SIGNAL(out_DEPTH_DECOD_UNIT_CURRENT                         ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth);
     83        DELETE2_SIGNAL(out_DEPTH_DECOD_UNIT_MIN                             ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth);
     84        DELETE2_SIGNAL(out_DEPTH_DECOD_UNIT_MAX                             ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth);
     85        DELETE2_SIGNAL(out_DEPTH_DECOD_UNIT_FULL                            ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],1);
    8286       
     87        DELETE2_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH_VAL                     ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],1);
    8388        DELETE2_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH                         ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth);
    8489      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_depth.cpp

    r88 r101  
    2626        if (_param->_have_port_depth)
    2727          {
    28             Tdepth_t min = PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN [i]);
    29             PORT_WRITE(out_DEPTH_CONTEXT_STATE_MIN [i],min);
    30             PORT_WRITE(out_DEPTH_MIN               [i],min);
     28        Tdepth_t min = PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN [i]);
     29        PORT_WRITE(out_DEPTH_CONTEXT_STATE_MIN [i],min);
     30        PORT_WRITE(out_DEPTH_MIN               [i],min);
     31        PORT_WRITE(out_DEPTH_MAX               [i], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX [i]));
    3132          }
    32 
    33         PORT_WRITE(out_DEPTH_MAX [i], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX [i]));
     33        PORT_WRITE(out_DEPTH_FULL              [i], PORT_READ(in_DEPTH_PREDICTION_UNIT_FULL [i]));
    3434      }
    3535
     
    3939          uint32_t num_context = _param->_translate_context_id_from_decod_unit[i][j];
    4040         
     41          PORT_WRITE(out_CONTEXT_DECOD_UNIT_DEPTH_VAL [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_VAL     [num_context]));
    4142          if (_param->_have_port_depth)
    4243            {
    43           PORT_WRITE(out_CONTEXT_DECOD_UNIT_DEPTH  [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_CURRENT [num_context]));
    44           PORT_WRITE(out_DEPTH_DECOD_UNIT_MIN      [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN     [num_context]));
     44          PORT_WRITE(out_CONTEXT_DECOD_UNIT_DEPTH     [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_CURRENT [num_context]));
     45          PORT_WRITE(out_DEPTH_DECOD_UNIT_MIN         [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN     [num_context]));
     46          PORT_WRITE(out_DEPTH_DECOD_UNIT_MAX         [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX     [num_context]));
    4547            }
    46           PORT_WRITE(out_DEPTH_DECOD_UNIT_MAX      [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX     [num_context]));
     48          PORT_WRITE(out_DEPTH_DECOD_UNIT_FULL        [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_FULL    [num_context]));
    4749        }
    4850
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/src/test.cpp

    r88 r101  
    6767  ALLOC1_SC_SIGNAL( in_PREDICT_INSTRUCTION_ENABLE         ," in_PREDICT_INSTRUCTION_ENABLE         ",Tcontrol_t        ,_param->_nb_instruction);
    6868  ALLOC_SC_SIGNAL ( in_PREDICT_INST_IFETCH_PTR            ," in_PREDICT_INST_IFETCH_PTR            ",Tinst_ifetch_ptr_t);
     69//ALLOC_SC_SIGNAL ( in_PREDICT_BRANCH_IS_CURRENT          ," in_PREDICT_BRANCH_IS_CURRENT          ",Tcontrol_t        );
    6970  ALLOC_SC_SIGNAL ( in_PREDICT_BRANCH_STATE               ," in_PREDICT_BRANCH_STATE               ",Tbranch_state_t   );
    7071  ALLOC_SC_SIGNAL ( in_PREDICT_BRANCH_UPDATE_PREDICTION_ID," in_PREDICT_BRANCH_UPDATE_PREDICTION_ID",Tprediction_ptr_t );
     
    104105  if (_param->_have_port_inst_ifetch_ptr)
    105106  INSTANCE_SC_SIGNAL (_Address_management, in_PREDICT_INST_IFETCH_PTR            );
     107//INSTANCE_SC_SIGNAL (_Address_management, in_PREDICT_BRANCH_IS_CURRENT          );
    106108  INSTANCE_SC_SIGNAL (_Address_management, in_PREDICT_BRANCH_STATE               );
    107109  if (_param->_have_port_depth)
     
    129131  srand(seed);
    130132
    131   const  int32_t percent_transaction_address = 75;
    132   const  int32_t percent_transaction_predict = 75;
    133   const  int32_t percent_transaction_event   =  5;
     133  const  int32_t percent_transaction_address = 100;
     134  const  int32_t percent_transaction_predict = 100;
     135  const  int32_t percent_transaction_event   =  0;
    134136
    135137  SC_START(0);
     
    155157  uint32_t        nb_packet = 1;
    156158
     159  Tcontrol_t      a_val   = false;
    157160  Tcontrol_t      c_val   = false;
    158   Tcontrol_t      n_val   = false;
     161  Tcontrol_t      n_val   = true ;
    159162  Tcontrol_t      nn_val  = false;
    160163
     164  Tgeneral_data_t a_addr  = 0x100>>2;
    161165  Tgeneral_data_t c_addr  = 0x100>>2;
    162166  Tgeneral_data_t n_addr  = 0x100>>2;
    163167  Tgeneral_data_t nn_addr = 0x100>>2;
    164168
     169  Tcontrol_t      a_enable [_param->_nb_instruction];
    165170  Tcontrol_t      c_enable [_param->_nb_instruction];
    166171  Tcontrol_t      n_enable [_param->_nb_instruction];
    167172
     173  Tcontrol_t      a_is_ds_take   = 0;
    168174  Tcontrol_t      c_is_ds_take   = 0;
    169175  Tcontrol_t      n_is_ds_take   = 0;           
    170176  Tcontrol_t      nn_is_ds_take  = 0;
    171177
    172   c_enable [0] = 1;
     178  n_enable [0] = 1;
    173179  for (uint32_t i=1; i<_param->_nb_instruction; i++)
    174     c_enable [i] = 0;
     180    n_enable [i] = 0;
    175181
    176182  LABEL("Send Reset");
     
    216222        in_PREDICT_PC_NEXT_IS_DS_TAKE         ->write(take);
    217223        in_PREDICT_INST_IFETCH_PTR            ->write(0);
     224//      in_PREDICT_BRANCH_IS_CURRENT          ->write(0);
    218225        in_PREDICT_BRANCH_STATE               ->write(0);
    219226        in_PREDICT_BRANCH_UPDATE_PREDICTION_ID->write(0);
     
    251258          for (uint32_t i=0; i<_param->_nb_instruction; i++)
    252259          n_enable [i]  = in_PREDICT_INSTRUCTION_ENABLE [i]->read();
     260
     261          LABEL("  * nn_addr          : %.8x",nn_addr);
    253262        }
    254263 
     
    256265        {
    257266          LABEL("ADDRESS    : Transaction accepted");
    258           LABEL("  * address wait     : %.8x",c_addr);
    259 
    260           TEST(Tgeneral_address_t,out_ADDRESS_INSTRUCTION_ADDRESS        ->read(),c_addr);
     267          LABEL("  * address wait     : %.8x",a_addr);
     268
     269          TEST(Tgeneral_address_t,out_ADDRESS_INSTRUCTION_ADDRESS        ->read(),a_addr);
    261270          for (uint32_t i=0; i<_param->_nb_instruction; i++)
    262           TEST(Tcontrol_t        ,out_ADDRESS_INSTRUCTION_ENABLE     [i] ->read(),c_enable[i]);
     271          TEST(Tcontrol_t        ,out_ADDRESS_INSTRUCTION_ENABLE     [i] ->read(),a_enable[i]);
    263272          if (_param->_have_port_inst_ifetch_ptr)
    264273          TEST(Tinst_ifetch_ptr_t,out_ADDRESS_INST_IFETCH_PTR            ->read(),0);
     
    267276          TEST(Tprediction_ptr_t ,out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID->read(),0);
    268277
    269           c_val = 0;
     278          a_val = 0;
    270279          nb_packet ++;
    271280        }
    272281
     282      {
     283        string str_a_enable = "";
     284        string str_c_enable = "";
     285        string str_n_enable = "";
     286
     287        for (uint32_t i=0; i<_param->_nb_instruction; i++)
     288          {
     289            str_a_enable += " " + toString(a_enable [i]);
     290            str_c_enable += " " + toString(c_enable [i]);
     291            str_n_enable += " " + toString(n_enable [i]);
     292          }
     293
     294        LABEL("----[ Before ]---------------------");
     295        LABEL("  * nb_packet : %d",nb_packet);
     296        LABEL("  * pc a : %d %d %.8x %s",a_val ,a_is_ds_take ,a_addr ,str_a_enable.c_str());
     297        LABEL("  * pc   : %d %d %.8x %s",c_val ,c_is_ds_take ,c_addr ,str_c_enable.c_str());
     298        LABEL("  * pc+4 : %d %d %.8x %s",n_val ,n_is_ds_take ,n_addr ,str_n_enable.c_str());
     299        LABEL("  * pc+8 : %d %d %.8x"   ,nn_val,nn_is_ds_take,nn_addr);
     300        LABEL("-----------------------------------");
     301      }
     302
     303      if (not a_val)
     304        {
     305          if (c_val and n_val and nn_val)
     306            {
     307              a_val        = 1;
     308              c_val        = 0;
     309              a_addr       = c_addr;
     310              a_is_ds_take = c_is_ds_take;
     311
     312              for (uint32_t i=0; i<_param->_nb_instruction; i++)
     313                a_enable [i] = c_enable [i];
     314            }
     315        }
    273316
    274317      if (not c_val)
    275         {
    276           if (n_val and nn_val)
    277             {
    278               c_val        = 1;
    279               c_addr       = n_addr;
    280               c_is_ds_take = n_is_ds_take;
    281 
    282               for (uint32_t i=0; i<_param->_nb_instruction; i++)
    283                 c_enable [i] = n_enable [i];
    284              
    285               n_val        = 1;
    286               n_addr       = nn_addr;
    287               n_is_ds_take = nn_is_ds_take;
    288              
    289               nn_val       = 0;
    290             }
    291         }
     318        {
     319          c_val        = n_val;
     320          if (n_val)
     321            {
     322              c_addr       = n_addr;
     323              c_is_ds_take = n_is_ds_take;
     324             
     325              for (uint32_t i=0; i<_param->_nb_instruction; i++)
     326                c_enable [i] = n_enable [i];
     327            }
     328          n_val        = 0;
     329        }
     330
     331      if (not n_val)
     332        {
     333          n_val        = nn_val;
     334          if (nn_val)
     335            {
     336              n_addr       = nn_addr;
     337              n_is_ds_take = nn_is_ds_take;
     338             
     339//            for (uint32_t i=0; i<_param->_nb_instruction; i++)
     340//              n_enable [i] = nn_enable [i];
     341            }
     342          nn_val       = 0;
     343        }
    292344
    293345      if (in_EVENT_VAL->read() and out_EVENT_ACK->read())
     
    295347          LABEL("EVENT      : Transaction accepted");
    296348
     349          a_val        = false;
    297350          c_val        = false;
    298351          n_val        = true;
     
    312365     
    313366      {
     367        string str_a_enable = "";
    314368        string str_c_enable = "";
    315369        string str_n_enable = "";
     
    317371        for (uint32_t i=0; i<_param->_nb_instruction; i++)
    318372          {
     373            str_a_enable += " " + toString(a_enable [i]);
    319374            str_c_enable += " " + toString(c_enable [i]);
    320375            str_n_enable += " " + toString(n_enable [i]);
    321376          }
    322377
    323         LABEL("-----------------------------------");
     378        LABEL("----[ After ]----------------------");
    324379        LABEL("  * nb_packet : %d",nb_packet);
    325         LABEL("  * pc   : %d %d %.8x %s",c_val  ,c_is_ds_take , c_addr ,str_c_enable.c_str());
    326         if (nn_val)
    327           {
    328         LABEL("  * pc+4 : %d %d %.8x %s",n_val  ,n_is_ds_take , n_addr ,str_n_enable.c_str());
    329           }
    330         else
    331           {
    332         LABEL("  * pc+4 : %d %d %.8x"   ,n_val  ,n_is_ds_take , n_addr );
    333           }
    334         LABEL("  * pc+8 : %d %d %.8x"   ,nn_val ,nn_is_ds_take, nn_addr);
     380        LABEL("  * pc a : %d %d %.8x %s",a_val ,a_is_ds_take ,a_addr ,str_a_enable.c_str());
     381        LABEL("  * pc   : %d %d %.8x %s",c_val ,c_is_ds_take ,c_addr ,str_c_enable.c_str());
     382        LABEL("  * pc+4 : %d %d %.8x %s",n_val ,n_is_ds_take ,n_addr ,str_n_enable.c_str());
     383        LABEL("  * pc+8 : %d %d %.8x"   ,nn_val,nn_is_ds_take,nn_addr);
    335384        LABEL("-----------------------------------");
    336385      }
     
    368417  delete []  in_PREDICT_INSTRUCTION_ENABLE         ;
    369418  delete     in_PREDICT_INST_IFETCH_PTR            ;
     419//delete     in_PREDICT_BRANCH_IS_CURRENT          ;
    370420  delete     in_PREDICT_BRANCH_STATE               ;
    371421  delete     in_PREDICT_BRANCH_UPDATE_PREDICTION_ID;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/include/Address_management.h

    r88 r101  
    8383  public    : SC_IN (Tcontrol_t         )   *  in_PREDICT_PC_NEXT_IS_DS_TAKE          ;
    8484  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_INSTRUCTION_ENABLE          ; //[nb_instruction]
    85   public    : SC_IN (Tinst_ifetch_ptr_t )   *  in_PREDICT_INST_IFETCH_PTR             ;
     85//public    : SC_IN (Tcontrol_t         )   *  in_PREDICT_BRANCH_IS_CURRENT           ;
    8686  public    : SC_IN (Tbranch_state_t    )   *  in_PREDICT_BRANCH_STATE                ;
    8787  public    : SC_IN (Tprediction_ptr_t  )   *  in_PREDICT_BRANCH_UPDATE_PREDICTION_ID ;
     88  public    : SC_IN (Tinst_ifetch_ptr_t )   *  in_PREDICT_INST_IFETCH_PTR             ;
    8889
    8990    // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    9899
    99100    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     101  private   : Tcontrol_t                      reg_PC_ACCESS_VAL                           ;
     102  private   : Tgeneral_address_t              reg_PC_ACCESS                               ;
     103  private   : Tcontrol_t                      reg_PC_ACCESS_IS_DS_TAKE                    ;
     104  private   : Tcontrol_t                    * reg_PC_ACCESS_INSTRUCTION_ENABLE            ; //[nb_instruction]
     105  private   : Tinst_ifetch_ptr_t              reg_PC_ACCESS_INST_IFETCH_PTR               ;
     106  private   : Tbranch_state_t                 reg_PC_ACCESS_BRANCH_STATE                  ;
     107  private   : Tprediction_ptr_t               reg_PC_ACCESS_BRANCH_UPDATE_PREDICTION_ID   ;
     108
    100109  private   : Tcontrol_t                      reg_PC_CURRENT_VAL                          ;
    101110  private   : Tgeneral_address_t              reg_PC_CURRENT                              ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_allocation.cpp

    r88 r101  
    8585      ALLOC_SIGNAL_IN  ( in_PREDICT_PC_NEXT                    ,"pc_next"                    ,Tgeneral_address_t,_param->_size_instruction_address);
    8686      ALLOC_SIGNAL_IN  ( in_PREDICT_PC_NEXT_IS_DS_TAKE         ,"pc_next_is_ds_take"         ,Tcontrol_t        ,1);
    87       ALLOC_SIGNAL_IN  ( in_PREDICT_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_inst_ifetch_ptr);
     87//    ALLOC_SIGNAL_IN  ( in_PREDICT_BRANCH_IS_CURRENT          ,"branch_is_current"          ,Tcontrol_t        ,1);
    8888      ALLOC_SIGNAL_IN  ( in_PREDICT_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t   ,_param->_size_branch_state);
    8989      ALLOC_SIGNAL_IN  ( in_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_depth);
     90      ALLOC_SIGNAL_IN  ( in_PREDICT_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_inst_ifetch_ptr);
    9091    }
    9192    {
     
    110111    if (usage_is_set(_usage,USE_SYSTEMC))
    111112      {
    112         reg_PC_CURRENT_INSTRUCTION_ENABLE = new Tcontrol_t [_param->_nb_instruction];
    113         reg_PC_NEXT_INSTRUCTION_ENABLE    = new Tcontrol_t [_param->_nb_instruction];
     113        ALLOC1(reg_PC_ACCESS_INSTRUCTION_ENABLE ,Tcontrol_t,_param->_nb_instruction);
     114        ALLOC1(reg_PC_CURRENT_INSTRUCTION_ENABLE,Tcontrol_t,_param->_nb_instruction);
     115        ALLOC1(reg_PC_NEXT_INSTRUCTION_ENABLE   ,Tcontrol_t,_param->_nb_instruction);
    114116      }
    115117
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_deallocation.cpp

    r88 r101  
    4747        if (_param->_have_port_inst_ifetch_ptr)
    4848        delete     in_PREDICT_INST_IFETCH_PTR            ;
     49//      delete     in_PREDICT_BRANCH_IS_CURRENT          ;
    4950        delete     in_PREDICT_BRANCH_STATE               ;
    5051        if (_param->_have_port_depth)
     
    6061        if (usage_is_set(_usage,USE_SYSTEMC))
    6162          {
     63            delete reg_PC_ACCESS_INSTRUCTION_ENABLE ;
    6264            delete reg_PC_CURRENT_INSTRUCTION_ENABLE;
    6365            delete reg_PC_NEXT_INSTRUCTION_ENABLE   ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_genMoore.cpp

    r88 r101  
    2828    // =========================================
    2929
    30     internal_ADDRESS_VAL = reg_PC_CURRENT_VAL;
     30    internal_ADDRESS_VAL = reg_PC_ACCESS_VAL;
    3131
    3232    PORT_WRITE(out_ADDRESS_VAL                        ,internal_ADDRESS_VAL                      );
    33     PORT_WRITE(out_ADDRESS_INSTRUCTION_ADDRESS        ,reg_PC_CURRENT                            );
     33    PORT_WRITE(out_ADDRESS_INSTRUCTION_ADDRESS        ,reg_PC_ACCESS                            );
    3434    if (_param->_have_port_inst_ifetch_ptr)
    35     PORT_WRITE(out_ADDRESS_INST_IFETCH_PTR            ,reg_PC_CURRENT_INST_IFETCH_PTR            );
    36     PORT_WRITE(out_ADDRESS_BRANCH_STATE               ,reg_PC_CURRENT_BRANCH_STATE               );
     35    PORT_WRITE(out_ADDRESS_INST_IFETCH_PTR            ,reg_PC_ACCESS_INST_IFETCH_PTR            );
     36    PORT_WRITE(out_ADDRESS_BRANCH_STATE               ,reg_PC_ACCESS_BRANCH_STATE               );
    3737    if (_param->_have_port_depth)
    38     PORT_WRITE(out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID,reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID);
     38    PORT_WRITE(out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID,reg_PC_ACCESS_BRANCH_UPDATE_PREDICTION_ID);
    3939
    4040    for (uint32_t i=0; i<_param->_nb_instruction; i++)
    41       PORT_WRITE(out_ADDRESS_INSTRUCTION_ENABLE [i], reg_PC_CURRENT_INSTRUCTION_ENABLE[i]);
     41      PORT_WRITE(out_ADDRESS_INSTRUCTION_ENABLE [i], reg_PC_ACCESS_INSTRUCTION_ENABLE[i]);
    4242
    4343    // =========================================
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_transition.cpp

    r98 r101  
    2828      {
    2929        // nothing is valid
     30        reg_PC_ACCESS_VAL    = 0;
     31
    3032        reg_PC_CURRENT_VAL   = 0;
    3133
    3234        reg_PC_NEXT_VAL      = 1;
    3335        reg_PC_NEXT          = 0x100>>2;
     36        reg_PC_NEXT_IS_DS_TAKE                  = 0;
     37        reg_PC_NEXT_INSTRUCTION_ENABLE [0]      = 1;
     38        for (uint32_t i=1; i<_param->_nb_instruction; i++)
     39        reg_PC_NEXT_INSTRUCTION_ENABLE [i]      = 0;
     40        reg_PC_NEXT_INST_IFETCH_PTR             = 0;
     41        reg_PC_NEXT_BRANCH_STATE                = 0;
     42        reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID = 0;
     43
    3444
    3545        reg_PC_NEXT_NEXT_VAL = 0;
     
    4252        if (PORT_READ(in_PREDICT_ACK) and internal_PREDICT_VAL)
    4353          {
     54            bool branch_is_current = reg_PC_NEXT_IS_DS_TAKE;
     55            if (branch_is_current)
     56              {
     57                if (_param->_have_port_inst_ifetch_ptr)
     58                reg_PC_CURRENT_INST_IFETCH_PTR             = PORT_READ(in_PREDICT_INST_IFETCH_PTR            );
     59                reg_PC_CURRENT_BRANCH_STATE                = PORT_READ(in_PREDICT_BRANCH_STATE               );
     60                if (_param->_have_port_depth)
     61                reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID = PORT_READ(in_PREDICT_BRANCH_UPDATE_PREDICTION_ID);
     62              }
     63            else
     64              {
     65                if (_param->_have_port_inst_ifetch_ptr)
     66                reg_PC_NEXT_INST_IFETCH_PTR                = PORT_READ(in_PREDICT_INST_IFETCH_PTR            );
     67                reg_PC_NEXT_BRANCH_STATE                   = PORT_READ(in_PREDICT_BRANCH_STATE               );
     68                if (_param->_have_port_depth)
     69                reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID    = PORT_READ(in_PREDICT_BRANCH_UPDATE_PREDICTION_ID);
     70              }
     71
    4472            for (uint32_t i=0; i<_param->_nb_instruction; i++)
    4573            reg_PC_NEXT_INSTRUCTION_ENABLE [i] = PORT_READ(in_PREDICT_INSTRUCTION_ENABLE [i]);
    46             if (_param->_have_port_inst_ifetch_ptr)
    47             reg_PC_NEXT_INST_IFETCH_PTR             = PORT_READ(in_PREDICT_INST_IFETCH_PTR            );
    48             reg_PC_NEXT_BRANCH_STATE                = PORT_READ(in_PREDICT_BRANCH_STATE               );
    49             if (_param->_have_port_depth)
    50             reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID = PORT_READ(in_PREDICT_BRANCH_UPDATE_PREDICTION_ID);
    5174           
    5275            reg_PC_NEXT_NEXT_VAL                    = 1; // address is valid
     
    6487        // =========================================
    6588        // transaction with icache
    66         if ( (internal_ADDRESS_VAL and PORT_READ(in_ADDRESS_ACK)) or not reg_PC_CURRENT_VAL)
    67           {
     89        if (internal_ADDRESS_VAL and PORT_READ(in_ADDRESS_ACK))
     90          {
     91            reg_PC_ACCESS_VAL = 0;
    6892#ifdef STATISTICS
    6993            if (usage_is_set(_usage,USE_STATISTICS))
    70               if (reg_PC_CURRENT_VAL)
    71                 {
     94              {
    7295                  (*_stat_nb_transaction_address) ++;
    7396                 
    7497                  for (uint32_t i=0; i<_param->_nb_instruction; i++)
    75                     if (reg_PC_CURRENT_INSTRUCTION_ENABLE [i] == true)
     98                    if (reg_PC_ACCESS_INSTRUCTION_ENABLE [i] == true)
    7699                      (*_stat_sum_packet_size) ++;
    77100                }
    78101#endif
    79 
    80 
    81             Tcontrol_t pc_next_val = reg_PC_NEXT_VAL and reg_PC_NEXT_NEXT_VAL;
    82 
    83             // next pc became current pc
    84             reg_PC_CURRENT_VAL                             = pc_next_val;
    85 
    86             // if pc_next is not valid : don't erase PC and PC_IS_DS_TAKE : this register is send a the predict (to compute pc_next)
    87             if (pc_next_val)
    88               {
    89                 reg_PC_CURRENT                             = reg_PC_NEXT                            ;
    90                 reg_PC_CURRENT_IS_DS_TAKE                  = reg_PC_NEXT_IS_DS_TAKE                 ;
    91                 reg_PC_CURRENT_INST_IFETCH_PTR             = reg_PC_NEXT_INST_IFETCH_PTR            ;
    92                 reg_PC_CURRENT_BRANCH_STATE                = reg_PC_NEXT_BRANCH_STATE               ;
    93                 reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID = reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID;
    94 
    95                 for (uint32_t i=0; i<_param->_nb_instruction; i++)
    96                 reg_PC_CURRENT_INSTRUCTION_ENABLE [i] = reg_PC_NEXT_INSTRUCTION_ENABLE [i];
    97            
    98                 reg_PC_NEXT_VAL                            = reg_PC_NEXT_NEXT_VAL       ;
    99                 // if pc_next_next is not valid : don't erase PC_NEXT and PC_NEXT_IS_DS_TAKE : this register is send a the predict (to compute pc_next)
    100                 if (reg_PC_NEXT_NEXT_VAL)
    101                   {
    102                     reg_PC_NEXT                            = reg_PC_NEXT_NEXT           ;
    103                     reg_PC_NEXT_IS_DS_TAKE                 = reg_PC_NEXT_NEXT_IS_DS_TAKE;
    104                   }
    105                
    106                 // invalid next next pc
    107                 reg_PC_NEXT_NEXT_VAL                       = 0;
    108               }
    109 
    110           }
    111        
     102          }
     103       
     104        // Shift register
     105
     106        if (not reg_PC_ACCESS_VAL and reg_PC_CURRENT_VAL and reg_PC_NEXT_VAL and reg_PC_NEXT_NEXT_VAL)
     107          {
     108            reg_PC_ACCESS_VAL  = 1; // new request
     109            reg_PC_CURRENT_VAL = 0; // invalid current
     110           
     111            reg_PC_ACCESS                             = reg_PC_CURRENT                            ;
     112            reg_PC_ACCESS_IS_DS_TAKE                  = reg_PC_CURRENT_IS_DS_TAKE                 ;
     113            reg_PC_ACCESS_INST_IFETCH_PTR             = reg_PC_CURRENT_INST_IFETCH_PTR            ;
     114            reg_PC_ACCESS_BRANCH_STATE                = reg_PC_CURRENT_BRANCH_STATE               ;
     115            reg_PC_ACCESS_BRANCH_UPDATE_PREDICTION_ID = reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID;
     116           
     117            for (uint32_t i=0; i<_param->_nb_instruction; i++)
     118              reg_PC_ACCESS_INSTRUCTION_ENABLE [i] = reg_PC_CURRENT_INSTRUCTION_ENABLE [i];
     119          }
     120       
     121        if (not reg_PC_CURRENT_VAL)
     122          {
     123            bool val = reg_PC_NEXT_VAL;
     124            reg_PC_CURRENT_VAL = val; // new PC_CURRENT if PC_NEXT is valid
     125            reg_PC_NEXT_VAL    = 0;   // invalid next
     126
     127            if (val)
     128              {
     129                reg_PC_CURRENT                             = reg_PC_NEXT                            ;
     130                reg_PC_CURRENT_IS_DS_TAKE                  = reg_PC_NEXT_IS_DS_TAKE                 ;
     131                reg_PC_CURRENT_INST_IFETCH_PTR             = reg_PC_NEXT_INST_IFETCH_PTR            ;
     132                reg_PC_CURRENT_BRANCH_STATE                = reg_PC_NEXT_BRANCH_STATE               ;
     133                reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID = reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID;
     134               
     135                for (uint32_t i=0; i<_param->_nb_instruction; i++)
     136                  reg_PC_CURRENT_INSTRUCTION_ENABLE [i] = reg_PC_NEXT_INSTRUCTION_ENABLE [i];
     137              }
     138          }
     139
     140        if (not reg_PC_NEXT_VAL)
     141          {
     142            bool val = reg_PC_NEXT_NEXT_VAL;
     143            reg_PC_NEXT_VAL      = val; // new PC_NEXT if PC_NEXT_NEXT is valid
     144            reg_PC_NEXT_NEXT_VAL = 0;   // invalid next_next
     145           
     146            if (val)
     147              {
     148                reg_PC_NEXT                             = reg_PC_NEXT_NEXT                            ;
     149                reg_PC_NEXT_IS_DS_TAKE                  = reg_PC_NEXT_NEXT_IS_DS_TAKE                 ;
     150//              reg_PC_NEXT_INST_IFETCH_PTR             = reg_PC_NEXT_NEXT_INST_IFETCH_PTR            ;
     151//              reg_PC_NEXT_BRANCH_STATE                = reg_PC_NEXT_NEXT_BRANCH_STATE               ;
     152//              reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID = reg_PC_NEXT_NEXT_BRANCH_UPDATE_PREDICTION_ID;
     153             
     154//              for (uint32_t i=0; i<_param->_nb_instruction; i++)
     155//                reg_PC_NEXT_INSTRUCTION_ENABLE [i] = reg_PC_NEXT_NEXT_INSTRUCTION_ENABLE [i];
     156              }
     157          }
    112158
    113159        // =========================================
     
    121167            log_printf(TRACE,Address_management,FUNCTION,"    * ADDRESS_NEXT     : %.8x (%.8x)",PORT_READ(in_EVENT_ADDRESS_NEXT    ),PORT_READ(in_EVENT_ADDRESS_NEXT    )<<2);
    122168            log_printf(TRACE,Address_management,FUNCTION,"    * ADDRESS_NEXT_VAL : %d"  ,PORT_READ(in_EVENT_ADDRESS_NEXT_VAL));
     169
     170            reg_PC_ACCESS_VAL                       = 0;
    123171            reg_PC_CURRENT_VAL                      = 0;
    124172            reg_PC_NEXT_VAL                         = 1;
     
    157205      }
    158206
    159 #if defined(DEBUG) and (DEBUG >= DEBUG_TRACE)
     207#if defined(DEBUG) and DEBUG_Address_management and (DEBUG >= DEBUG_TRACE)
    160208    log_printf(TRACE,Address_management,FUNCTION,"  * Dump PC");
    161     log_printf(TRACE,Address_management,FUNCTION,"    * Current   : %d %d 0x%.8x (%.8x)",reg_PC_CURRENT_VAL  , reg_PC_CURRENT_IS_DS_TAKE  , reg_PC_CURRENT  , reg_PC_CURRENT  <<2);
    162     log_printf(TRACE,Address_management,FUNCTION,"    * Next      : %d %d 0x%.8x (%.8x)",reg_PC_NEXT_VAL     , reg_PC_NEXT_IS_DS_TAKE     , reg_PC_NEXT     , reg_PC_NEXT     <<2);   
    163     log_printf(TRACE,Address_management,FUNCTION,"    * Next_Next : %d %d 0x%.8x (%.8x)",reg_PC_NEXT_NEXT_VAL, reg_PC_NEXT_NEXT_IS_DS_TAKE, reg_PC_NEXT_NEXT, reg_PC_NEXT_NEXT<<2);   
     209    {
     210      std::string instruction_enable;
     211      for (uint32_t i=0; i<_param->_nb_instruction; ++i)
     212        instruction_enable += toString(reg_PC_ACCESS_INSTRUCTION_ENABLE [i])+ " ";
     213
     214      log_printf(TRACE,Address_management,FUNCTION,"    * Access    : %d %d 0x%.8x (%.8x) - %.2d %.2d %.2d - %s",
     215                 reg_PC_ACCESS_VAL,
     216                 reg_PC_ACCESS_IS_DS_TAKE,
     217                 reg_PC_ACCESS,
     218                 reg_PC_ACCESS<<2,
     219                 reg_PC_ACCESS_BRANCH_STATE,
     220                 reg_PC_ACCESS_INST_IFETCH_PTR,
     221                 reg_PC_ACCESS_BRANCH_UPDATE_PREDICTION_ID,
     222                 instruction_enable.c_str()
     223                 );
     224    }
     225    {
     226      std::string instruction_enable;
     227      for (uint32_t i=0; i<_param->_nb_instruction; ++i)
     228        instruction_enable += toString(reg_PC_CURRENT_INSTRUCTION_ENABLE [i])+ " ";
     229
     230      log_printf(TRACE,Address_management,FUNCTION,"    * Current   : %d %d 0x%.8x (%.8x) - %.2d %.2d %.2d - %s",
     231                 reg_PC_CURRENT_VAL,
     232                 reg_PC_CURRENT_IS_DS_TAKE,
     233                 reg_PC_CURRENT,
     234                 reg_PC_CURRENT<<2,
     235                 reg_PC_CURRENT_BRANCH_STATE,
     236                 reg_PC_CURRENT_INST_IFETCH_PTR,
     237                 reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID,
     238                 instruction_enable.c_str()
     239                 );
     240    }
     241    {
     242      std::string instruction_enable;
     243      for (uint32_t i=0; i<_param->_nb_instruction; ++i)
     244        instruction_enable += toString(reg_PC_NEXT_INSTRUCTION_ENABLE [i])+ " ";
     245
     246      log_printf(TRACE,Address_management,FUNCTION,"    * Next      : %d %d 0x%.8x (%.8x) - %.2d %.2d %.2d - %s",
     247                 reg_PC_NEXT_VAL,
     248                 reg_PC_NEXT_IS_DS_TAKE,
     249                 reg_PC_NEXT,
     250                 reg_PC_NEXT<<2,
     251                 reg_PC_NEXT_BRANCH_STATE,
     252                 reg_PC_NEXT_INST_IFETCH_PTR,
     253                 reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID,
     254                 instruction_enable.c_str());
     255    }
     256    log_printf(TRACE,Address_management,FUNCTION,"    * Next_Next : %d %d 0x%.8x (%.8x)",
     257               reg_PC_NEXT_NEXT_VAL,
     258               reg_PC_NEXT_NEXT_IS_DS_TAKE,
     259               reg_PC_NEXT_NEXT,
     260               reg_PC_NEXT_NEXT<<2);   
    164261#endif
    165262
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/include/Types.h

    r85 r101  
    2222    {
    2323      IFETCH_QUEUE_STATE_EMPTY         ,  // slot is empty
    24     //IFETCH_QUEUE_STATE_WAIT_REQ      ,  // slot is allocated               - wait request to   cache
     24//    IFETCH_QUEUE_STATE_WAIT_REQ      ,  // slot is allocated               - wait request to   cache
    2525      IFETCH_QUEUE_STATE_WAIT_RSP      ,  // slot have send a request        - wait respons from cache
    2626      IFETCH_QUEUE_STATE_HAVE_RSP      ,  // slot have a bloc of instruction - wait accept by decod
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_transition.cpp

    r88 r101  
    4141            // New slot in ifetch_queue is allocated
    4242           
    43             _queue[reg_PTR_WRITE]->_state                       = IFETCH_QUEUE_STATE_WAIT_RSP;
     43            _queue[reg_PTR_WRITE]->_state = IFETCH_QUEUE_STATE_WAIT_RSP;
    4444             
    4545#ifdef STATISTICS
     
    5858              }
    5959
    60             _queue[reg_PTR_WRITE]->_address                     = PORT_READ(in_ADDRESS_INSTRUCTION_ADDRESS        );
     60            _queue[reg_PTR_WRITE]->_address                     = PORT_READ(in_ADDRESS_INSTRUCTION_ADDRESS);
    6161            _queue[reg_PTR_WRITE]->_inst_ifetch_ptr             = (_param->_have_port_inst_ifetch_ptr)?PORT_READ(in_ADDRESS_INST_IFETCH_PTR            ):0;
    62             _queue[reg_PTR_WRITE]->_branch_state                = PORT_READ(in_ADDRESS_BRANCH_STATE               );
     62            _queue[reg_PTR_WRITE]->_branch_state                = PORT_READ(in_ADDRESS_BRANCH_STATE);
    6363            _queue[reg_PTR_WRITE]->_branch_update_prediction_id = (_param->_have_port_depth)?PORT_READ(in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID):0;
    6464           
     
    142142        for (uint32_t i=0; i<_param->_size_queue; i++)
    143143          {
    144             log_printf(TRACE,Ifetch_queue,FUNCTION,"    * [%d] %s %.8x %d - %d %d %d", i, toString(_queue [i]->_state).c_str(), _queue [i]->_address,_queue [i]->_inst_ifetch_ptr,_queue [i]->_branch_state,_queue [i]->_branch_update_prediction_id,_queue [i]->_exception);
     144            log_printf(TRACE,Ifetch_queue,FUNCTION,"    * [%d] 0x%.8x (0x%.8x) %d - %d %d %d - %s",
     145                       i,
     146                       _queue [i]->_address,
     147                       _queue [i]->_address<<2,
     148                       _queue [i]->_inst_ifetch_ptr,
     149                       _queue [i]->_branch_state,
     150                       _queue [i]->_branch_update_prediction_id,
     151                       _queue [i]->_exception,
     152                       toString(_queue [i]->_state).c_str()
     153                       );
    145154           
    146155            for (uint32_t j=0; j<_param->_nb_instruction; j++)
    147               log_printf(TRACE,Ifetch_queue,FUNCTION,"      * %d %.8x", _queue [i]->_instruction_enable[j], _queue [i]->_instruction[j]);
     156              log_printf(TRACE,Ifetch_queue,FUNCTION,"      * %d 0x%.8x", _queue [i]->_instruction_enable[j], _queue [i]->_instruction[j]);
    148157          }
    149158#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/SelfTest/src/test.cpp

    r88 r101  
    250250      LABEL("Iteration %d",iteration);
    251251
    252       // PREDICT
    253       {
    254         in_PREDICT_ACK  ->write((rand()%100)<percent_transaction_predict);
     252//       // PREDICT
     253//       {
     254//      in_PREDICT_ACK  ->write((rand()%100)<percent_transaction_predict);
    255255       
    256         SC_START(0);
    257 
    258         Taddress_t addr  = (out_PREDICT_PC_CURRENT_IS_DS_TAKE->read())?out_PREDICT_PC_PREVIOUS->read():out_PREDICT_PC_CURRENT->read();
    259 
    260         uint32_t   begin = addr%_param->_nb_instruction;
    261         uint32_t   end   = ((begin<<1)>_param->_nb_instruction)?(_param->_nb_instruction-1):(begin<<1);
    262         Tcontrol_t take  = (nb_packet_in%jump)==0;
     256//      SC_START(0);
     257
     258//      Taddress_t addr  = (out_PREDICT_PC_CURRENT_IS_DS_TAKE->read())?out_PREDICT_PC_PREVIOUS->read():out_PREDICT_PC_CURRENT->read();
     259
     260//      uint32_t   begin = addr%_param->_nb_instruction;
     261//      uint32_t   end   = ((begin<<1)>_param->_nb_instruction)?(_param->_nb_instruction-1):(begin<<1);
     262//      Tcontrol_t take  = (nb_packet_in%jump)==0;
    263263       
    264         if (take)
    265           addr += 0x100;
    266         else
    267           addr += end-begin+1;
    268 
    269         for (uint32_t i=0; i<_param->_nb_instruction; i++)
    270         in_PREDICT_INSTRUCTION_ENABLE     [i] ->write((i>=begin) and (i<=end));
    271         in_PREDICT_PC_NEXT                    ->write(addr);
    272         in_PREDICT_PC_NEXT_IS_DS_TAKE         ->write(take);
    273         in_PREDICT_INST_IFETCH_PTR            ->write(0);
    274         in_PREDICT_BRANCH_STATE               ->write(0);
    275         in_PREDICT_BRANCH_UPDATE_PREDICTION_ID->write(0);
    276       }
    277 
    278       // DECOD
    279       {
    280         uint32_t nb_decod = (rand()%_param->_nb_instruction);
    281 
    282         for (uint32_t i=0; i<_param->_nb_instruction; i++)
    283           in_DECOD_ACK [i]->write(i<=nb_decod);
    284       }
    285 
    286       // EVENT
    287       in_EVENT_VAL             ->write((rand()%100)<percent_transaction_event  );
    288       in_EVENT_ADDRESS         ->write(0x77);
    289       in_EVENT_ADDRESS_NEXT    ->write(0x171);
    290       Tcontrol_t is_ds_take = rand();
    291       in_EVENT_ADDRESS_NEXT_VAL->write(is_ds_take);
    292       in_EVENT_IS_DS_TAKE      ->write(is_ds_take);
    293 
    294       // ICACHE_REQ
    295       in_ICACHE_REQ_ACK->write((rand()%100)<percent_transaction_icache_req);
    296 
    297       // ICACHE_RSP
    298       {
    299         Tcontrol_t val = false;
    300         if (not cache->empty())
    301           {
    302             slot_t<cache_req_t *> cache_rsp = cache->read();
    303 
    304             val = (cache_rsp._delay == 0);
     264//      if (take)
     265//        addr += 0x100;
     266//      else
     267//        addr += end-begin+1;
     268
     269//      for (uint32_t i=0; i<_param->_nb_instruction; i++)
     270//      in_PREDICT_INSTRUCTION_ENABLE     [i] ->write((i>=begin) and (i<=end));
     271//      in_PREDICT_PC_NEXT                    ->write(addr);
     272//      in_PREDICT_PC_NEXT_IS_DS_TAKE         ->write(take);
     273//      in_PREDICT_INST_IFETCH_PTR            ->write(0);
     274//      in_PREDICT_BRANCH_STATE               ->write(0);
     275//      in_PREDICT_BRANCH_UPDATE_PREDICTION_ID->write(0);
     276//       }
     277
     278//       // DECOD
     279//       {
     280//      uint32_t nb_decod = (rand()%_param->_nb_instruction);
     281
     282//      for (uint32_t i=0; i<_param->_nb_instruction; i++)
     283//        in_DECOD_ACK [i]->write(i<=nb_decod);
     284//       }
     285
     286//       // EVENT
     287//       in_EVENT_VAL             ->write((rand()%100)<percent_transaction_event  );
     288//       in_EVENT_ADDRESS         ->write(0x77);
     289//       in_EVENT_ADDRESS_NEXT    ->write(0x171);
     290//       Tcontrol_t is_ds_take = rand();
     291//       in_EVENT_ADDRESS_NEXT_VAL->write(is_ds_take);
     292//       in_EVENT_IS_DS_TAKE      ->write(is_ds_take);
     293
     294//       // ICACHE_REQ
     295//       in_ICACHE_REQ_ACK->write((rand()%100)<percent_transaction_icache_req);
     296
     297//       // ICACHE_RSP
     298//       {
     299//      Tcontrol_t val = false;
     300//      if (not cache->empty())
     301//        {
     302//          slot_t<cache_req_t *> cache_rsp = cache->read();
     303
     304//          val = (cache_rsp._delay == 0);
    305305           
    306             Tpacket_t  packet  = cache_rsp._data->packet ;
    307             Taddress_t address = cache_rsp._data->address;
     306//          Tpacket_t  packet  = cache_rsp._data->packet ;
     307//          Taddress_t address = cache_rsp._data->address;
    308308           
    309             in_ICACHE_RSP_PACKET_ID      ->write(packet);
    310             for (uint32_t i=0; i<_param->_nb_instruction; i++)
    311             in_ICACHE_RSP_INSTRUCTION [i]->write(address+i);
    312             in_ICACHE_RSP_ERROR          ->write(0);
    313           }
    314 
    315         in_ICACHE_RSP_VAL->write(val);
    316       }
    317 
    318       //-------------------------------------------------
    319       SC_START(0);
    320       //-------------------------------------------------
    321 
    322       if (out_ICACHE_REQ_VAL->read() and in_ICACHE_REQ_ACK->read())
    323         {
    324           LABEL("ICACHE_REQ : Transaction accepted");
    325 
    326           Tpacket_t  packet  = (_param->_have_port_ifetch_queue_ptr)?out_ICACHE_REQ_PACKET_ID->read():0;
    327           Taddress_t address = out_ICACHE_REQ_ADDRESS->read();
    328 
    329           TEST(bool      ,slot_use[packet], false);
    330           TEST(Taddress_t,address         ,c_addr);
    331 
    332           slot_use[packet] = true;
    333 
    334           uint32_t delay;
    335           if ((rand()%100)<percent_hit)
    336             delay = 1;
    337           else
    338             delay = delay_miss_min + (rand()%(delay_miss_max-delay_miss_min+1));
    339 
    340           cache_req_t * cache_req = new cache_req_t(packet,address);
    341           cache->push(delay,cache_req);
    342 
    343           c_val = 0;
    344           nb_packet_in ++;
    345         }
    346 
    347       {
    348         bool find=false;
    349 
    350         Taddress_t addr=out_DECOD_ADDRESS->read();
    351         for (uint32_t i=0; i<_param->_nb_instruction; i++)
    352           if (out_DECOD_VAL[i]->read() and in_DECOD_ACK [i]->read())
    353             {
    354               Tinstruction_t inst = out_DECOD_INSTRUCTION[i]->read();
    355               LABEL("DECOD [%d]  : Transaction accepted",i);
    356               LABEL("  address     : 0x%x",addr);
    357               LABEL("  instruction : 0x%x",inst);
    358 
    359               find = true;
    360               TEST(Tinstruction_t,inst,addr+i);
    361             }
    362 
    363         if (find)
    364           {
    365             if (_param->_have_port_inst_ifetch_ptr)
    366             TEST(Tinst_ifetch_ptr_t, out_DECOD_INST_IFETCH_PTR            ->read(), 0);
    367             TEST(Tbranch_state_t   , out_DECOD_BRANCH_STATE               ->read(), 0);
    368             if (_param->_have_port_depth)
    369             TEST(Tprediction_ptr_t , out_DECOD_BRANCH_UPDATE_PREDICTION_ID->read(), 0);
    370             TEST(Texception_t      , out_DECOD_EXCEPTION                  ->read(), 0);
    371           }
    372       }
     309//          in_ICACHE_RSP_PACKET_ID      ->write(packet);
     310//          for (uint32_t i=0; i<_param->_nb_instruction; i++)
     311//          in_ICACHE_RSP_INSTRUCTION [i]->write(address+i);
     312//          in_ICACHE_RSP_ERROR          ->write(0);
     313//        }
     314
     315//      in_ICACHE_RSP_VAL->write(val);
     316//       }
     317
     318//       //-------------------------------------------------
     319//       SC_START(0);
     320//       //-------------------------------------------------
     321
     322//       if (out_ICACHE_REQ_VAL->read() and in_ICACHE_REQ_ACK->read())
     323//      {
     324//        LABEL("ICACHE_REQ : Transaction accepted");
     325
     326//        Tpacket_t  packet  = (_param->_have_port_ifetch_queue_ptr)?out_ICACHE_REQ_PACKET_ID->read():0;
     327//        Taddress_t address = out_ICACHE_REQ_ADDRESS->read();
     328
     329//        TEST(bool      ,slot_use[packet], false);
     330//        TEST(Taddress_t,address         ,c_addr);
     331
     332//        slot_use[packet] = true;
     333
     334//        uint32_t delay;
     335//        if ((rand()%100)<percent_hit)
     336//          delay = 1;
     337//        else
     338//          delay = delay_miss_min + (rand()%(delay_miss_max-delay_miss_min+1));
     339
     340//        cache_req_t * cache_req = new cache_req_t(packet,address);
     341//        cache->push(delay,cache_req);
     342
     343//        c_val = 0;
     344//        nb_packet_in ++;
     345//      }
     346
     347//       {
     348//      bool find=false;
     349
     350//      Taddress_t addr=out_DECOD_ADDRESS->read();
     351//      for (uint32_t i=0; i<_param->_nb_instruction; i++)
     352//        if (out_DECOD_VAL[i]->read() and in_DECOD_ACK [i]->read())
     353//          {
     354//            Tinstruction_t inst = out_DECOD_INSTRUCTION[i]->read();
     355//            LABEL("DECOD [%d]  : Transaction accepted",i);
     356//            LABEL("  address     : 0x%x",addr);
     357//            LABEL("  instruction : 0x%x",inst);
     358
     359//            find = true;
     360//            TEST(Tinstruction_t,inst,addr+i);
     361//          }
     362
     363//      if (find)
     364//        {
     365//          if (_param->_have_port_inst_ifetch_ptr)
     366//          TEST(Tinst_ifetch_ptr_t, out_DECOD_INST_IFETCH_PTR            ->read(), 0);
     367//          TEST(Tbranch_state_t   , out_DECOD_BRANCH_STATE               ->read(), 0);
     368//          if (_param->_have_port_depth)
     369//          TEST(Tprediction_ptr_t , out_DECOD_BRANCH_UPDATE_PREDICTION_ID->read(), 0);
     370//          TEST(Texception_t      , out_DECOD_EXCEPTION                  ->read(), 0);
     371//        }
     372//       }
    373373     
    374       if (in_ICACHE_RSP_VAL->read() and out_ICACHE_RSP_ACK->read())
    375         {
    376           LABEL("ICACHE_RSP : Transaction accepted");
    377 
    378           slot_use[cache->read()._data->packet] = false;
    379 
    380           cache->pop();
    381         }
    382 
    383       if (out_PREDICT_VAL->read() and in_PREDICT_ACK->read())
    384         {
    385           LABEL("PREDICT    : Transaction accepted");
    386 
    387           if (c_val)
    388           TEST(Tgeneral_address_t,out_PREDICT_PC_PREVIOUS          ->read(),c_addr      );
    389           TEST(Tgeneral_address_t,out_PREDICT_PC_CURRENT           ->read(),n_addr      );
    390           TEST(Tcontrol_t        ,out_PREDICT_PC_CURRENT_IS_DS_TAKE->read(),n_is_ds_take);
    391 
    392           nn_val        = true;
    393           nn_addr       = in_PREDICT_PC_NEXT           ->read();
    394           nn_is_ds_take = in_PREDICT_PC_NEXT_IS_DS_TAKE->read();
     374//       if (in_ICACHE_RSP_VAL->read() and out_ICACHE_RSP_ACK->read())
     375//      {
     376//        LABEL("ICACHE_RSP : Transaction accepted");
     377
     378//        slot_use[cache->read()._data->packet] = false;
     379
     380//        cache->pop();
     381//      }
     382
     383//       if (out_PREDICT_VAL->read() and in_PREDICT_ACK->read())
     384//      {
     385//        LABEL("PREDICT    : Transaction accepted");
     386
     387//        if (c_val)
     388//        TEST(Tgeneral_address_t,out_PREDICT_PC_PREVIOUS          ->read(),c_addr      );
     389//        TEST(Tgeneral_address_t,out_PREDICT_PC_CURRENT           ->read(),n_addr      );
     390//        TEST(Tcontrol_t        ,out_PREDICT_PC_CURRENT_IS_DS_TAKE->read(),n_is_ds_take);
     391
     392//        nn_val        = true;
     393//        nn_addr       = in_PREDICT_PC_NEXT           ->read();
     394//        nn_is_ds_take = in_PREDICT_PC_NEXT_IS_DS_TAKE->read();
    395395       
    396           for (uint32_t i=0; i<_param->_nb_instruction; i++)
    397           n_enable [i]  = in_PREDICT_INSTRUCTION_ENABLE [i]->read();
    398         }
    399 
    400       if (not c_val)
    401         {
    402           if (n_val and nn_val)
    403             {
    404               c_val        = 1;
    405               c_addr       = n_addr;
    406               c_is_ds_take = n_is_ds_take;
    407 
    408               for (uint32_t i=0; i<_param->_nb_instruction; i++)
    409                 c_enable [i] = n_enable [i];
     396//        for (uint32_t i=0; i<_param->_nb_instruction; i++)
     397//        n_enable [i]  = in_PREDICT_INSTRUCTION_ENABLE [i]->read();
     398//      }
     399
     400//       if (not c_val)
     401//      {
     402//        if (n_val and nn_val)
     403//          {
     404//            c_val        = 1;
     405//            c_addr       = n_addr;
     406//            c_is_ds_take = n_is_ds_take;
     407
     408//            for (uint32_t i=0; i<_param->_nb_instruction; i++)
     409//              c_enable [i] = n_enable [i];
    410410             
    411               n_val        = 1;
    412               n_addr       = nn_addr;
    413               n_is_ds_take = nn_is_ds_take;
     411//            n_val        = 1;
     412//            n_addr       = nn_addr;
     413//            n_is_ds_take = nn_is_ds_take;
    414414             
    415               nn_val       = 0;
    416             }
    417         }
    418 
    419       if (in_EVENT_VAL->read() and out_EVENT_ACK->read())
    420         {
    421           LABEL("EVENT      : Transaction accepted");
    422 
    423           c_val           = false;
    424           n_val           = true;
    425 
    426           n_addr          = in_EVENT_ADDRESS->read();
    427           n_is_ds_take    = in_EVENT_IS_DS_TAKE->read();
    428           nn_val          = in_EVENT_ADDRESS_NEXT_VAL->read();
    429           nn_addr         = in_EVENT_ADDRESS_NEXT    ->read();
    430           nn_is_ds_take   = 0;
    431 
    432           n_enable [0] = 1;
    433           for (uint32_t i=1; i<_param->_nb_instruction; i++)
    434             n_enable [i] = 0;
    435         }
     415//            nn_val       = 0;
     416//          }
     417//      }
     418
     419//       if (in_EVENT_VAL->read() and out_EVENT_ACK->read())
     420//      {
     421//        LABEL("EVENT      : Transaction accepted");
     422
     423//        c_val           = false;
     424//        n_val           = true;
     425
     426//        n_addr          = in_EVENT_ADDRESS->read();
     427//        n_is_ds_take    = in_EVENT_IS_DS_TAKE->read();
     428//        nn_val          = in_EVENT_ADDRESS_NEXT_VAL->read();
     429//        nn_addr         = in_EVENT_ADDRESS_NEXT    ->read();
     430//           nn_is_ds_take   = 0;
     431
     432//        n_enable [0] = 1;
     433//        for (uint32_t i=1; i<_param->_nb_instruction; i++)
     434//          n_enable [i] = 0;
     435//      }
    436436
    437437     
    438       {
    439         string str_c_enable = "";
    440         string str_n_enable = "";
    441 
    442         for (uint32_t i=0; i<_param->_nb_instruction; i++)
    443           {
    444             str_c_enable += " " + toString(c_enable [i]);
    445             str_n_enable += " " + toString(n_enable [i]);
    446           }
    447 
    448         LABEL("-----------------------------------");
    449         LABEL("  * nb_packet_in  : %d",nb_packet_in);
    450         LABEL("  * nb_packet_out : %d",nb_packet_out);
    451         LABEL("  * pc   : %d %d %.8x %s",c_val  ,c_is_ds_take , c_addr ,str_c_enable.c_str());
    452         if (nn_val)
    453           {
    454         LABEL("  * pc+4 : %d %d %.8x %s",n_val  ,n_is_ds_take , n_addr ,str_n_enable.c_str());
    455           }
    456         else
    457           {
    458         LABEL("  * pc+4 : %d %d %.8x"   ,n_val  ,n_is_ds_take , n_addr );
    459           }
    460         LABEL("  * pc+8 : %d %d %.8x"   ,nn_val ,nn_is_ds_take, nn_addr);
    461         LABEL("-----------------------------------");
    462       }
    463 
    464       SC_START(1);
    465       cache->transition();
     438//       {
     439//      string str_c_enable = "";
     440//      string str_n_enable = "";
     441
     442//      for (uint32_t i=0; i<_param->_nb_instruction; i++)
     443//        {
     444//          str_c_enable += " " + toString(c_enable [i]);
     445//          str_n_enable += " " + toString(n_enable [i]);
     446//        }
     447
     448//      LABEL("-----------------------------------");
     449//      LABEL("  * nb_packet_in  : %d",nb_packet_in);
     450//      LABEL("  * nb_packet_out : %d",nb_packet_out);
     451//      LABEL("  * pc   : %d %d %.8x %s",c_val  ,c_is_ds_take , c_addr ,str_c_enable.c_str());
     452//      if (nn_val)
     453//        {
     454//      LABEL("  * pc+4 : %d %d %.8x %s",n_val  ,n_is_ds_take , n_addr ,str_n_enable.c_str());
     455//        }
     456//      else
     457//        {
     458//      LABEL("  * pc+4 : %d %d %.8x"   ,n_val  ,n_is_ds_take , n_addr );
     459//        }
     460//      LABEL("  * pc+8 : %d %d %.8x"   ,nn_val ,nn_is_ds_take, nn_addr);
     461//      LABEL("-----------------------------------");
     462//       }
     463
     464//       SC_START(1);
     465//       cache->transition();
    466466    }
    467467
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/include/Ifetch_unit.h

    r88 r101  
    9090  public    : SC_IN (Tcontrol_t         )   *  in_PREDICT_PC_NEXT_IS_DS_TAKE          ;
    9191  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_INSTRUCTION_ENABLE          ; //[nb_instruction]
    92   public    : SC_IN (Tinst_ifetch_ptr_t )   *  in_PREDICT_INST_IFETCH_PTR             ;
    9392  public    : SC_IN (Tbranch_state_t    )   *  in_PREDICT_BRANCH_STATE                ;
    9493  public    : SC_IN (Tprediction_ptr_t  )   *  in_PREDICT_BRANCH_UPDATE_PREDICTION_ID ;
     94  public    : SC_IN (Tinst_ifetch_ptr_t )   *  in_PREDICT_INST_IFETCH_PTR             ;
    9595
    9696    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp

    r100 r101  
    151151               
    152152                    // Branch is the last slot : next paquet is the delay slot
    153                     pc_next            = address_src+1; // sequencial
     153                    pc_next            = address_src+1; // sequential
    154154                    pc_next_is_ds_take = 1;
    155155                    address_msb        = _param->_nb_instruction [context]; // == (address_src_lsb+1)
     
    341341
    342342                // Take the address packet base and add new packet
    343                 pc_next                     = pc_current-address_lsb+_param->_nb_instruction [context]; // sequencial
     343                pc_next                     = pc_current-address_lsb+_param->_nb_instruction [context]; // sequential
    344344                pc_next_is_ds_take          = 0; // no branch, also no delay slot
    345345                inst_ifetch_ptr             = 0;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/test.cpp

    r98 r101  
    9999  ALLOC1_SC_SIGNAL( in_EVENT_DEPTH                        ," in_EVENT_DEPTH                        ",Tdepth_t           ,_param->_nb_context);
    100100
     101  ALLOC1_SC_SIGNAL(out_DEPTH_VAL                          ,"out_DEPTH_VAL                          ",Tcontrol_t         ,_param->_nb_context);
    101102  ALLOC1_SC_SIGNAL(out_DEPTH_CURRENT                      ,"out_DEPTH_CURRENT                      ",Tdepth_t           ,_param->_nb_context);
    102103  ALLOC1_SC_SIGNAL(out_DEPTH_MIN                          ,"out_DEPTH_MIN                          ",Tdepth_t           ,_param->_nb_context);
    103104  ALLOC1_SC_SIGNAL(out_DEPTH_MAX                          ,"out_DEPTH_MAX                          ",Tdepth_t           ,_param->_nb_context);
     105  ALLOC1_SC_SIGNAL(out_DEPTH_FULL                         ,"out_DEPTH_FULL                         ",Tcontrol_t         ,_param->_nb_context);
    104106 
    105107  /********************************************************
     
    170172  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_CURRENT                      ,_param->_nb_context);
    171173  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_MIN                          ,_param->_nb_context);
    172     }
    173174  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_MAX                          ,_param->_nb_context);
     175    }
     176  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_VAL                          ,_param->_nb_context);
     177  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_FULL                         ,_param->_nb_context);
    174178
    175179  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    372376  DELETE1_SC_SIGNAL( in_EVENT_DEPTH                    ,_param->_nb_context);
    373377
     378  DELETE1_SC_SIGNAL(out_DEPTH_VAL          ,_param->_nb_context);
    374379  DELETE1_SC_SIGNAL(out_DEPTH_CURRENT      ,_param->_nb_context);
    375380  DELETE1_SC_SIGNAL(out_DEPTH_MIN          ,_param->_nb_context);
    376381  DELETE1_SC_SIGNAL(out_DEPTH_MAX          ,_param->_nb_context);
     382  DELETE1_SC_SIGNAL(out_DEPTH_FULL         ,_param->_nb_context);
    377383#endif
    378384
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp

    r98 r101  
    143143  ALLOC1_SC_SIGNAL( in_EVENT_DEPTH                    ," in_EVENT_DEPTH                    ",Tdepth_t           ,_param->_nb_context);
    144144
     145  ALLOC1_SC_SIGNAL(out_DEPTH_VAL                      ,"out_DEPTH_VAL                      ",Tcontrol_t         ,_param->_nb_context);
    145146  ALLOC1_SC_SIGNAL(out_DEPTH_CURRENT                  ,"out_DEPTH_CURRENT                  ",Tdepth_t           ,_param->_nb_context);
    146147  ALLOC1_SC_SIGNAL(out_DEPTH_MIN                      ,"out_DEPTH_MIN                      ",Tdepth_t           ,_param->_nb_context);
    147148  ALLOC1_SC_SIGNAL(out_DEPTH_MAX                      ,"out_DEPTH_MAX                      ",Tdepth_t           ,_param->_nb_context);
     149  ALLOC1_SC_SIGNAL(out_DEPTH_FULL                     ,"out_DEPTH_FULL                     ",Tcontrol_t         ,_param->_nb_context);
    148150 
    149151  /********************************************************
     
    239241  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_CURRENT                  ,_param->_nb_context);
    240242  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_MIN                      ,_param->_nb_context);
     243  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_MAX                      ,_param->_nb_context);
    241244    }
    242   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_MAX                      ,_param->_nb_context);
     245  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_VAL                      ,_param->_nb_context);
     246  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_FULL                     ,_param->_nb_context);
    243247
    244248  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    373377                 
    374378                  if (_param->_have_port_depth)
     379                    {
    375380                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    376381                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    377                      
     382                    }
    378383                  SC_START(0); // fct melay
    379384                 
     
    404409           
    405410              if (_param->_have_port_depth)
     411                {
    406412              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    407413              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     414                }
    408415            }
    409416        }
     
    462469             
    463470              if (_param->_have_port_depth)
     471                {
    464472              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    465473              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     474                }
    466475            }
    467476        }
     
    490499
    491500                  if (_param->_have_port_depth)
     501                    {
    492502                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    493503                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     504                    }
    494505                 
    495506                  SC_START(0);
     
    516527             
    517528              if (_param->_have_port_depth)
     529                {
    518530              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    519531              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     532                }
    520533            }
    521534        }
     
    539552
    540553//                   if (_param->_have_port_depth)
     554//                     {
    541555//                   TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    542556//                   TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     557//                     }
    543558                 
    544559                  SC_START(0);
     
    654669                 
    655670                  if (_param->_have_port_depth)
     671                    {
    656672                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    657673                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    658                      
     674                    }
    659675                  SC_START(0); // fct melay
    660676                 
     
    685701           
    686702              if (_param->_have_port_depth)
     703                {
    687704              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    688705              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     706                }
    689707            }
    690708        }
     
    764782             
    765783              if (_param->_have_port_depth)
     784                {
    766785              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    767786              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     787                }
    768788            }
    769789        }
     
    793813
    794814                  if (_param->_have_port_depth)
     815                    {
    795816                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    796817                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    797                  
     818                    }
    798819                  SC_START(0);
    799820                 
     
    819840             
    820841              if (_param->_have_port_depth)
     842                {
    821843              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    822844              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     845                }
    823846            }
    824847        }
     
    10131036                 
    10141037                  if (_param->_have_port_depth)
     1038                    {
    10151039                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    10161040                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    1017                      
     1041                    }
    10181042                  SC_START(0); // fct melay
    10191043                 
     
    10441068           
    10451069              if (_param->_have_port_depth)
     1070                {
    10461071              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    10471072              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1073                }
    10481074            }
    10491075        }
     
    11231149             
    11241150              if (_param->_have_port_depth)
     1151                {
    11251152              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    11261153              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1154                }
    11271155            }
    11281156        }
     
    11521180
    11531181                  if (_param->_have_port_depth)
     1182                    {
    11541183                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    11551184                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    1156                  
     1185                    }             
    11571186                  SC_START(0);
    11581187                 
     
    11781207             
    11791208              if (_param->_have_port_depth)
     1209                {
    11801210              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    11811211              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1212                }
    11821213            }
    11831214        }
     
    14501481                   
    14511482                    if (_param->_have_port_depth)
     1483                      {
    14521484                    TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    14531485                    TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    1454                    
     1486                      }
    14551487                    SC_START(0); // fct melay
    14561488                   
     
    14811513               
    14821514                if (_param->_have_port_depth)
    1483                   TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     1515                  {
     1516                TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    14841517                TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1518                  }
    14851519              }
    14861520          }
     
    15411575               
    15421576                if (_param->_have_port_depth)
    1543                   TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     1577                  {
     1578                TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    15441579                TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1580                  }
    15451581              }
    15461582          }
     
    15931629                   
    15941630                    if (_param->_have_port_depth)
     1631                      {
    15951632                    TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    15961633                    TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    1597                    
     1634                      }
    15981635                    SC_START(0); // fct melay
    15991636                   
     
    16241661               
    16251662                if (_param->_have_port_depth)
    1626                   TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     1663                  {
     1664                TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    16271665                TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1666                  }
    16281667              }
    16291668          }
     
    16771716
    16781717                  if (_param->_have_port_depth)
     1718                    {
    16791719                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    16801720                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    1681                  
     1721                    }
     1722
    16821723                  SC_START(0);
    16831724                 
     
    17111752             
    17121753              if (_param->_have_port_depth)
     1754                {
    17131755              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    17141756              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1757                }
    17151758            }
    17161759          }
     
    17381781
    17391782                  if (_param->_have_port_depth)
     1783                    {
    17401784                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    17411785                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    1742                  
     1786                    }
    17431787                  SC_START(0);
    17441788                 
     
    17721816             
    17731817              if (_param->_have_port_depth)
     1818                {
    17741819              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
    17751820              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     1821                }
    17761822            }
    17771823          }
     
    21762222
    21772223  // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     2224  delete [] out_DEPTH_VAL;
    21782225  delete [] out_DEPTH_CURRENT;
    21792226  delete [] out_DEPTH_MIN;
    21802227  delete [] out_DEPTH_MAX;
     2228  delete [] out_DEPTH_FULL;
    21812229
    21822230#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h

    r95 r101  
    2626      EVENT_STATE_FLUSH_UPT             , // in commit stage, detect a miss, context is stop and ufpt is flush, update RAS
    2727      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 envent (send by Context State)
     28      EVENT_STATE_WAIT_END_EVENT          // prediction unit is ok, wait the end of event (send by Context State)
    2929    } event_state_t;
    3030
     
    4545      UPDATE_PREDICTION_STATE_EVENT             , // previous branch is a miss prediction
    4646      UPDATE_PREDICTION_STATE_END_OK            , // branch is updated,       update pointer
     47      UPDATE_PREDICTION_STATE_END_KO_WAIT_END   , // branch is updated, don't update pointer
    4748      UPDATE_PREDICTION_STATE_END_KO              // branch is updated, don't update pointer
    4849    } upt_state_t;
     
    147148      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_EVENT      : return "event"     ; break;
    148149      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_END_OK     : return "end_ok"    ; break;
     150      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_END_KO_WAIT_END: return "end_ko_wait_end"    ; break;
    149151      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_END_KO     : return "end_ko"    ; break;
    150152      default    : return ""      ; break;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h

    r98 r101  
    148148
    149149    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     150  public    : SC_OUT(Tcontrol_t         )  ** out_DEPTH_VAL                      ; //[nb_context]
    150151  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_CURRENT                  ; //[nb_context]
    151152  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_MIN                      ; //[nb_context]
    152153  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_MAX                      ; //[nb_context]
     154  public    : SC_OUT(Tcontrol_t         )  ** out_DEPTH_FULL                     ; //[nb_context]
    153155    // If DEPTH_CURRENT :
    154156    // equal at     DEPTH_MIN            -> not speculative
     
    172174  private   : uint32_t                      * reg_UPT_TOP_EVENT                  ; //[nb_context]
    173175  private   : uint32_t                      * reg_UPT_UPDATE                     ; //[nb_context]
     176  private   : bool                          * reg_UPT_EMPTY                      ; //[nb_context]
    174177                                                                                             
    175178  private   : bool                          * reg_IS_ACCURATE                    ; //[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

    r98 r101  
    160160    {
    161161      ALLOC1_INTERFACE("depth",OUT,SOUTH, "depth", _param->_nb_context);
    162       ALLOC1_SIGNAL_OUT(out_DEPTH_CURRENT,"CURRENT",Tdepth_t,_param->_size_depth);
    163       ALLOC1_SIGNAL_OUT(out_DEPTH_MIN    ,"MIN"    ,Tdepth_t,_param->_size_depth);
    164       ALLOC1_SIGNAL_OUT(out_DEPTH_MAX    ,"MAX"    ,Tdepth_t,_param->_size_depth+1);
     162      ALLOC1_SIGNAL_OUT(out_DEPTH_VAL    ,"VAL"    ,Tcontrol_t,1);
     163      ALLOC1_SIGNAL_OUT(out_DEPTH_CURRENT,"CURRENT",Tdepth_t  ,_param->_size_depth);
     164      ALLOC1_SIGNAL_OUT(out_DEPTH_MIN    ,"MIN"    ,Tdepth_t  ,_param->_size_depth);
     165      ALLOC1_SIGNAL_OUT(out_DEPTH_MAX    ,"MAX"    ,Tdepth_t  ,_param->_size_depth);
     166      ALLOC1_SIGNAL_OUT(out_DEPTH_FULL   ,"FULL"   ,Tcontrol_t,1);
    165167    }
    166168
     
    201203    ALLOC1(reg_UPT_TOP_EVENT                ,uint32_t     ,_param->_nb_context);
    202204    ALLOC1(reg_UPT_UPDATE                   ,uint32_t     ,_param->_nb_context);
     205    ALLOC1(reg_UPT_EMPTY                    ,bool         ,_param->_nb_context);
    203206
    204207    ALLOC1(reg_EVENT_STATE                  ,event_state_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

    r98 r101  
    117117
    118118        // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     119        DELETE1_SIGNAL(out_DEPTH_VAL          ,_param->_nb_context,1);
    119120        DELETE1_SIGNAL(out_DEPTH_CURRENT      ,_param->_nb_context,_param->_size_depth);
    120121        DELETE1_SIGNAL(out_DEPTH_MIN          ,_param->_nb_context,_param->_size_depth);
    121         DELETE1_SIGNAL(out_DEPTH_MAX          ,_param->_nb_context,_param->_size_depth+1);
     122        DELETE1_SIGNAL(out_DEPTH_MAX          ,_param->_nb_context,_param->_size_depth);
     123        DELETE1_SIGNAL(out_DEPTH_FULL         ,_param->_nb_context,1);
    122124
    123125        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    154156        DELETE1(reg_UPT_TOP_EVENT                ,_param->_nb_context);
    155157        DELETE1(reg_UPT_UPDATE                   ,_param->_nb_context);
     158        DELETE1(reg_UPT_EMPTY                    ,_param->_nb_context);
    156159       
    157160        DELETE1(reg_EVENT_STATE                  ,_param->_nb_context);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp

    r98 r101  
    3434    for (uint32_t i=0; i<_param->_nb_context; i++)
    3535      {
     36        // is a valid instruction ?
     37        // If DEPTH_CURRENT :
     38        // equal at     DEPTH_MIN            -> not speculative
     39        // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss
     40        //     include ]DEPTH_MIN:DEPTH_MAX] -> speculative
     41
     42        PORT_WRITE(out_DEPTH_VAL     [i],(reg_UPDATE_PREDICTION_TABLE [i][reg_UPT_TOP [i]]._state == UPDATE_PREDICTION_STATE_EMPTY));
    3643        if (_param->_have_port_depth)
    3744          {
    3845        PORT_WRITE(out_DEPTH_CURRENT [i], reg_UPT_TOP    [i]);
    3946        PORT_WRITE(out_DEPTH_MIN     [i], reg_UPT_BOTTOM [i]);
    40           }
    4147        PORT_WRITE(out_DEPTH_MAX     [i], reg_UPT_TOP    [i]);
     48          }
     49        PORT_WRITE(out_DEPTH_FULL    [i], not reg_UPT_EMPTY [i] and (reg_UPT_TOP [i] == reg_UPT_BOTTOM [i]));
     50
     51//         bool empty = reg_UPT_EMPTY [i];
     52//      PORT_WRITE(out_DEPTH_MAX     [i], ((empty)?reg_UPT_BOTTOM [i]:((reg_UPT_TOP [i]==0)?(_param->_size_upt_queue[i]-1):(reg_UPT_TOP [i]-1))));
    4253      }
    4354
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp

    r98 r101  
    4646            reg_UPT_TOP_EVENT        [i] = 0;
    4747            reg_UPT_UPDATE           [i] = 0;
     48            reg_UPT_EMPTY            [i] = true;
    4849                                                                                   
    4950            reg_IS_ACCURATE          [i] = true;
     
    8788            // UPDATE_PREDICTION_TABLE
    8889            {
    89               uint32_t bottom = reg_UPT_BOTTOM [i];
    90               bool     end_ok = (reg_UPDATE_PREDICTION_TABLE [i][bottom]._state == UPDATE_PREDICTION_STATE_END_OK);
    91               bool     end_ko = (reg_UPDATE_PREDICTION_TABLE [i][bottom]._state == UPDATE_PREDICTION_STATE_END_KO);
     90              uint32_t      bottom      = reg_UPT_BOTTOM [i];
     91              bool          end_ok      = (reg_UPDATE_PREDICTION_TABLE [i][bottom]._state == UPDATE_PREDICTION_STATE_END_OK);
     92              bool          end_ko      = (reg_UPDATE_PREDICTION_TABLE [i][bottom]._state == UPDATE_PREDICTION_STATE_END_KO);
     93//               event_state_t event_state = reg_EVENT_STATE [i];
    9294
    9395              // Test if state is end
     96//               if ((end_ok or end_ko) and
     97//                   ((event_state != EVENT_STATE_UPDATE_CONTEXT) and
     98//                    (event_state != EVENT_STATE_WAIT_END_EVENT)))
    9499              if (end_ok or end_ko)
    95100                {
     
    102107                  // Update pointer
    103108                  reg_UPT_BOTTOM [i] = (bottom+1)%_param->_size_upt_queue[i];
     109
     110                  if (reg_UPT_BOTTOM [i] == reg_UPT_TOP [i])
     111                    reg_UPT_EMPTY [i] = true; // free a slot
     112
    104113//                   if (bottom = reg_UPT_UPDATE [i])
    105114//                     reg_UPT_UPDATE [i] = reg_UPT_BOTTOM [i];
     
    108117                      reg_UPT_TOP    [i] = reg_UPT_TOP_EVENT [i];
    109118                      reg_UPT_UPDATE [i] = reg_UPT_TOP_EVENT [i];
     119
     120                      if (reg_UPT_BOTTOM [i] != reg_UPT_TOP [i])
     121                        reg_UPT_EMPTY [i] = false;
    110122                    }
    111123                }
     
    290302              // Update pointer
    291303              reg_UPT_TOP     [context] = (upt_ptr_write+1)%_param->_size_upt_queue [context];
     304              reg_UPT_EMPTY   [context] = false;
    292305//            reg_UPT_UPDATE  [context] = reg_UPT_TOP [context];
    293306            }
     
    338351                  reg_UPT_TOP_EVENT [context] = top;
    339352
     353                  if (reg_UPT_BOTTOM [context] == reg_UPT_TOP [context])
     354                    reg_UPT_EMPTY [i] = true;
     355
    340356#ifdef DEBUG_TEST
    341357                  if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END)
     
    483499                      if (ko)
    484500                        {
     501                          // Ko : wait end of all instruction
     502//                           log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_END_KO_WAIT_END (update)",context,depth);
     503                         
     504//                           reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_END_KO_WAIT_END;
     505
    485506                          log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_END_KO (update)",context,depth);
    486507                         
     
    535556                     
    536557                      // Free the branch with no accurate ?
    537                       if (reg_UPDATE_PREDICTION_TABLE [context][depth]._is_accurate == false)
     558                      if ( (reg_UPDATE_PREDICTION_TABLE [context][depth]._is_accurate == false) and not ko)
    538559                        reg_IS_ACCURATE [context] = true;
    539560                    }
     
    587608//            Tdepth_t       depth       = PORT_READ(in_EVENT_DEPTH [i]);
    588609           
    589               // Test if end of miss
     610              // Test if end of miss -> all previous branch is complete
     611              //                     -> all next     branch is finish
    590612              if (event_type  == EVENT_TYPE_MISS_SPECULATION)
    591613                {
     
    602624                 
    603625                  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                         
     639//                   reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_END_KO;
     640
    604641                }
    605642            }
     
    699736        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_TOP_EVENT       : %d",reg_UPT_TOP_EVENT      [i]);
    700737        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_UPDATE          : %d",reg_UPT_UPDATE         [i]);
     738        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_EMPTY           : %d",reg_UPT_EMPTY          [i]);
    701739        for (uint32_t j=0; j<_param->_size_upt_queue[i]; j++)
    702740          log_printf(TRACE,Update_Prediction_Table,FUNCTION,"        [%d] %.4d, %.8x %.8x, %.1d %.1d %.1d, %.8d %.8x %.4d - %s",
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Prediction_unit.h

    r98 r101  
    121121
    122122    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     123  public    : SC_OUT(Tcontrol_t         )  ** out_DEPTH_VAL                           ; //[nb_context]
    123124  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_CURRENT                       ; //[nb_context]
    124125  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_MIN                           ; //[nb_context]
    125126  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_MAX                           ; //[nb_context]
     127  public    : SC_OUT(Tcontrol_t         )  ** out_DEPTH_FULL                          ; //[nb_context]
    126128
    127129    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_allocation.cpp

    r98 r101  
    127127      ALLOC1_INTERFACE("depth",OUT,SOUTH,"Interface with depth",_param->_nb_context);
    128128
    129       ALLOC1_SIGNAL_OUT(out_DEPTH_CURRENT      ,"current"      ,Tdepth_t,_param->_size_depth);
    130       ALLOC1_SIGNAL_OUT(out_DEPTH_MIN          ,"min"          ,Tdepth_t,_param->_size_depth);
    131       ALLOC1_SIGNAL_OUT(out_DEPTH_MAX          ,"max"          ,Tdepth_t,_param->_size_depth+1);
     129      ALLOC1_SIGNAL_OUT(out_DEPTH_VAL          ,"val"          ,Tcontrol_t,1);
     130      ALLOC1_SIGNAL_OUT(out_DEPTH_CURRENT      ,"current"      ,Tdepth_t  ,_param->_size_depth);
     131      ALLOC1_SIGNAL_OUT(out_DEPTH_MIN          ,"min"          ,Tdepth_t  ,_param->_size_depth);
     132      ALLOC1_SIGNAL_OUT(out_DEPTH_MAX          ,"max"          ,Tdepth_t  ,_param->_size_depth);
     133      ALLOC1_SIGNAL_OUT(out_DEPTH_FULL         ,"full"         ,Tcontrol_t,1);
    132134    }
    133135
     
    729731#endif
    730732         
     733          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_VAL",
     734                              dest,"out_DEPTH_"+toString(i)+"_VAL");
     735          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_FULL",
     736                              dest,"out_DEPTH_"+toString(i)+"_FULL");
    731737          if (_param->_have_port_depth)
    732738            {
     
    735741          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MIN",
    736742                              dest,"out_DEPTH_"+toString(i)+"_MIN");
    737             }
    738743          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MAX",
    739744                              dest,"out_DEPTH_"+toString(i)+"_MAX");
     745            }
    740746        }
    741747
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp

    r98 r101  
    7676        DELETE1_SIGNAL( in_EVENT_DEPTH  ,_param->_nb_context,_param->_size_depth      );
    7777
     78        DELETE1_SIGNAL(out_DEPTH_VAL          ,_param->_nb_context,1);
    7879        DELETE1_SIGNAL(out_DEPTH_CURRENT      ,_param->_nb_context,_param->_size_depth);
    7980        DELETE1_SIGNAL(out_DEPTH_MIN          ,_param->_nb_context,_param->_size_depth);
    80         DELETE1_SIGNAL(out_DEPTH_MAX          ,_param->_nb_context,_param->_size_depth+1);
     81        DELETE1_SIGNAL(out_DEPTH_MAX          ,_param->_nb_context,_param->_size_depth);
     82        DELETE1_SIGNAL(out_DEPTH_FULL         ,_param->_nb_context,1);
    8183      }
    8284    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/src/test.cpp

    r98 r101  
    117117  ALLOC1_SC_SIGNAL(out_DEPTH_MIN                      ,"out_DEPTH_MIN                      ",Tdepth_t             ,_param->_nb_context);
    118118  ALLOC1_SC_SIGNAL(out_DEPTH_MAX                      ,"out_DEPTH_MAX                      ",Tdepth_t             ,_param->_nb_context);
     119  ALLOC1_SC_SIGNAL(out_DEPTH_FULL                     ,"out_DEPTH_FULL                     ",Tcontrol_t           ,_param->_nb_context);
    119120  ALLOC1_SC_SIGNAL( in_SPR_SR_IEE                     ," in_SPR_SR_IEE                     ",Tcontrol_t           ,_param->_nb_context);
    120121  ALLOC1_SC_SIGNAL( in_SPR_SR_EPH                     ," in_SPR_SR_EPH                     ",Tcontrol_t           ,_param->_nb_context);
     
    206207  INSTANCE1_SC_SIGNAL(_Front_end, in_NB_INST_COMMIT_MEM             ,_param->_nb_context);
    207208  if (_param->_have_port_depth)
     209    {
    208210  INSTANCE1_SC_SIGNAL(_Front_end,out_DEPTH_MIN                      ,_param->_nb_context);
    209211  INSTANCE1_SC_SIGNAL(_Front_end,out_DEPTH_MAX                      ,_param->_nb_context);
     212    }
     213  INSTANCE1_SC_SIGNAL(_Front_end,out_DEPTH_FULL                     ,_param->_nb_context);
    210214  INSTANCE1_SC_SIGNAL(_Front_end, in_SPR_SR_IEE                     ,_param->_nb_context);
    211215  INSTANCE1_SC_SIGNAL(_Front_end, in_SPR_SR_EPH                     ,_param->_nb_context);
     
    257261      TEST(Tdepth_t  ,out_DEPTH_MIN           [i]->read(),0); // no branch speculated
    258262      TEST(Tdepth_t  ,out_DEPTH_MAX           [i]->read(),0); // no branch speculated
     263      TEST(Tdepth_t  ,out_DEPTH_FULL          [i]->read(),0); // no branch speculated
    259264    }
    260265  for (uint32_t i=0; i<_param->_sum_inst_decod; ++i)
     
    359364  DELETE1_SC_SIGNAL(out_DEPTH_MIN                      ,_param->_nb_context);
    360365  DELETE1_SC_SIGNAL(out_DEPTH_MAX                      ,_param->_nb_context);
     366  DELETE1_SC_SIGNAL(out_DEPTH_FULL                     ,_param->_nb_context);
    361367  DELETE1_SC_SIGNAL( in_SPR_SR_IEE                     ,_param->_nb_context);
    362368  DELETE1_SC_SIGNAL( in_SPR_SR_EPH                     ,_param->_nb_context);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/include/Front_end.h

    r98 r101  
    155155  public    : SC_OUT(Tdepth_t             ) ** out_DEPTH_MIN                        ;//[nb_context]
    156156  public    : SC_OUT(Tdepth_t             ) ** out_DEPTH_MAX                        ;//[nb_context]
     157  public    : SC_OUT(Tcontrol_t           ) ** out_DEPTH_FULL                       ;//[nb_context]
    157158
    158159    // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_allocation.cpp

    r98 r101  
    180180      ALLOC1_INTERFACE("depth",OUT,EAST,_("Interface depth"),_param->_nb_context);
    181181
    182       ALLOC1_SIGNAL_OUT (out_DEPTH_MIN                        ,"MIN"              ,Tdepth_t             ,_param->_size_depth  );
    183       ALLOC1_SIGNAL_OUT (out_DEPTH_MAX                        ,"MAX"              ,Tdepth_t             ,_param->_size_depth+1);
     182      ALLOC1_SIGNAL_OUT (out_DEPTH_MIN                        ,"MIN"              ,Tdepth_t             ,_param->_size_depth);
     183      ALLOC1_SIGNAL_OUT (out_DEPTH_MAX                        ,"MAX"              ,Tdepth_t             ,_param->_size_depth);
     184      ALLOC1_SIGNAL_OUT (out_DEPTH_FULL                       ,"FULL"             ,Tcontrol_t           ,1);
    184185    }
    185186
     
    611612#endif
    612613
     614          COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+                "_VAL",
     615                                   dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_VAL");
    613616          if (_param->_have_port_depth)
    614617            {
     
    617620          COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+                "_MIN"    ,
    618621                                   dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_MIN"    );
    619             }
    620622          COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+                "_MAX"    ,
    621623                                   dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_MAX"    );
     624            }
     625          COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+                "_FULL"   ,
     626                                   dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_FULL"   );
    622627        }
    623628    }
     
    787792
    788793          if (_param->_have_port_depth)
     794            {
    789795          COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+                           "_MIN",
    790796                                   dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_MIN");
    791797          COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+                           "_MAX",
    792798                                   dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_MAX");
     799            }
     800          COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+                           "_FULL",
     801                                   dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_FULL");
     802         
    793803        }
    794804
     
    828838#endif
    829839
     840          COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+                           "_DEPTH_VAL",
     841                                   dest,"out_CONTEXT_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_DEPTH_VAL");
    830842          if (_param->_have_port_depth)
    831843          COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+                           "_DEPTH",
     
    11801192
    11811193          if (_param->_have_port_depth)
     1194            {
    11821195          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MIN",
    11831196                              dest,"out_DEPTH_"+toString(i)+"_MIN");
    11841197          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MAX",
    11851198                              dest,"out_DEPTH_"+toString(i)+"_MAX");
    1186         }
    1187      
     1199            }
     1200          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_FULL",
     1201                              dest,"out_DEPTH_"+toString(i)+"_FULL");
     1202        }
     1203     
     1204      //   in_DEPTH_PREDICTION_UNIT_VAL                         - component_prediction_unit
    11881205      //   in_DEPTH_PREDICTION_UNIT_CURRENT                     - component_prediction_unit
    11891206      //   in_DEPTH_PREDICTION_UNIT_MIN                         - component_prediction_unit
    11901207      //   in_DEPTH_PREDICTION_UNIT_MAX                         - component_prediction_unit
     1208      //   in_DEPTH_PREDICTION_UNIT_FULL                        - component_prediction_unit
    11911209      //  out_DEPTH_DECOD_UNIT_MIN                              - component_decod_unit
    11921210      //  out_DEPTH_DECOD_UNIT_MAX                              - component_decod_unit
     1211      //  out_DEPTH_DECOD_UNIT_FULL                             - component_decod_unit
    11931212      //  out_DEPTH_CONTEXT_STATE_MIN                           - component_context_state
    11941213     
    11951214      // ~~~~~[ Interface : "context"" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1215      //  out_CONTEXT_DECOD_UNIT_DEPTH_VAL                      - component_decod_unit
    11961216      //  out_CONTEXT_DECOD_UNIT_DEPTH                          - component_decod_unit
    11971217    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_deallocation.cpp

    r98 r101  
    104104        DELETE1_SIGNAL(out_DEPTH_MIN                        ,_param->_nb_context,_param->_size_depth  );
    105105        DELETE1_SIGNAL(out_DEPTH_MAX                        ,_param->_nb_context,_param->_size_depth+1);
     106        DELETE1_SIGNAL(out_DEPTH_FULL                       ,_param->_nb_context,_param->_size_depth+1);
    106107
    107108        DELETE1_SIGNAL( in_SPR_SR_IEE                       ,_param->_nb_context,1);
Note: See TracChangeset for help on using the changeset viewer.