Ignore:
Timestamp:
Jul 17, 2007, 4:47:56 PM (17 years ago)
Author:
rosiere
Message:

Modification des classes d'encapsulation des interfaces.
Stable sur tous les composants actuels

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor
Files:
3 added
37 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/src/test.cpp

    r42 r44  
    1010
    1111#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/include/test.h"
    12 #include "Include/BitManipulation.h"
    13 #include "Include/Test.h"
     12#include "Common/include/BitManipulation.h"
     13#include "Common/include/Test.h"
    1414
    1515void test (string name,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h

    r43 r44  
    1313#endif
    1414
    15 #include "Include/ToString.h"
    16 #include "Include/Debug.h"
     15#include "Common/include/ToString.h"
     16#include "Common/include/Debug.h"
    1717
    1818// Internal structure
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Parameters.h

    r15 r44  
    99 */
    1010
    11 #include "Include/Debug.h"
     11#include "Common/include/Debug.h"
    1212#include "Behavioural/include/Parameters.h"
    1313// Internal structure
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h

    r15 r44  
    1010 */
    1111
    12 #include "Include/Debug.h"
     12#include "Common/include/Debug.h"
    1313#include "Behavioural/include/Statistics.h"
    1414#include "Behavioural/include/Parameters_Statistics.h"
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Types.h

    r2 r44  
    1010 */
    1111
    12 #include "Include/Types.h"
     12#include "Common/include/Types.h"
    1313
    1414namespace morpheo                    {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl_body.cpp

    r42 r44  
    2020  void Branch_History_Table::vhdl_body (Vhdl * & vhdl)
    2121  {
    22 //     vhdl->set_body ("-- Output : always at '1'");
    23 //     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    24 //       vhdl->set_body ("out_BRANCH_COMPLETE_ACK_"+toString(i)+" <= '1';");
    25 //     for (uint32_t i=0; i<_param._nb_prediction     ; i++)
    26 //       vhdl->set_body ("out_PREDICT_ACK_"+toString(i)+"         <= '1';");
    27 //     vhdl->set_body ("");
    28 
    29     list<string> list_port_map;
    30 
    31     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    32       {
    33         vhdl->set_body_component_port_map (list_port_map," in_SHIFTER_"+toString(i)+"_DATA     ","    in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"  );
    34         vhdl->set_body_component_port_map (list_port_map," in_SHIFTER_"+toString(i)+"_CARRY_IN ","    in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION");
    35         vhdl->set_body_component_port_map (list_port_map,"out_SHIFTER_"+toString(i)+"_DATA     ","signal_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"  );
    36       }
    37 
    38     vhdl->set_body_component ("component_Shifter",_name+"_Shifter",list_port_map);
    39 
    40     list_port_map.clear();
    41     vhdl->set_body_component_port_map (list_port_map,"in_CLOCK","in_CLOCK");
    42     vhdl->set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");
    43 
    44     for (uint32_t i=0; i<_param._nb_prediction; i++)
    45       {
    46         vhdl->set_body_component_port_map (list_port_map," in_READ_"+toString(i)+"_VAL     "," In_PREDICT_"+toString(i)+"_VAL");
    47         vhdl->set_body_component_port_map (list_port_map,"out_READ_"+toString(i)+"_ACK     ","out_PREDICT_"+toString(i)+"_ACK");
    48         vhdl->set_body_component_port_map (list_port_map," in_READ_"+toString(i)+"_ADDRESS "," in_PREDICT_"+toString(i)+"_ADDRESS");
    49         vhdl->set_body_component_port_map (list_port_map,"out_READ_"+toString(i)+"_DATA    ","out_PREDICT_"+toString(i)+"_HISTORY");
    50       }
    51    
    52     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    53       {
    54         vhdl->set_body_component_port_map (list_port_map," in_WRITE_"+toString(i)+"_VAL    ","    in_BRANCH_COMPLETE_"+toString(i)+"_VAL");
    55         vhdl->set_body_component_port_map (list_port_map,"out_WRITE_"+toString(i)+"_ACK    ","   out_BRANCH_COMPLETE_"+toString(i)+"_ACK");
    56         vhdl->set_body_component_port_map (list_port_map," in_WRITE_"+toString(i)+"_ADDRESS","    in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS");
    57         vhdl->set_body_component_port_map (list_port_map," in_WRITE_"+toString(i)+"_DATA   ","signal_BRANCH_COMPLETE_"+toString(i)+"_HISTORY");
    58       }
    59     vhdl->set_body_component ("component_RegisterFile",_name+"_RegisterFile",list_port_map);
    6022  };
    6123
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl_testbench_transition.cpp

    r42 r44  
    2020  void Branch_History_Table::vhdl_testbench_transition (void)
    2121  {
    22     sc_start(0);
     22//     sc_start(0);
    2323
    2424    _interfaces->testbench();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/config0.cfg

    r43 r44  
    222       8       *2      # size_counter         
    332       64      *4      # nb_counter       
    4 1       2       +1      # nb_prediction     
    5 1       2       +1      # nb_branch_complete
     41       1       +1      # nb_prediction     
     51       1       +1      # nb_branch_complete
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/src/test.cpp

    r42 r44  
    1010
    1111#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/include/test.h"
    12 #include "Include/Test.h"
     12#include "Common/include/Test.h"
    1313
    1414void test (string name,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Parameters.h

    r15 r44  
    99 */
    1010
    11 #include "Include/Debug.h"
     11#include "Common/include/Debug.h"
    1212#include "Behavioural/include/Parameters.h"
    1313// Internal structure
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h

    r42 r44  
    1414
    1515#include <iostream>
    16 #include "Include/ToString.h"
    17 #include "Include/Debug.h"
     16#include "Common/include/ToString.h"
     17#include "Common/include/Debug.h"
    1818
    1919// Internal structure
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Statistics.h

    r15 r44  
    1010 */
    1111
    12 #include "Include/Debug.h"
     12#include "Common/include/Debug.h"
    1313#include "Behavioural/include/Statistics.h"
    1414#include "Behavioural/include/Parameters_Statistics.h"
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Types.h

    r2 r44  
    1010 */
    1111
    12 #include "Include/Types.h"
     12#include "Common/include/Types.h"
    1313
    1414namespace morpheo                    {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl_testbench_transition.cpp

    r42 r44  
    2222    log_printf(FUNC,Pattern_History_Table,"vhdl_testbench_transition","Begin");
    2323
    24     sc_start(0);
     24//     sc_start(0);
    2525
    2626    _interfaces->testbench();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/config0.cfg

    r43 r44  
    11Two_Level_Branch_Predictor
    2 1       1       +1      # have_bht           
    3 8       8       +1      # bht_size_shifter   
     20       1       +1      # have_bht           
     34       4       +1      # bht_size_shifter   
    4432      32      *2      # bht_nb_shifter     
    551       1       +1      # have_pht           
     
    882       2       +1      # pht_size_address_share
    9916      16      +1      # size_address     
    10 2       2       +1      # nb_prediction     
    11 2       2       +1      # nb_branch_complete
     101       2       +1      # nb_prediction     
     111       2       +1      # nb_branch_complete
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/src/test.cpp

    r43 r44  
    1010
    1111#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/include/test.h"
    12 #include "Include/Test.h"
    13 #include "Include/BitManipulation.h"
     12#include "Common/include/Test.h"
     13#include "Common/include/BitManipulation.h"
    1414void test (string name,
    1515           morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Parameters param)
     
    132132  sc_start(0);
    133133
     134  NRESET->write(0);
     135  sc_start(5);
     136  NRESET->write(1);
     137
    134138  for (uint32_t i=0; i<param._nb_prediction; i++)
    135139    PREDICT_VAL                  [i]->write(0);
     
    156160      uint32_t nb_reg_by_group = (1<<(param._pht_size_address-size_address_shift));
    157161
     162//       cout << "pht_size_address           : " << param._pht_size_address << endl;
     163//       cout << "size_address_shift         : " << size_address_shift << endl;
     164//       cout << "nb_group                   : " << nb_group           << endl;
     165//       cout << "nb_reg_by_group            : " << nb_reg_by_group    << endl;
     166
    158167      cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Init pht" << endl;
    159168     
     
    168177          for (uint32_t j=0; j<nb_reg_by_group; j++)
    169178            {
     179              cout << "j : " << j << " on " << nb_reg_by_group << endl;
    170180              BRANCH_COMPLETE_ADDRESS [num_port_branch_complete]->write(j);
    171              
     181
    172182              sc_start(1);
    173183
    174184              // wait ackwolegde
    175185              while (BRANCH_COMPLETE_ACK [num_port_branch_complete] -> read() == 0)
    176                 sc_start(1);
     186                {
     187                  sc_start(1);
     188                }
    177189            }
    178190        }
     
    195207      // wait ackwolegde
    196208      while (BRANCH_COMPLETE_ACK [num_port_branch_complete] -> read() == 0)
    197         sc_start(1);
     209        {
     210          sc_start(1);
     211        }
    198212    }
    199213
     
    225239      // wait ackwolegde
    226240      while (PREDICT_ACK [num_port_predict] -> read() == 0)
    227         sc_start(1);
     241        {
     242          sc_start(1);
     243        }
    228244      PREDICT_ACK                  [num_port_predict        ]->write(0);
    229245
     
    231247
    232248      // Test
     249      cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Predict (Test)   : " << endl;
    233250      if (param._have_bht)
    234       TEST(Tbht_history_t,bht_history             ,PREDICT_BHT_HISTORY[num_port_predict]->read());
     251        {
     252          cout << "\tbht_history " << PREDICT_BHT_HISTORY[num_port_predict]->read() << endl;
     253          TEST(Tbht_history_t,bht_history             ,PREDICT_BHT_HISTORY[num_port_predict]->read());
     254        }
    235255      if (param._have_pht)
    236       TEST(Tpht_history_t,pht_history[bht_history],PREDICT_PHT_HISTORY[num_port_predict]->read());
     256        {
     257          cout << "\tpht_history " << PREDICT_PHT_HISTORY[num_port_predict]->read() << endl;
     258          TEST(Tpht_history_t,pht_history[bht_history],PREDICT_PHT_HISTORY[num_port_predict]->read());
     259        }
    237260
    238261      // update
     
    267290      // wait ackwolegde
    268291      while (BRANCH_COMPLETE_ACK [num_port_branch_complete] -> read() == 0)
    269         sc_start(1);
    270 
     292        {
     293          sc_start(1);
     294        }
    271295      BRANCH_COMPLETE_VAL          [num_port_branch_complete]->write(0);
    272296    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/config0.cfg

    r43 r44  
    11Two_Level_Branch_Predictor_Glue
    2 1       1       +1      # have_bht           
     20       1       +1      # have_bht           
    3311      11      +1      # bht_size_history   
    444       4       +1      # bht_size_address   
    5 0       1       +1      # have_pht           
     51       1       +1      # have_pht           
    6613      13      +1      # pht_size_address   
    7 0       2       +1      # pht_size_address_share
     72       2       +1      # pht_size_address_share
    8816      16      +1      # size_address       
    9 1       2       +1      # nb_prediction     
    10 1       2       +1      # nb_branch_complete
     92       2       +1      # nb_prediction     
     102       2       +1      # nb_branch_complete
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/src/test.cpp

    r42 r44  
    1010
    1111#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/include/test.h"
    12 #include "Include/BitManipulation.h"
    13 #include "Include/Test.h"
     12#include "Common/include/BitManipulation.h"
     13#include "Common/include/Test.h"
    1414
    1515void test (string name,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h

    r2 r44  
    99 */
    1010
    11 #include "Include/Debug.h"
     11#include "Common/include/Debug.h"
    1212#include "Behavioural/include/Parameters.h"
    1313#include <math.h>
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Statistics.h

    r2 r44  
    1010 */
    1111
    12 #include "Include/Debug.h"
     12#include "Common/include/Debug.h"
    1313#include "Behavioural/include/Statistics.h"
    1414#include "Behavioural/include/Parameters_Statistics.h"
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h

    r43 r44  
    1414
    1515#include <iostream>
    16 #include "Include/ToString.h"
    17 #include "Include/Debug.h"
     16#include "Common/include/ToString.h"
     17#include "Common/include/Debug.h"
    1818
    1919#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h"
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Types.h

    r2 r44  
    1010 */
    1111
    12 #include "Include/Types.h"
     12#include "Common/include/Types.h"
    1313
    1414namespace morpheo                    {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Parameters_msg_error.cpp

    r2 r44  
    2626    string msg = "";
    2727   
    28     if (_have_pht and (_pht_size_address_share >= _pht_size_address))
     28    if ((_have_bht and _have_pht) and (_pht_size_address_share >= _pht_size_address))
    2929      {
    3030        msg += "  - You can't have higher pht_size_address_share >= pht_size_address\n";
    3131        msg += "    * pht_size_address                : " + toString(_pht_size_address      ) + "\n";
    3232        msg += "    * pht_size_address_share          : " + toString(_pht_size_address_share) + "\n";
     33      }
     34    if ((_have_bht and _have_pht) and (_bht_size_history > _pht_size_address))
     35      {
     36        msg += "  - You can't have higher bht_size_history > pht_size_address\n";
     37        msg += "    * bht_size_history                : " + toString(_bht_size_history      ) + "\n";
     38        msg += "    * pht_size_address                : " + toString(_pht_size_address      ) + "\n";
    3339      }
    3440
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue.cpp

    r42 r44  
    3434    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"Two_Level_Branch_Predictor_Glue","Begin");
    3535
    36 #ifdef SYSTEMC
    3736    allocation ();
    38 #endif
    3937
    4038#ifdef STATISTICS
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_ack.cpp

    r2 r44  
    88
    99#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
    10 #include "Include/BitManipulation.h"
     10#include "Common/include/BitManipulation.h"
    1111
    1212namespace morpheo {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_bht_address.cpp

    r2 r44  
    88
    99#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
    10 #include "Include/BitManipulation.h"
     10#include "Common/include/BitManipulation.h"
    1111
    1212namespace morpheo {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_pht_address.cpp

    r3 r44  
    88
    99#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
    10 #include "Include/BitManipulation.h"
     10#include "Common/include/BitManipulation.h"
    1111
    1212namespace morpheo {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_ack.cpp

    r2 r44  
    88
    99#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
    10 #include "Include/BitManipulation.h"
     10#include "Common/include/BitManipulation.h"
    1111
    1212namespace morpheo {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_bht_address.cpp

    r3 r44  
    88
    99#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
    10 #include "Include/BitManipulation.h"
     10#include "Common/include/BitManipulation.h"
    1111
    1212namespace morpheo {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_pht_address.cpp

    r2 r44  
    88
    99#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
    10 #include "Include/BitManipulation.h"
     10#include "Common/include/BitManipulation.h"
    1111
    1212namespace morpheo {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_testbench_transition.cpp

    r42 r44  
    2222    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_testbench_transition","Begin");
    2323
    24     sc_start(0);
     24//     sc_start(0);
    2525
    2626    _interfaces->testbench();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h

    r2 r44  
    99 */
    1010
    11 #include "Include/Debug.h"
     11#include "Common/include/Debug.h"
    1212#include "Behavioural/include/Parameters.h"
    1313// Internal structure
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Statistics.h

    r2 r44  
    1010 */
    1111
    12 #include "Include/Debug.h"
     12#include "Common/include/Debug.h"
    1313// Internal structure
    1414#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h"
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h

    r43 r44  
    1414
    1515#include <iostream>
    16 #include "Include/ToString.h"
    17 #include "Include/Debug.h"
     16#include "Common/include/ToString.h"
     17#include "Common/include/Debug.h"
    1818
    1919// Internal structure
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Types.h

    r2 r44  
    1010 */
    1111
    12 #include "Include/Types.h"
     12#include "Common/include/Types.h"
    1313
    1414namespace morpheo {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_allocation.cpp

    r43 r44  
    1818  void Two_Level_Branch_Predictor::allocation (void)
    1919  {
    20     string rename;
    21 
    2220    log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","Begin");
    2321
     
    176174    if (_param._have_bht)
    177175      {
    178         cout << "GEU 1" << endl;
    179176#ifdef POSITION
    180177        _component->interface_map (_name+"_Branch_History_Table","",
     
    214211    if (_param._have_pht)
    215212      {
    216         cout << "GEU 2" << endl;
    217213#ifdef POSITION
    218214        _component->interface_map (_name+"_Pattern_History_Table","",
     
    250246
    251247    // =====[ component_Two_Level_Branch_Predictor_Glue - Instanciation ]=
    252     cout << "GEU 3" << endl;
    253248#ifdef POSITION
    254249        _component->interface_map (_name+"_Two_Level_Branch_Predictor_Glue","",
     
    258253        _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_NRESET", _name,"in_NRESET");
    259254
    260         cout << "GEU 3.1" << endl;
    261255        for (uint32_t i=0; i<_param._nb_prediction; i++)
    262256          {
    263             cout << "GEU 3.1.1" << endl;
    264257        if (_param._have_bht)
    265258          {
     
    267260        _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_BHT_ADDRESS", _name+"_Branch_History_Table" ,  "in_PREDICT_"+toString(i)+"_ADDRESS");
    268261          }
    269         cout << "GEU 3.1.2" << endl;
    270262        if (_param._have_pht)
    271263          {
     
    273265        _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_PHT_ADDRESS", _name+"_Pattern_History_Table",  "in_PREDICT_"+toString(i)+"_ADDRESS");
    274266          }
    275         cout << "GEU 3.1.3" << endl;
    276267        if (_param._have_bht and _param._have_pht)
    277         _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name                         ,"out_PREDICT_"+toString(i)+"_BHT_HISTORY");
    278         cout << "GEU 3.1.4.1" << endl;
     268        _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name+"_Branch_History_Table" ,"out_PREDICT_"+toString(i)+"_HISTORY");
    279269        _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue","out_PREDICT_"+toString(i)+"_ACK"         , _name                         ,"out_PREDICT_"+toString(i)+"_ACK");
    280270        _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_ADDRESS"     , _name                         , "in_PREDICT_"+toString(i)+"_ADDRESS");
    281271          }
    282272   
    283         cout << "GEU 3.2" << endl;
    284273    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    285274      {
     
    299288        _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"     , _name                         , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS");
    300289      }
    301     cout << "GEU 4" << endl; 
    302290#ifdef POSITION
    303291    _component->generate_file();
     
    306294    log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","End");
    307295  };
    308 
    309 
    310 
    311 
    312 
    313 
    314 
    315 //   void Two_Level_Branch_Predictor::allocation (void)
    316 //   {
    317 //     string rename;
    318 
    319 //     log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","Begin");
    320 
    321 //     _component   = new Component ();
    322 
    323 //     Entity * entity = _component->set_entity (_name                 
    324 // #ifdef POSITION
    325 //                                           ,"Two_Level_Branch_Predictor"
    326 //                                           ,MIXTE
    327 // #endif
    328 //                                            );
    329    
    330 //     _interfaces = entity->set_interfaces();
    331 
    332 //     // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    333 //     {
    334 //       Interface * interface = _interfaces->set_interface(""
    335 // #ifdef POSITION
    336 //                                                       , IN 
    337 //                                                       , SOUTH
    338 //                                                       , "Generalist interface"
    339 // #endif
    340 //                                                       );
    341      
    342 //       in_CLOCK              = interface->set_signal_clk              ("clock" ,1);
    343 //       in_NRESET             = interface->set_signal_in  <Tcontrol_t> ("nreset",1,RESET_VHDL_YES);
    344 //     }
    345    
    346 //     // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    347 
    348 //      in_PREDICT_VAL                 = new SC_IN (Tcontrol_t)     * [_param._nb_prediction     ];
    349 //     out_PREDICT_ACK                 = new SC_OUT(Tcontrol_t)     * [_param._nb_prediction     ];
    350 //      in_PREDICT_ADDRESS             = new SC_IN (Taddress_t)     * [_param._nb_prediction     ];
    351 //     if (_param._have_bht)
    352 //     out_PREDICT_BHT_HISTORY         = new SC_OUT(Tbht_history_t) * [_param._nb_prediction     ];
    353 //     if (_param._have_pht)
    354 //     out_PREDICT_PHT_HISTORY         = new SC_OUT(Tpht_history_t) * [_param._nb_prediction     ];
    355 // //     if (_param._have_bht)
    356 // //       {
    357 // //     signal_PREDICT_BHT_ACK          = new SC_SIGNAL(Tcontrol_t)     * [_param._nb_prediction];
    358 // //     signal_PREDICT_BHT_ADDRESS      = new SC_SIGNAL(Taddress_t)     * [_param._nb_prediction];
    359 // //       }
    360 // //     if (_param._have_pht)
    361 // //       {
    362 // //     signal_PREDICT_PHT_ACK          = new SC_SIGNAL(Tcontrol_t)     * [_param._nb_prediction];
    363 // //     signal_PREDICT_PHT_ADDRESS      = new SC_SIGNAL(Taddress_t)     * [_param._nb_prediction];
    364 // //       }
    365 
    366 //     for (uint32_t i=0; i<_param._nb_prediction; i++)
    367 //       {
    368 //      rename = "in_PREDICT_VAL_"         +toString(i);
    369 //       in_PREDICT_VAL                 [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
    370 
    371 //      rename = "out_PREDICT_ACK_"        +toString(i);
    372 //      out_PREDICT_ACK                 [i] = new SC_OUT(Tcontrol_t)     (rename.c_str());
    373 
    374 //      rename = "in_PREDICT_ADDRESS_"     +toString(i);
    375 //       in_PREDICT_ADDRESS             [i] = new SC_IN (Taddress_t)     (rename.c_str());
    376 
    377 //      if (_param._have_bht)
    378 //        {
    379 //      rename = "out_PREDICT_BHT_HISTORY_"+toString(i);
    380 //      out_PREDICT_BHT_HISTORY         [i] = new SC_OUT(Tbht_history_t) (rename.c_str());
    381 //        }
    382 
    383 //      if (_param._have_pht)
    384 //        {
    385 //      rename = "out_PREDICT_PHT_HISTORY_"+toString(i);
    386 //      out_PREDICT_PHT_HISTORY         [i] = new SC_OUT(Tpht_history_t) (rename.c_str());
    387 //        }
    388 
    389 // //   if (_param._have_bht)
    390 // //     {
    391 // //   rename = "signal_PREDICT_BHT_ACK_"    +toString(i);
    392 // //   signal_PREDICT_BHT_ACK          [i] = new SC_SIGNAL(Tcontrol_t)     (rename.c_str());
    393 
    394 // //   rename = "signal_PREDICT_BHT_ADDRESS_"+toString(i);
    395 // //   signal_PREDICT_BHT_ADDRESS      [i] = new SC_SIGNAL(Taddress_t)     (rename.c_str());
    396 // //     }
    397 
    398 // //   if (_param._have_pht)
    399 // //     {
    400 // //   rename = "signal_PREDICT_PHT_ACK_"    +toString(i);
    401 // //   signal_PREDICT_PHT_ACK          [i] = new SC_SIGNAL(Tcontrol_t)     (rename.c_str());
    402 
    403 // //   rename = "signal_PREDICT_PHT_ADDRESS_"+toString(i);
    404 // //   signal_PREDICT_PHT_ADDRESS      [i] = new SC_SIGNAL(Taddress_t)     (rename.c_str());
    405 // //     }
    406 //       }
    407 
    408 //      in_BRANCH_COMPLETE_VAL         = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete];
    409 //     out_BRANCH_COMPLETE_ACK         = new SC_OUT(Tcontrol_t)     * [_param._nb_branch_complete];
    410 //      in_BRANCH_COMPLETE_ADDRESS     = new SC_IN (Taddress_t)     * [_param._nb_branch_complete];
    411 //     if (_param._have_bht)
    412 //      in_BRANCH_COMPLETE_BHT_HISTORY = new SC_IN (Tbht_history_t) * [_param._nb_branch_complete];
    413 //     if (_param._have_pht)
    414 //      in_BRANCH_COMPLETE_PHT_HISTORY = new SC_IN (Tpht_history_t) * [_param._nb_branch_complete];
    415 //      in_BRANCH_COMPLETE_DIRECTION   = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete];
    416 // //     if (_param._have_bht)
    417 // //       {
    418 // //     signal_BRANCH_COMPLETE_BHT_ACK     = new SC_SIGNAL(Tcontrol_t) * [_param._nb_branch_complete];
    419 // //     signal_BRANCH_COMPLETE_BHT_ADDRESS = new SC_SIGNAL(Taddress_t) * [_param._nb_branch_complete];
    420 // //       }
    421 // //     if (_param._have_pht)
    422 // //       {
    423 // //     signal_BRANCH_COMPLETE_PHT_ACK     = new SC_SIGNAL(Tcontrol_t) * [_param._nb_branch_complete];
    424 // //     signal_BRANCH_COMPLETE_PHT_ADDRESS = new SC_SIGNAL(Taddress_t) * [_param._nb_branch_complete];
    425 // //       }
    426 
    427 //     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    428 //       {
    429 //      rename = "in_BRANCH_COMPLETE_VAL_"         +toString(i);
    430 //       in_BRANCH_COMPLETE_VAL         [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
    431 
    432 //      rename = "out_BRANCH_COMPLETE_ACK_"        +toString(i);
    433 //      out_BRANCH_COMPLETE_ACK         [i] = new SC_OUT(Tcontrol_t)     (rename.c_str());
    434 
    435 //      rename = "in_BRANCH_COMPLETE_ADDRESS_"     +toString(i);
    436 //       in_BRANCH_COMPLETE_ADDRESS     [i] = new SC_IN (Taddress_t)     (rename.c_str());
    437 
    438 //      if (_param._have_bht)
    439 //        {
    440 //      rename = "in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i);
    441 //       in_BRANCH_COMPLETE_BHT_HISTORY [i] = new SC_IN (Tbht_history_t) (rename.c_str());
    442 //        }
    443 //      if (_param._have_pht)
    444 //        {
    445 //      rename = "in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i);
    446 //       in_BRANCH_COMPLETE_PHT_HISTORY [i] = new SC_IN (Tpht_history_t) (rename.c_str());
    447 //        }
    448 //      rename = "in_BRANCH_COMPLETE_DIRECTION_"  +toString(i);
    449 //       in_BRANCH_COMPLETE_DIRECTION   [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
    450 // //   if (_param._have_bht)
    451 // //     {
    452 // //   rename = "signal_BRANCH_COMPLETE_BHT_ACK_"    +toString(i);
    453 // //   signal_BRANCH_COMPLETE_BHT_ACK     [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());
    454 
    455 // //   rename = "signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i);
    456 // //   signal_BRANCH_COMPLETE_BHT_ADDRESS [i] = new SC_SIGNAL(Taddress_t) (rename.c_str());
    457 // //     }
    458 // //   if (_param._have_pht)
    459 // //     {
    460 // //   rename = "signal_BRANCH_COMPLETE_PHT_ACK_"    +toString(i);
    461 // //   signal_BRANCH_COMPLETE_PHT_ACK     [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());
    462 
    463 // //   rename = "signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i);
    464 // //   signal_BRANCH_COMPLETE_PHT_ADDRESS [i] = new SC_SIGNAL(Taddress_t) (rename.c_str());
    465 // //     }
    466 //       }
    467 
    468 //     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    469 //     string name_component;
    470 
    471 //     // =====[ component_Branch_History_Table ]============================   
    472 //     if (_param._have_bht)
    473 //       {
    474 //      name_component = _name+"_Branch_History_Table";
    475 
    476 //      log_printf(INFO,Two_Level_Branch_Predictor,"allocation","Allocation : %s",name_component.c_str());
    477        
    478 //      component_Branch_History_Table = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::branch_history_table ::Branch_History_Table (name_component.c_str()               ,
    479 // #ifdef STATISTICS
    480 //                                                                                                                                                                                     _param_statistics                    ,
    481 // #endif
    482 //                                                                                                                                                                                     *(_param._param_branch_history_table));
    483        
    484 //      // Instantiation
    485 //      (*(component_Branch_History_Table->in_CLOCK ))        (*(in_CLOCK ));
    486 //      (*(component_Branch_History_Table->in_NRESET))        (*(in_NRESET));
    487 
    488 //      for (uint32_t i=0; i<_param._nb_prediction; i++)
    489 //        {
    490 //          (*(component_Branch_History_Table-> in_PREDICT_VAL             [i]))    (*(    in_PREDICT_VAL          [i]));
    491 //          (*(component_Branch_History_Table->out_PREDICT_ACK             [i]))    (*(signal_PREDICT_BHT_ACK      [i]));
    492 //          (*(component_Branch_History_Table-> in_PREDICT_ADDRESS         [i]))    (*(signal_PREDICT_BHT_ADDRESS  [i]));
    493 //          (*(component_Branch_History_Table->out_PREDICT_HISTORY         [i]))    (*(   out_PREDICT_BHT_HISTORY  [i]));
    494 //        }
    495        
    496 //      for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    497 //        {
    498 //          (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_VAL       [i]))    (*(    in_BRANCH_COMPLETE_VAL         [i]));
    499 //          (*(component_Branch_History_Table->out_BRANCH_COMPLETE_ACK       [i]))    (*(signal_BRANCH_COMPLETE_BHT_ACK     [i]));
    500 //          (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_ADDRESS   [i]))    (*(signal_BRANCH_COMPLETE_BHT_ADDRESS [i]));
    501 //          (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_HISTORY   [i]))    (*(    in_BRANCH_COMPLETE_BHT_HISTORY [i]));
    502 //          (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_DIRECTION [i]))    (*(    in_BRANCH_COMPLETE_DIRECTION   [i]));
    503 //        }
    504 //       }
    505 
    506 //     // =====[ component_Pattern_History_Table ]===========================   
    507 //     if (_param._have_pht)
    508 //       {
    509 //      name_component = _name+"_Pattern_History_Table";
    510        
    511 //      log_printf(INFO,Two_Level_Branch_Predictor,"allocation","Allocation : %s",name_component.c_str());
    512        
    513 //      component_Pattern_History_Table = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::pattern_history_table::Pattern_History_Table (name_component.c_str()               ,
    514 // #ifdef STATISTICS
    515 //                                                                                                                                                                                       _param_statistics                    ,
    516 // #endif
    517 //                                                                                                                                                                                       *(_param._param_pattern_history_table));
    518        
    519 //      // Instantiation
    520 //      (*(component_Pattern_History_Table->in_CLOCK))        (*(in_CLOCK));
    521 //      (*(component_Pattern_History_Table->in_NRESET))       (*(in_NRESET));
    522        
    523 //      for (uint32_t i=0; i<_param._nb_prediction; i++)
    524 //        {
    525 //          (*(component_Pattern_History_Table-> in_PREDICT_VAL             [i]))    (*(    in_PREDICT_VAL          [i]));
    526 //          (*(component_Pattern_History_Table->out_PREDICT_ACK             [i]))    (*(signal_PREDICT_PHT_ACK      [i]));
    527 //          (*(component_Pattern_History_Table-> in_PREDICT_ADDRESS         [i]))    (*(signal_PREDICT_PHT_ADDRESS  [i]));
    528 //          (*(component_Pattern_History_Table->out_PREDICT_HISTORY         [i]))    (*(   out_PREDICT_PHT_HISTORY  [i]));
    529 //        }
    530        
    531 //      for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    532 //        {
    533 //          (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_VAL       [i]))    (*(    in_BRANCH_COMPLETE_VAL         [i]));
    534 //          (*(component_Pattern_History_Table->out_BRANCH_COMPLETE_ACK       [i]))    (*(signal_BRANCH_COMPLETE_PHT_ACK     [i]));
    535 //          (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_ADDRESS   [i]))    (*(signal_BRANCH_COMPLETE_PHT_ADDRESS [i]));
    536 //          (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_HISTORY   [i]))    (*(    in_BRANCH_COMPLETE_PHT_HISTORY [i]));
    537 //          (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_DIRECTION [i]))    (*(    in_BRANCH_COMPLETE_DIRECTION   [i]));
    538 //        }
    539 //       }
    540 
    541 //     // =====[ component_Two_Level_Branch_Predictor_Glue ]===========================   
    542 //     name_component = _name+"_Two_Level_Branch_Predictor_Glue";
    543    
    544 //     log_printf(INFO,Two_Level_Branch_Predictor,"allocation","Allocation : %s",name_component.c_str());
    545    
    546 //     component_Two_Level_Branch_Predictor_Glue = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Two_Level_Branch_Predictor_Glue (name_component.c_str()               ,
    547 // #ifdef STATISTICS
    548 //                                                                                                                                                                                                                 _param_statistics                    ,
    549 // #endif
    550 //                                                                                                                                                                                                                 *(_param._param_two_level_branch_predictor_glue));
    551    
    552 //     // Instantiation
    553 // #if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    554 //     (*(component_Two_Level_Branch_Predictor_Glue->in_CLOCK))        (*(in_CLOCK));
    555 // #endif       
    556 //     for (uint32_t i=0; i<_param._nb_prediction; i++)
    557 //       {
    558 //      if (_param._have_bht)
    559 //        {
    560 //          (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_BHT_ACK             [i])) (*(signal_PREDICT_BHT_ACK              [i]));
    561 //          (*(component_Two_Level_Branch_Predictor_Glue->out_PREDICT_BHT_ADDRESS         [i])) (*(signal_PREDICT_BHT_ADDRESS          [i]));
    562 //        }                                                                                                                                                                       
    563 //      if (_param._have_pht)                                                                                                                     
    564 //        {                                                                                                                                                                       
    565 //          (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_PHT_ACK             [i])) (*(signal_PREDICT_PHT_ACK              [i]));
    566 //          (*(component_Two_Level_Branch_Predictor_Glue->out_PREDICT_PHT_ADDRESS         [i])) (*(signal_PREDICT_PHT_ADDRESS          [i]));
    567 //        }                                                                                                                                                                       
    568 //      if (_param._have_bht and _param._have_pht)                                                                                       
    569 //        {                                                                                                                                                                       
    570 //          (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_BHT_HISTORY         [i])) (*(   out_PREDICT_BHT_HISTORY          [i]));
    571 //        }                                                                                                                                                                       
    572 //      (*(component_Two_Level_Branch_Predictor_Glue->out_PREDICT_ACK                 [i])) (*(   out_PREDICT_ACK                  [i]));
    573 //      (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_ADDRESS             [i])) (*(    in_PREDICT_ADDRESS              [i]));
    574 //       }
    575    
    576 //     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    577 //       {
    578 //      if (_param._have_bht)
    579 //        {
    580 //          (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_BHT_ACK     [i])) (*(signal_BRANCH_COMPLETE_BHT_ACK      [i]));
    581 //          (*(component_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_BHT_ADDRESS [i])) (*(signal_BRANCH_COMPLETE_BHT_ADDRESS  [i]));
    582 //        }                                                                                                                                                       
    583 //      if (_param._have_pht)                                                                                                     
    584 //        {                                                                                                                                                       
    585 //          (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_PHT_ACK     [i])) (*(signal_BRANCH_COMPLETE_PHT_ACK      [i]));
    586 //          (*(component_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_PHT_ADDRESS [i])) (*(signal_BRANCH_COMPLETE_PHT_ADDRESS  [i]));
    587 //        }                                                                                                                                                       
    588 //      if (_param._have_bht and _param._have_pht)                                                                               
    589 //        {                                                                                                                                                       
    590 //          (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_BHT_HISTORY [i])) (*(    in_BRANCH_COMPLETE_BHT_HISTORY  [i]));
    591 //        }                                                                                                                                                       
    592 //      (*(component_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_ACK         [i])) (*(   out_BRANCH_COMPLETE_ACK          [i]));
    593 //      (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_ADDRESS     [i])) (*(    in_BRANCH_COMPLETE_ADDRESS      [i]));
    594 //       }
    595  
    596 //     log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","End");
    597 //   };
    598296 
    599297}; // end namespace two_level_branch_predictor
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_body.cpp

    r43 r44  
    2121    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_body","Begin");
    2222
    23 //     list<string> list_port_map;
    24 
    25 //     if (_param._have_bht)
    26 //       {
    27 //      list_port_map.clear();
    28 
    29 //      vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK ");
    30 //      vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");
    31 
    32 //      for (uint32_t i=0; i<_param._nb_prediction; i++)
    33 //        {
    34 //          vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+"              ","    in_PREDICT_VAL_"+toString(i));
    35 //          vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+"              ","signal_PREDICT_BHT_ACK_"+toString(i));
    36 //          vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+"          ","signal_PREDICT_BHT_ADDRESS_"+toString(i));
    37 //          vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_HISTORY_"+toString(i)+"          ","signal_PREDICT_BHT_HISTORY_"+toString(i));
    38 //        }
    39        
    40 //      for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    41 //        {
    42 //          vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+"      ","    in_BRANCH_COMPLETE_VAL_"+toString(i));
    43 //          vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+"      ","signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i));
    44 //          vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+"  ","signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i));
    45 //          vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_HISTORY_"+toString(i)+"  ","    in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i));
    46 //          vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"","    in_BRANCH_COMPLETE_DIRECTION_"+toString(i));
    47 //        }
    48        
    49 //      vhdl.set_body_component ("component_Branch_History_Table",_name+"_Branch_History_Table",list_port_map);
    50 //       }
    51 
    52 //     if (_param._have_pht)
    53 //       {
    54 //      list_port_map.clear();
    55 
    56 //      vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK ");
    57 //      vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");
    58 
    59 //      for (uint32_t i=0; i<_param._nb_prediction; i++)
    60 //        {
    61 //          vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+"              ","    in_PREDICT_VAL_"+toString(i));
    62 //          vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+"              ","signal_PREDICT_PHT_ACK_"+toString(i));
    63 //          vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+"          ","signal_PREDICT_PHT_ADDRESS_"+toString(i));
    64 //          vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_HISTORY_"+toString(i)+"          ","   out_PREDICT_PHT_HISTORY_"+toString(i));
    65 //        }
    66        
    67 //      for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    68 //        {
    69 //          vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+"      ","    in_BRANCH_COMPLETE_VAL_"+toString(i));
    70 //          vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+"      ","signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i));
    71 //          vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+"  ","signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i));
    72 //          vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_HISTORY_"+toString(i)+"  ","    in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i));
    73 //          vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"","    in_BRANCH_COMPLETE_DIRECTION_"+toString(i));
    74 //        }
    75        
    76 //      vhdl.set_body_component ("component_Pattern_History_Table",_name+"_Pattern_History_Table",list_port_map);
    77 //       }
    78 
    79 //     list_port_map.clear();
    80    
    81 //     for (uint32_t i=0; i<_param._nb_prediction; i++)
    82 //       {
    83 //      if (_param._have_bht)
    84 //        {
    85 //      vhdl.set_body_component_port_map (list_port_map," in_PREDICT_BHT_ACK_"+toString(i)+"            ","signal_PREDICT_BHT_ACK_"+toString(i));
    86 //      vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_BHT_ADDRESS_"+toString(i)+"        ","signal_PREDICT_BHT_ADDRESS_"+toString(i));
    87 //        }                                                                                                                                                                       
    88 //      if (_param._have_pht)                                                                                                                     
    89 //        {                                                                                                                                                                       
    90 //      vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PHT_ACK_"+toString(i)+"            ","signal_PREDICT_PHT_ACK_"+toString(i));
    91 //      vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_PHT_ADDRESS_"+toString(i)+"        ","signal_PREDICT_PHT_ADDRESS_"+toString(i));
    92 //        }                                                                                                                                                                       
    93 //      if (_param._have_bht and _param._have_pht)                                                                                       
    94 //        {                                                                                                                                                                       
    95 //      vhdl.set_body_component_port_map (list_port_map," in_PREDICT_BHT_HISTORY_"+toString(i)+"        ","signal_PREDICT_BHT_HISTORY_"+toString(i));
    96 //        }                                                                                                                                                                       
    97 //      vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+"                ","   out_PREDICT_ACK_"+toString(i));
    98 //      vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+"            ","    in_PREDICT_ADDRESS_"+toString(i));
    99 //       }
    100    
    101 //     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    102 //       {
    103 //      if (_param._have_bht)
    104 //        {
    105 //      vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_ACK_"+toString(i)+"    ","signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i));
    106 //      vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i)+"","signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i));
    107 //        }                                                                                                                                                       
    108 //      if (_param._have_pht)
    109 //        {
    110 //      vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PHT_ACK_"+toString(i)+"    ","signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i));
    111 //      vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+"","signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i));
    112 //        }                                                                                                                                                       
    113 //      if (_param._have_bht and _param._have_pht)
    114 //        {
    115 //         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+"","    in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i));
    116 //        }                                                                                                                                                       
    117 //      vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+"        ","   out_BRANCH_COMPLETE_ACK_"+toString(i));
    118 //      vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+"    ","    in_BRANCH_COMPLETE_ADDRESS_"+toString(i));
    119 //       }
    120 
    121 //     vhdl.set_body_component ("component_Two_Level_Branch_Predictor_Glue",_name+"_Two_Level_Branch_Predictor_Glue",list_port_map);
    122 
    123 //     if (_param._have_bht)
    124 //       for (uint32_t i=0; i<_param._nb_prediction; i++)
    125 //      vhdl.set_body("out_PREDICT_BHT_HISTORY_"+toString(i)+" <= signal_PREDICT_BHT_HISTORY_"+toString(i)+";");
    12623   
    12724    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_body","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_declaration.cpp

    r42 r44  
    2121    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_declaration","Begin");
    2222
    23     for (uint32_t i=0; i<_param._nb_prediction; i++)
    24       {
    25         if (_param._have_bht)
    26           {
    27         vhdl->set_signal  ("signal_PREDICT_BHT_ACK_"+toString(i), 1);
    28         vhdl->set_signal  ("signal_PREDICT_BHT_ADDRESS_"+toString(i), _param._bht_size_address);
    29         vhdl->set_signal  ("signal_PREDICT_BHT_HISTORY_"+toString(i), _param._bht_size_shifter);
    30           }
    31         if (_param._have_pht)
    32           {
    33         vhdl->set_signal  ("signal_PREDICT_PHT_ACK_"+toString(i), 1);
    34         vhdl->set_signal  ("signal_PREDICT_PHT_ADDRESS_"+toString(i), _param._pht_size_address);
    35           }
    36       }
    37 
    38     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    39       {
    40         if (_param._have_bht)
    41           {
    42         vhdl->set_signal  ("signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i), 1);
    43         vhdl->set_signal  ("signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i), _param._bht_size_address);
    44           }
    45         if (_param._have_pht)
    46           {
    47         vhdl->set_signal  ("signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i), 1);
    48         vhdl->set_signal  ("signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i), _param._pht_size_address);
    49           }
    50       }
    5123    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_declaration","End");
    5224  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_testbench_transition.cpp

    r42 r44  
    2121    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_testbench_transition","Begin");
    2222
    23     sc_start(0);
     23//     sc_start(0);
    2424
    2525    _interfaces->testbench();
Note: See TracChangeset for help on using the changeset viewer.