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/src
Files:
3 deleted
7 edited

Legend:

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

    r5 r44  
    3232    log_printf(FUNC,Meta_Predictor,"Meta_Predictor","Begin");
    3333
     34#ifdef SYSTEMC
     35    allocation ();
     36#endif
     37
    3438#ifdef STATISTICS
    3539    // Allocation of statistics
     
    3741                            param_statistics          ,
    3842                            param);
    39 #endif
    40 
    41 #ifdef VHDL_TESTBENCH
    42     // Creation of a testbench
    43     //  -> port
    44     //  -> clock's signals
    45     _vhdl_testbench = new Vhdl_Testbench (_name);
    46     vhdl_testbench_port           ();
    47     _vhdl_testbench->set_clock    ("in_CLOCK",true);
    4843#endif
    4944
     
    5449
    5550#ifdef SYSTEMC
    56     allocation ();
    57 
    5851#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    5952    SC_METHOD (transition);
     
    7366  {
    7467    log_printf(FUNC,Meta_Predictor,"~Meta_Predictor","Begin");
    75 
    76 #ifdef VHDL_TESTBENCH
    77     // generate the test bench
    78     _vhdl_testbench->generate_file();
    79     delete _vhdl_testbench;
    80 #endif
    8168
    8269#ifdef STATISTICS
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/src/Meta_Predictor_allocation.cpp

    r15 r44  
    1818  void Meta_Predictor::allocation (void)
    1919  {
    20     string rename;
    21 
    2220    log_printf(FUNC,Meta_Predictor,"allocation","Begin");
    2321
    24     in_CLOCK  = new SC_CLOCK           ("in_CLOCK");
    25     in_NRESET = new SC_IN (Tcontrol_t) ("in_NRESET");
     22    _component   = new Component ();
     23
     24    Entity * entity = _component->set_entity (_name                 
     25                                             ,"Meta_Predictor"
     26#ifdef POSITION
     27                                             ,MIXTE
     28#endif
     29                                              );
     30   
     31    _interfaces = entity->set_interfaces();
     32
     33    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     34    {
     35      Interface * interface = _interfaces->set_interface(""
     36#ifdef POSITION
     37                                                         , IN 
     38                                                         , SOUTH
     39                                                         , "Generalist interface"
     40#endif
     41                                                         );
     42     
     43      in_CLOCK              = interface->set_signal_clk              ("clock" ,1);
     44      in_NRESET             = interface->set_signal_in  <Tcontrol_t> ("nreset",1,RESET_VHDL_YES);
     45    }
     46
     47    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2648
    2749     in_PREDICT_VAL                 = new SC_IN (Tcontrol_t)     * [_param._nb_prediction     ];
     
    3355    for (uint32_t i=0; i<_param._nb_prediction; i++)
    3456      {
    35         rename = "in_PREDICT_VAL_"         +toString(i);
    36          in_PREDICT_VAL                 [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
    37 
    38         rename = "out_PREDICT_ACK_"        +toString(i);
    39         out_PREDICT_ACK                 [i] = new SC_OUT(Tcontrol_t)     (rename.c_str());
    40 
    41         rename = "in_PREDICT_ADDRESS_"     +toString(i);
    42          in_PREDICT_ADDRESS             [i] = new SC_IN (Taddress_t)     (rename.c_str());
    43 
    44         rename = "out_PREDICT_HISTORY_"    +toString(i);
    45         out_PREDICT_HISTORY             [i] = new SC_OUT(Thistory_t)     (rename.c_str());
    46 
    47         rename = "out_PREDICT_DIRECTION_"  +toString(i);
    48         out_PREDICT_DIRECTION           [i] = new SC_OUT(Tcontrol_t)     (rename.c_str());
    49       }
     57        Interface_fifo * interface = _interfaces->set_interface("predict_"+toString(i)
     58#ifdef POSITION
     59                                                                , IN 
     60                                                                , WEST
     61                                                                , "Interface Predict"
     62#endif
     63                                                                );
     64
     65         in_PREDICT_VAL                 [i] = interface->set_signal_valack_in        ("val"      , VAL);
     66        out_PREDICT_ACK                 [i] = interface->set_signal_valack_out       ("ack"      , ACK);
     67         in_PREDICT_ADDRESS             [i] = interface->set_signal_in  <Taddress_t> ("address"  , _param._size_address);
     68        out_PREDICT_HISTORY             [i] = interface->set_signal_out <Thistory_t> ("history"  , _param._size_history);
     69        out_PREDICT_DIRECTION           [i] = interface->set_signal_out <Tcontrol_t> ("direction", 1);
     70      }
     71
     72    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5073
    5174     in_BRANCH_COMPLETE_VAL         = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete];
     
    5780    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    5881      {
    59         rename = "in_BRANCH_COMPLETE_VAL_"         +toString(i);
    60          in_BRANCH_COMPLETE_VAL         [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
    61 
    62         rename = "out_BRANCH_COMPLETE_ACK_"        +toString(i);
    63         out_BRANCH_COMPLETE_ACK         [i] = new SC_OUT(Tcontrol_t)     (rename.c_str());
    64 
    65         rename = "in_BRANCH_COMPLETE_ADDRESS_"     +toString(i);
    66          in_BRANCH_COMPLETE_ADDRESS     [i] = new SC_IN (Taddress_t)     (rename.c_str());
    67 
    68         rename = "in_BRANCH_COMPLETE_HISTORY_"     +toString(i);
    69          in_BRANCH_COMPLETE_HISTORY     [i] = new SC_IN (Thistory_t)     (rename.c_str());
    70 
    71         rename = "in_BRANCH_COMPLETE_DIRECTION_"   +toString(i);
    72          in_BRANCH_COMPLETE_DIRECTION   [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
    73       }
    74 
    75     // ~~~~~[ Signal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    76 
    77     if (_param._have_meta_predictor)
    78       {
    79     signal_PREDICT_PREDICTOR_0_ACK         = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction];
    80     signal_PREDICT_PREDICTOR_1_ACK         = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction];
    81       }
    82     signal_PREDICT_PREDICTOR_2_ACK         = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction];
    83 
    84     if (_param._have_meta_predictor)
    85       {                                                                                                               
    86     if (_param._predictor_0_have_bht)
    87     signal_PREDICT_PREDICTOR_0_BHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) * [_param._nb_prediction];
    88     if (_param._predictor_0_have_pht)
    89     signal_PREDICT_PREDICTOR_0_PHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) * [_param._nb_prediction];
    90     if (_param._predictor_0_have_bht)
    91     signal_PREDICT_PREDICTOR_1_BHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) * [_param._nb_prediction];
    92     if (_param._predictor_1_have_pht)
    93     signal_PREDICT_PREDICTOR_1_PHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) * [_param._nb_prediction];
    94       }                                                                                                               
    95     if (_param._predictor_2_have_bht)
    96     signal_PREDICT_PREDICTOR_2_BHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) * [_param._nb_prediction];
    97     if (_param._predictor_2_have_pht)
    98     signal_PREDICT_PREDICTOR_2_PHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) * [_param._nb_prediction];
    99 
    100     for (uint32_t i=0; i<_param._nb_prediction; i++)
    101       {
    102         if (_param._have_meta_predictor)
    103           {                                                                                                                   
    104         rename = "signal_PREDICT_PREDICTOR_0_ACK_"+toString(i);
    105         signal_PREDICT_PREDICTOR_0_ACK         [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());
    106         rename = "signal_PREDICT_PREDICTOR_1_ACK_"+toString(i);
    107         signal_PREDICT_PREDICTOR_1_ACK         [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());
    108           }
    109         rename = "signal_PREDICT_PREDICTOR_2_ACK_"+toString(i);
    110         signal_PREDICT_PREDICTOR_2_ACK         [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());
    111 
    112         if (_param._have_meta_predictor)
    113           {                                                                                                                   
    114         if (_param._predictor_0_have_bht)
    115           {
    116         rename = "signal_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i);
    117         signal_PREDICT_PREDICTOR_0_BHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t)  (rename.c_str());
    118           }
    119         if (_param._predictor_0_have_pht)
    120           {
    121         rename = "signal_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i);
    122         signal_PREDICT_PREDICTOR_0_PHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t)  (rename.c_str());
    123           }
    124         if (_param._predictor_1_have_bht)
    125           {
    126         rename = "signal_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i);
    127         signal_PREDICT_PREDICTOR_1_BHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t)  (rename.c_str());
    128           }
    129         if (_param._predictor_1_have_pht)
    130           {
    131         rename = "signal_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i);
    132         signal_PREDICT_PREDICTOR_1_PHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t)  (rename.c_str());
    133           }
    134           }
    135         if (_param._predictor_2_have_bht)
    136           {
    137         rename = "signal_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i);
    138         signal_PREDICT_PREDICTOR_2_BHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t)  (rename.c_str());
    139           }
    140         if (_param._predictor_2_have_pht)
    141           {
    142         rename = "signal_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i);
    143         signal_PREDICT_PREDICTOR_2_PHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t)  (rename.c_str());
    144           }
    145       }
    146     if (_param._have_meta_predictor)
    147       {
    148     signal_BRANCH_COMPLETE_PREDICTOR_0_ACK         = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction];
    149     signal_BRANCH_COMPLETE_PREDICTOR_1_ACK         = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction];
    150     signal_BRANCH_COMPLETE_PREDICTOR_2_VAL         = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction];
    151     signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION   = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction];
    152       }
    153     signal_BRANCH_COMPLETE_PREDICTOR_2_ACK         = new SC_SIGNAL(Tcontrol_t) * [_param._nb_prediction];
    154 
    155     if (_param._have_meta_predictor)
    156       {                                                                                                               
    157     if (_param._predictor_0_have_bht)
    158     signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) * [_param._nb_prediction];
    159     if (_param._predictor_0_have_pht)
    160     signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) * [_param._nb_prediction];
    161     if (_param._predictor_0_have_bht)
    162     signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) * [_param._nb_prediction];
    163     if (_param._predictor_1_have_pht)
    164     signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) * [_param._nb_prediction];
    165       }                                                                                                               
    166     if (_param._predictor_2_have_bht)
    167     signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t) * [_param._nb_prediction];
    168     if (_param._predictor_2_have_pht)
    169     signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t) * [_param._nb_prediction];
    170 
    171     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    172       {
    173         if (_param._have_meta_predictor)
    174           {                                                                                                                   
    175         rename = "signal_BRANCH_COMPLETE_PREDICTOR_0_ACK_"+toString(i);
    176         signal_BRANCH_COMPLETE_PREDICTOR_0_ACK         [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());
    177         rename = "signal_BRANCH_COMPLETE_PREDICTOR_1_ACK_"+toString(i);
    178         signal_BRANCH_COMPLETE_PREDICTOR_1_ACK         [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());
    179         rename = "signal_BRANCH_COMPLETE_PREDICTOR_2_VAL_"+toString(i);
    180         signal_BRANCH_COMPLETE_PREDICTOR_2_VAL         [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());
    181         rename = "signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION_"+toString(i);
    182         signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION   [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());
    183           }
    184         rename = "signal_BRANCH_COMPLETE_PREDICTOR_2_ACK_"+toString(i);
    185         signal_BRANCH_COMPLETE_PREDICTOR_2_ACK         [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());
    186 
    187         if (_param._have_meta_predictor)
    188           {                                                                                                                   
    189         if (_param._predictor_0_have_bht)
    190           {
    191         rename = "signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY_"+toString(i);
    192         signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t)  (rename.c_str());
    193           }
    194         if (_param._predictor_0_have_pht)
    195           {
    196         rename = "signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY_"+toString(i);
    197         signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t)  (rename.c_str());
    198           }
    199         if (_param._predictor_1_have_bht)
    200           {
    201         rename = "signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY_"+toString(i);
    202         signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t)  (rename.c_str());
    203           }
    204         if (_param._predictor_1_have_pht)
    205           {
    206         rename = "signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY_"+toString(i);
    207         signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t)  (rename.c_str());
    208           }
    209           }
    210         if (_param._predictor_2_have_bht)
    211           {
    212         rename = "signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY_"+toString(i);
    213         signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tbht_history_t)  (rename.c_str());
    214           }
    215         if (_param._predictor_2_have_pht)
    216           {
    217         rename = "signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY_"+toString(i);
    218         signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i] = new SC_SIGNAL(morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Tpht_history_t)  (rename.c_str());
    219           }
     82        Interface_fifo * interface = _interfaces->set_interface("branch_complete_"+toString(i)
     83#ifdef POSITION
     84                                                                , IN 
     85                                                                , EAST
     86                                                                , "Interface branch complete"
     87#endif
     88                                                                );
     89
     90         in_BRANCH_COMPLETE_VAL         [i] = interface->set_signal_valack_in        ("val"        , VAL);                 
     91        out_BRANCH_COMPLETE_ACK         [i] = interface->set_signal_valack_out       ("ack"        , ACK);                 
     92         in_BRANCH_COMPLETE_ADDRESS     [i] = interface->set_signal_in  <Taddress_t> ("address"    , _param._size_address);
     93         in_BRANCH_COMPLETE_HISTORY     [i] = interface->set_signal_in  <Thistory_t> ("history"    , _param._size_history);
     94         in_BRANCH_COMPLETE_DIRECTION   [i] = interface->set_signal_in  <Tcontrol_t> ("direction"  , 1);
    22095      }
    22196
     
    231106    component_Meta_Predictor_Glue = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::meta_predictor_glue::Meta_Predictor_Glue (name_component.c_str()               ,
    232107#ifdef STATISTICS       
    233                                                                                                                                                      _param_statistics                    ,
    234 #endif
    235                                                                                                                                                      *(_param._param_meta_predictor_glue));
    236    
    237     // Instantiation
    238 #if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    239     (*(component_Meta_Predictor_Glue->in_CLOCK ))        (*(in_CLOCK ));
    240 #endif
    241    
    242         // Interface Predict
     108                                                                                                                                                   _param_statistics                    ,
     109#endif
     110                                                                                                                                                   *(_param._param_meta_predictor_glue));
     111   
     112   
     113    _component->set_component (component_Meta_Predictor_Glue->_component
     114#ifdef POSITION
     115                               , 75
     116                               , 25
     117                               , 10
     118                               , 10
     119#endif
     120                               );
     121   
     122
     123    // =====[ component_Two_Level_Branch_Predictor_2 ]====================   
     124
     125    name_component = _name+"_Two_Level_Branch_Predictor_2";
     126   
     127    log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str());
     128   
     129    component_Two_Level_Branch_Predictor_2 = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor ::Two_Level_Branch_Predictor (name_component.c_str()               ,
     130#ifdef STATISTICS       
     131                                                                                                                                                                           _param_statistics                    ,
     132#endif
     133                                                                                                                                                                           *(_param._param_two_level_branch_predictor_2));
     134   
     135
     136    _component->set_component (component_Two_Level_Branch_Predictor_2->_component
     137#ifdef POSITION
     138                               , 75
     139                               , 25
     140                               , 10
     141                               , 10
     142#endif
     143                               );
     144   
     145
     146
     147    if (_param._have_meta_predictor)
     148      {
     149    // =====[ component_Two_Level_Branch_Predictor_1 ]====================   
     150
     151    name_component = _name+"_Two_Level_Branch_Predictor_1";
     152   
     153    log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str());
     154   
     155    component_Two_Level_Branch_Predictor_1 = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor ::Two_Level_Branch_Predictor (name_component.c_str()               ,
     156#ifdef STATISTICS       
     157                                                                                                                                                                           _param_statistics                    ,
     158#endif
     159                                                                                                                                                                           *(_param._param_two_level_branch_predictor_1));
     160
     161    _component->set_component (component_Two_Level_Branch_Predictor_1->_component
     162#ifdef POSITION
     163                               , 75
     164                               , 25
     165                               , 10
     166                               , 10
     167#endif
     168                               );
     169
     170    // =====[ component_Two_Level_Branch_Predictor_0 ]====================   
     171
     172    name_component = _name+"_Two_Level_Branch_Predictor_0";
     173   
     174    log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str());
     175   
     176    component_Two_Level_Branch_Predictor_0 = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor ::Two_Level_Branch_Predictor (name_component.c_str()               ,
     177#ifdef STATISTICS       
     178                                                                                                                                                                           _param_statistics                    ,
     179#endif
     180                                                                                                                                                                           *(_param._param_two_level_branch_predictor_0));
     181   
     182    _component->set_component (component_Two_Level_Branch_Predictor_0->_component
     183#ifdef POSITION
     184                               , 75
     185                               , 25
     186                               , 10
     187                               , 10
     188#endif
     189                               );
     190     
     191      }
     192
     193    // ~~~~~[ Component - Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     194
     195    // =====[ component_Meta_Predictor_Glue - Instanciation ]=============
     196
     197    name_component = _name+"_Meta_Predictor_Glue";
     198
     199    cout << "Instance : " << name_component << endl;
     200
     201#ifdef POSITION
     202    _component->interface_map ("Meta_Predictor_Glue","",
     203                               _name                ,"");
     204#endif
     205   
     206    _component->port_map(name_component, "in_CLOCK" , _name,"in_CLOCK" );
     207    _component->port_map(name_component, "in_NRESET", _name,"in_NRESET");
     208   
     209    // Interface Predict
    243210    for (uint32_t i=0; i<_param._nb_prediction; i++)
    244211      {
     212#ifdef POSITION
     213        _component->interface_map ("Meta_Predictor_Glue","predict_"+toString(i),
     214                                   _name                ,"predict_"+toString(i));
     215#endif
     216       
    245217        if (_param._have_meta_predictor)
    246218          {
    247         (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_0_ACK                 [i])) (*(signal_PREDICT_PREDICTOR_0_ACK                 [i]));
    248         (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_1_ACK                 [i])) (*(signal_PREDICT_PREDICTOR_1_ACK                 [i]));
    249           }                                                                                                                   
    250         (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_2_ACK                 [i])) (*(signal_PREDICT_PREDICTOR_2_ACK                 [i]));
    251         (*(component_Meta_Predictor_Glue->out_PREDICT_ACK                             [i])) (*(   out_PREDICT_ACK                             [i]));
     219        _component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_0_ACK"        , _name+"_Two_Level_Branch_Predictor_0" ,"out_PREDICT_"+toString(i)+"_ACK");
     220        _component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_1_ACK"        , _name+"_Two_Level_Branch_Predictor_1" ,"out_PREDICT_"+toString(i)+"_ACK");
     221          }
     222        _component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_2_ACK"        , _name+"_Two_Level_Branch_Predictor_2" ,"out_PREDICT_"+toString(i)+"_ACK");
     223        _component->port_map(name_component, "out_PREDICT_"+toString(i)+"_ACK"                    , _name , "out_PREDICT_"+toString(i)+"_ACK");
    252224        if (_param._have_meta_predictor)
    253           {                                                                                                                  
     225          {                                                                                                  
    254226        if (_param._predictor_0_have_bht)
    255         (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_0_BHT_HISTORY         [i])) (*(signal_PREDICT_PREDICTOR_0_BHT_HISTORY         [i]));
     227        _component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY", _name+"_Two_Level_Branch_Predictor_0" ,"out_PREDICT_"+toString(i)+"_BHT_HISTORY");
    256228        if (_param._predictor_0_have_pht)
    257         (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_0_PHT_HISTORY         [i])) (*(signal_PREDICT_PREDICTOR_0_PHT_HISTORY         [i]));
     229        _component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY", _name+"_Two_Level_Branch_Predictor_0" ,"out_PREDICT_"+toString(i)+"_PHT_HISTORY");
    258230        if (_param._predictor_1_have_bht)
    259         (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_1_BHT_HISTORY         [i])) (*(signal_PREDICT_PREDICTOR_1_BHT_HISTORY         [i]));
     231        _component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY", _name+"_Two_Level_Branch_Predictor_1" ,"out_PREDICT_"+toString(i)+"_BHT_HISTORY");
    260232        if (_param._predictor_1_have_pht)
    261         (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_1_PHT_HISTORY         [i])) (*(signal_PREDICT_PREDICTOR_1_PHT_HISTORY         [i]));
    262           }                                                                                                                  
     233        _component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY", _name+"_Two_Level_Branch_Predictor_1" ,"out_PREDICT_"+toString(i)+"_PHT_HISTORY");
     234          }                                                                                                  
    263235        if (_param._predictor_2_have_bht)
    264         (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_2_BHT_HISTORY         [i])) (*(signal_PREDICT_PREDICTOR_2_BHT_HISTORY         [i]));
     236        _component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY", _name+"_Two_Level_Branch_Predictor_2" ,"out_PREDICT_"+toString(i)+"_BHT_HISTORY");
    265237        if (_param._predictor_2_have_pht)
    266         (*(component_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_2_PHT_HISTORY         [i])) (*(signal_PREDICT_PREDICTOR_2_PHT_HISTORY         [i]));
    267         (*(component_Meta_Predictor_Glue->out_PREDICT_HISTORY                         [i])) (*(   out_PREDICT_HISTORY                         [i]));
    268         (*(component_Meta_Predictor_Glue->out_PREDICT_DIRECTION                       [i])) (*(   out_PREDICT_DIRECTION                       [i]));
    269       }
    270 
    271     // Interface Branch_complete
    272    
     238        _component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY", _name+"_Two_Level_Branch_Predictor_2" ,"out_PREDICT_"+toString(i)+"_PHT_HISTORY");
     239        _component->port_map(name_component, "out_PREDICT_"+toString(i)+"_HISTORY"                , _name , "out_PREDICT_"+toString(i)+"_HISTORY");
     240        _component->port_map(name_component, "out_PREDICT_"+toString(i)+"_DIRECTION"              , _name , "out_PREDICT_"+toString(i)+"_DIRECTION");
     241      }
     242
    273243    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    274244      {
     245#ifdef POSITION
     246        _component->interface_map ("Meta_Predictor_Glue","branch_complete_"+toString(i),
     247                                   _name                ,"branch_complete_"+toString(i));
     248#endif
     249
    275250        if (_param._have_meta_predictor)
    276251          {
    277         (*(component_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_VAL                     [i])) (*(    in_BRANCH_COMPLETE_VAL                     [i]));
    278         (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_2_VAL         [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_VAL         [i]));
    279 
    280         (*(component_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_PREDICTOR_0_ACK         [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_0_ACK         [i]));
    281         (*(component_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_PREDICTOR_1_ACK         [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_1_ACK         [i]));
     252        _component->port_map(name_component,  "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"                     , _name , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL");
     253        _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_VAL"         , _name+"_Two_Level_Branch_Predictor_2",  "in_BRANCH_COMPLETE_"+toString(i)+"_VAL");
     254
     255        _component->port_map(name_component,  "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_ACK"         , _name+"_Two_Level_Branch_Predictor_0", "out_BRANCH_COMPLETE_"+toString(i)+"_ACK");
     256        _component->port_map(name_component,  "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_ACK"         , _name+"_Two_Level_Branch_Predictor_1", "out_BRANCH_COMPLETE_"+toString(i)+"_ACK");
    282257          }                                     
    283         (*(component_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_PREDICTOR_2_ACK         [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_ACK         [i]));
    284         (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_ACK                     [i])) (*(   out_BRANCH_COMPLETE_ACK                     [i]));
     258        _component->port_map(name_component,  "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_ACK"         , _name+"_Two_Level_Branch_Predictor_2", "out_BRANCH_COMPLETE_"+toString(i)+"_ACK");
     259        _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_ACK"                     , _name ,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK");
    285260                                               
    286261        if (_param._have_meta_predictor)       
    287262          {                                     
    288263        if (_param._predictor_0_have_bht)
    289         (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i]));
     264        _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_0",  "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" );
    290265        if (_param._predictor_0_have_pht)
    291         (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i]));
     266        _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_0",  "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" );
    292267        if (_param._predictor_1_have_bht)
    293         (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i]));
     268        _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_1",  "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" );
    294269        if (_param._predictor_1_have_pht)
    295         (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i]));
     270        _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_1",  "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" );
    296271          }                                     
    297272        if (_param._predictor_2_have_bht)
    298         (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i]));
     273        _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_2",  "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" );
    299274        if (_param._predictor_2_have_pht)
    300         (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i]));
    301         (*(component_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_HISTORY                 [i])) (*(    in_BRANCH_COMPLETE_HISTORY                 [i]));
     275        _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_2",  "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" );
     276        _component->port_map(name_component,  "in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"                 , _name , "in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY");
    302277        if (_param._have_meta_predictor)       
    303278          {
    304         (*(component_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_DIRECTION               [i])) (*(    in_BRANCH_COMPLETE_DIRECTION               [i]));
    305         (*(component_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION   [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION   [i]));
     279        _component->port_map(name_component,  "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"               , _name , "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION");
     280        _component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_DIRECTION"   , _name+"_Two_Level_Branch_Predictor_2" , "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION");
    306281          }
    307282      }
    308283
    309     // =====[ component_Two_Level_Branch_Predictor_2 ]====================   
    310 
     284    // =====[ component_Two_Level_Branch_Predictor_2 - Instanciation ]====
    311285    name_component = _name+"_Two_Level_Branch_Predictor_2";
    312    
    313     log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str());
    314    
    315     component_Two_Level_Branch_Predictor_2 = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor ::Two_Level_Branch_Predictor (name_component.c_str()               ,
    316 #ifdef STATISTICS       
    317                                                                                                                                                                            _param_statistics                    ,
    318 #endif
    319                                                                                                                                                                            *(_param._param_two_level_branch_predictor_2));
    320      
    321     // Instantiation
    322     (*(component_Two_Level_Branch_Predictor_2->in_CLOCK ))        (*(in_CLOCK ));
    323     (*(component_Two_Level_Branch_Predictor_2->in_NRESET))        (*(in_NRESET));
    324    
     286
     287    cout << "Instance : " << name_component << endl;
     288
     289#ifdef POSITION
     290        _component->interface_map ("Two_Level_Branch_Predictor_2","",
     291                                   _name         ,"");
     292#endif
     293       
     294        _component->port_map(name_component, "in_CLOCK" , _name,"in_CLOCK" );
     295        _component->port_map(name_component, "in_NRESET", _name,"in_NRESET");
     296
    325297    for (uint32_t i=0; i<_param._nb_prediction; i++)
    326298      {
    327         (*(component_Two_Level_Branch_Predictor_2-> in_PREDICT_VAL                 [i])) (*(    in_PREDICT_VAL                             [i]));
    328         (*(component_Two_Level_Branch_Predictor_2->out_PREDICT_ACK                 [i])) (*(signal_PREDICT_PREDICTOR_2_ACK                 [i]));
    329         (*(component_Two_Level_Branch_Predictor_2-> in_PREDICT_ADDRESS             [i])) (*(    in_PREDICT_ADDRESS                         [i]));
    330         if (_param._predictor_2_have_bht)                                                                                     
    331         (*(component_Two_Level_Branch_Predictor_2->out_PREDICT_BHT_HISTORY         [i])) (*(signal_PREDICT_PREDICTOR_2_BHT_HISTORY         [i]));
     299#ifdef POSITION
     300        _component->interface_map ("Two_Level_Branch_Predictor_2","predict_"+toString(i),
     301                                   _name         ,"predict_"+toString(i));
     302#endif
     303
     304        _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_VAL"         , _name, "in_PREDICT_"+toString(i)+"_VAL");
     305        _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_ACK"         , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_2_ACK");
     306        _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_ADDRESS"     , _name, "in_PREDICT_"+toString(i)+"_ADDRESS");
     307        if (_param._predictor_2_have_bht)                                                                             
     308        _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY");
    332309        if (_param._predictor_2_have_pht)
    333         (*(component_Two_Level_Branch_Predictor_2->out_PREDICT_PHT_HISTORY         [i])) (*(signal_PREDICT_PREDICTOR_2_PHT_HISTORY         [i]));
     310        _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY");
    334311      }
    335312   
    336313    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    337314      {
     315#ifdef POSITION
     316        _component->interface_map ("Two_Level_Branch_Predictor_2","branch_complete_"+toString(i),
     317                                   _name         ,"branch_complete_"+toString(i));
     318#endif
    338319        if (_param._have_meta_predictor)
    339         (*(component_Two_Level_Branch_Predictor_2-> in_BRANCH_COMPLETE_VAL         [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_VAL         [i]));
     320        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"         , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_VAL"         );
    340321        else
    341         (*(component_Two_Level_Branch_Predictor_2-> in_BRANCH_COMPLETE_VAL         [i])) (*(    in_BRANCH_COMPLETE_VAL                     [i]));
    342         (*(component_Two_Level_Branch_Predictor_2->out_BRANCH_COMPLETE_ACK         [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_ACK         [i]));
    343         (*(component_Two_Level_Branch_Predictor_2-> in_BRANCH_COMPLETE_ADDRESS     [i])) (*(    in_BRANCH_COMPLETE_ADDRESS                 [i]));
     322        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"         , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"                     );
     323        _component->port_map(name_component,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"         , _name+"_Meta_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_ACK"         );
     324        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"     , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"                 );
    344325        if (_param._predictor_2_have_bht)                                                                                       
    345         (*(component_Two_Level_Branch_Predictor_2-> in_BRANCH_COMPLETE_BHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i]));
     326        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY" );
    346327        if (_param._predictor_2_have_pht)                                                                                       
    347         (*(component_Two_Level_Branch_Predictor_2-> in_BRANCH_COMPLETE_PHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i]));
     328        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY" );
    348329        if (_param._have_meta_predictor)
    349         (*(component_Two_Level_Branch_Predictor_2-> in_BRANCH_COMPLETE_DIRECTION   [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION   [i]));
     330        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"   , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_DIRECTION"   );
    350331        else
    351         (*(component_Two_Level_Branch_Predictor_2-> in_BRANCH_COMPLETE_DIRECTION   [i])) (*(    in_BRANCH_COMPLETE_DIRECTION               [i]));       
     332        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"   , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"               );   
    352333      }
    353334
    354335    if (_param._have_meta_predictor)
    355336      {
    356     // =====[ component_Two_Level_Branch_Predictor_1 ]====================   
     337    // =====[ component_Two_Level_Branch_Predictor_1 - Instanciation ]====
    357338
    358339    name_component = _name+"_Two_Level_Branch_Predictor_1";
    359    
    360     log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str());
    361    
    362     component_Two_Level_Branch_Predictor_1 = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor ::Two_Level_Branch_Predictor (name_component.c_str()               ,
    363 #ifdef STATISTICS       
    364                                                                                                                                                                            _param_statistics                    ,
    365 #endif
    366                                                                                                                                                                            *(_param._param_two_level_branch_predictor_1));
    367      
    368     // Instantiation
    369     (*(component_Two_Level_Branch_Predictor_1->in_CLOCK ))        (*(in_CLOCK ));
    370     (*(component_Two_Level_Branch_Predictor_1->in_NRESET))        (*(in_NRESET));
    371    
     340
     341    cout << "Instance : " << name_component << endl;
     342
     343#ifdef POSITION
     344        _component->interface_map ("Two_Level_Branch_Predictor_1","",
     345                                   _name         ,"");
     346#endif
     347       
     348        _component->port_map(name_component, "in_CLOCK" , _name,"in_CLOCK" );
     349        _component->port_map(name_component, "in_NRESET", _name,"in_NRESET");
     350
    372351    for (uint32_t i=0; i<_param._nb_prediction; i++)
    373352      {
    374         (*(component_Two_Level_Branch_Predictor_1-> in_PREDICT_VAL                 [i])) (*(    in_PREDICT_VAL                             [i]));
    375         (*(component_Two_Level_Branch_Predictor_1->out_PREDICT_ACK                 [i])) (*(signal_PREDICT_PREDICTOR_1_ACK                 [i]));
    376         (*(component_Two_Level_Branch_Predictor_1-> in_PREDICT_ADDRESS             [i])) (*(    in_PREDICT_ADDRESS                         [i]));
    377         if (_param._predictor_1_have_bht)                                                                                     
    378         (*(component_Two_Level_Branch_Predictor_1->out_PREDICT_BHT_HISTORY         [i])) (*(signal_PREDICT_PREDICTOR_1_BHT_HISTORY         [i]));
     353#ifdef POSITION
     354        _component->interface_map ("Two_Level_Branch_Predictor_1","predict_"+toString(i),
     355                                   _name         ,"predict_"+toString(i));
     356#endif
     357
     358        _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_VAL"         , _name, "in_PREDICT_"+toString(i)+"_VAL");
     359        _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_ACK"         , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_1_ACK");
     360        _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_ADDRESS"     , _name, "in_PREDICT_"+toString(i)+"_ADDRESS");
     361        if (_param._predictor_1_have_bht)                                                                             
     362        _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY");
    379363        if (_param._predictor_1_have_pht)
    380         (*(component_Two_Level_Branch_Predictor_1->out_PREDICT_PHT_HISTORY         [i])) (*(signal_PREDICT_PREDICTOR_1_PHT_HISTORY         [i]));
     364        _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY");
    381365      }
    382366   
    383367    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    384368      {
    385         (*(component_Two_Level_Branch_Predictor_1-> in_BRANCH_COMPLETE_VAL         [i])) (*(    in_BRANCH_COMPLETE_VAL                     [i]));
    386         (*(component_Two_Level_Branch_Predictor_1->out_BRANCH_COMPLETE_ACK         [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_1_ACK         [i]));
    387         (*(component_Two_Level_Branch_Predictor_1-> in_BRANCH_COMPLETE_ADDRESS     [i])) (*(    in_BRANCH_COMPLETE_ADDRESS                 [i]));
     369#ifdef POSITION
     370        _component->interface_map ("Two_Level_Branch_Predictor_1","branch_complete_"+toString(i),
     371                                   _name         ,"branch_complete_"+toString(i));
     372#endif
     373        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"         , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"                     );
     374        _component->port_map(name_component,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"         , _name+"_Meta_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_ACK"         );
     375        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"     , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"                 );
    388376        if (_param._predictor_1_have_bht)                                                                                       
    389         (*(component_Two_Level_Branch_Predictor_1-> in_BRANCH_COMPLETE_BHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i]));
     377        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY" );
    390378        if (_param._predictor_1_have_pht)                                                                                       
    391         (*(component_Two_Level_Branch_Predictor_1-> in_BRANCH_COMPLETE_PHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i]));
    392         (*(component_Two_Level_Branch_Predictor_1-> in_BRANCH_COMPLETE_DIRECTION   [i])) (*(    in_BRANCH_COMPLETE_DIRECTION               [i]));       
    393       }
    394 
    395     // =====[ component_Two_Level_Branch_Predictor_0 ]====================   
     379        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY" );
     380        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"   , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"               );   
     381      }
     382    // =====[ component_Two_Level_Branch_Predictor_0 - Instanciation ]====
    396383
    397384    name_component = _name+"_Two_Level_Branch_Predictor_0";
    398    
    399     log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str());
    400    
    401     component_Two_Level_Branch_Predictor_0 = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor ::Two_Level_Branch_Predictor (name_component.c_str()               ,
    402 #ifdef STATISTICS       
    403                                                                                                                                                                            _param_statistics                    ,
    404 #endif
    405                                                                                                                                                                            *(_param._param_two_level_branch_predictor_0));
    406      
    407     // Instantiation
    408     (*(component_Two_Level_Branch_Predictor_0->in_CLOCK ))        (*(in_CLOCK ));
    409     (*(component_Two_Level_Branch_Predictor_0->in_NRESET))        (*(in_NRESET));
    410    
     385
     386    cout << "Instance : " << name_component << endl;
     387
     388#ifdef POSITION
     389        _component->interface_map ("Two_Level_Branch_Predictor_0","",
     390                                   _name         ,"");
     391#endif
     392       
     393        _component->port_map(name_component, "in_CLOCK" , _name,"in_CLOCK" );
     394        _component->port_map(name_component, "in_NRESET", _name,"in_NRESET");
     395
    411396    for (uint32_t i=0; i<_param._nb_prediction; i++)
    412397      {
    413         (*(component_Two_Level_Branch_Predictor_0-> in_PREDICT_VAL                 [i])) (*(    in_PREDICT_VAL                             [i]));
    414         (*(component_Two_Level_Branch_Predictor_0->out_PREDICT_ACK                 [i])) (*(signal_PREDICT_PREDICTOR_0_ACK                 [i]));
    415         (*(component_Two_Level_Branch_Predictor_0-> in_PREDICT_ADDRESS             [i])) (*(    in_PREDICT_ADDRESS                         [i]));
    416         if (_param._predictor_0_have_bht)                                                                                     
    417         (*(component_Two_Level_Branch_Predictor_0->out_PREDICT_BHT_HISTORY         [i])) (*(signal_PREDICT_PREDICTOR_0_BHT_HISTORY         [i]));
     398#ifdef POSITION
     399        _component->interface_map ("Two_Level_Branch_Predictor_0","predict_"+toString(i),
     400                                   _name         ,"predict_"+toString(i));
     401#endif
     402
     403        _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_VAL"         , _name, "in_PREDICT_"+toString(i)+"_VAL");
     404        _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_ACK"         , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_0_ACK");
     405        _component->port_map(name_component, "in_PREDICT_"+toString(i)+"_ADDRESS"     , _name, "in_PREDICT_"+toString(i)+"_ADDRESS");
     406        if (_param._predictor_0_have_bht)                                                                             
     407        _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY");
    418408        if (_param._predictor_0_have_pht)
    419         (*(component_Two_Level_Branch_Predictor_0->out_PREDICT_PHT_HISTORY         [i])) (*(signal_PREDICT_PREDICTOR_0_PHT_HISTORY         [i]));
     409        _component->port_map(name_component,"out_PREDICT_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY");
    420410      }
    421411   
    422412    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    423413      {
    424         (*(component_Two_Level_Branch_Predictor_0-> in_BRANCH_COMPLETE_VAL         [i])) (*(    in_BRANCH_COMPLETE_VAL                     [i]));
    425         (*(component_Two_Level_Branch_Predictor_0->out_BRANCH_COMPLETE_ACK         [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_0_ACK         [i]));
    426         (*(component_Two_Level_Branch_Predictor_0-> in_BRANCH_COMPLETE_ADDRESS     [i])) (*(    in_BRANCH_COMPLETE_ADDRESS                 [i]));
     414#ifdef POSITION
     415        _component->interface_map ("Two_Level_Branch_Predictor_0","branch_complete_"+toString(i),
     416                                   _name         ,"branch_complete_"+toString(i));
     417#endif
     418        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"         , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"                     );
     419        _component->port_map(name_component,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"         , _name+"_Meta_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_ACK"         );
     420        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"     , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"                 );
    427421        if (_param._predictor_0_have_bht)                                                                                       
    428         (*(component_Two_Level_Branch_Predictor_0-> in_BRANCH_COMPLETE_BHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i]));
     422        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY" );
    429423        if (_param._predictor_0_have_pht)                                                                                       
    430         (*(component_Two_Level_Branch_Predictor_0-> in_BRANCH_COMPLETE_PHT_HISTORY [i])) (*(signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i]));
    431         (*(component_Two_Level_Branch_Predictor_0-> in_BRANCH_COMPLETE_DIRECTION   [i])) (*(    in_BRANCH_COMPLETE_DIRECTION               [i]));       
     424        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY" );
     425        _component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"   , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"               );   
    432426      }
    433427      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/src/Meta_Predictor_deallocation.cpp

    r15 r44  
    1919    log_printf(FUNC,Meta_Predictor,"deallocation","Begin");
    2020
    21     delete in_CLOCK;
    22     delete in_NRESET;
     21    delete     in_CLOCK;
     22    delete     in_NRESET;
    2323
    24     for (uint32_t i=0; i<_param._nb_prediction; i++)
    25       {
    26         delete  in_PREDICT_VAL                 [i];
    27         delete out_PREDICT_ACK                 [i];
    28         delete  in_PREDICT_ADDRESS             [i];
    29         delete out_PREDICT_HISTORY             [i];
    30         delete out_PREDICT_DIRECTION           [i];
    31       }
     24    delete []  in_PREDICT_VAL        ;
     25    delete [] out_PREDICT_ACK        ;
     26    delete []  in_PREDICT_ADDRESS    ;
     27    delete [] out_PREDICT_HISTORY    ;
     28    delete [] out_PREDICT_DIRECTION  ;
    3229
    33     delete  in_PREDICT_VAL        ;
    34     delete out_PREDICT_ACK        ;
    35     delete  in_PREDICT_ADDRESS    ;
    36     delete out_PREDICT_HISTORY    ;
    37     delete out_PREDICT_DIRECTION  ;
    38 
    39     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    40       {
    41         delete  in_BRANCH_COMPLETE_VAL         [i];
    42         delete out_BRANCH_COMPLETE_ACK         [i];
    43         delete  in_BRANCH_COMPLETE_ADDRESS     [i];
    44         delete  in_BRANCH_COMPLETE_HISTORY     [i];
    45         delete  in_BRANCH_COMPLETE_DIRECTION   [i];
    46       }
    47 
    48     delete  in_BRANCH_COMPLETE_VAL        ;
    49     delete out_BRANCH_COMPLETE_ACK        ;
    50     delete  in_BRANCH_COMPLETE_ADDRESS    ;
    51     delete  in_BRANCH_COMPLETE_HISTORY    ;
    52     delete  in_BRANCH_COMPLETE_DIRECTION  ;
    53 
    54     // ~~~~~[ Signal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    55 
    56     for (uint32_t i=0; i<_param._nb_prediction; i++)
    57       {
    58         if (_param._have_meta_predictor)
    59           {                                                                                                                   
    60         delete signal_PREDICT_PREDICTOR_0_ACK         [i];
    61         delete signal_PREDICT_PREDICTOR_1_ACK         [i];
    62           }
    63         delete signal_PREDICT_PREDICTOR_2_ACK         [i];
    64 
    65         if (_param._have_meta_predictor)
    66           {                                                                                                                   
    67         if (_param._predictor_0_have_bht)
    68         delete signal_PREDICT_PREDICTOR_0_BHT_HISTORY [i];
    69         if (_param._predictor_0_have_pht)
    70         delete signal_PREDICT_PREDICTOR_0_PHT_HISTORY [i];
    71         if (_param._predictor_1_have_bht)
    72         delete signal_PREDICT_PREDICTOR_1_BHT_HISTORY [i];
    73         if (_param._predictor_1_have_pht)
    74         delete signal_PREDICT_PREDICTOR_1_PHT_HISTORY [i];
    75           }
    76         if (_param._predictor_2_have_bht)
    77         delete signal_PREDICT_PREDICTOR_2_BHT_HISTORY [i];
    78         if (_param._predictor_2_have_pht)
    79         delete signal_PREDICT_PREDICTOR_2_PHT_HISTORY [i];
    80       }
    81 
    82     if (_param._have_meta_predictor)
    83       {
    84     delete signal_PREDICT_PREDICTOR_0_ACK         ;
    85     delete signal_PREDICT_PREDICTOR_1_ACK         ;
    86       }
    87     delete signal_PREDICT_PREDICTOR_2_ACK         ;
    88 
    89     if (_param._have_meta_predictor)
    90       {                                                                                                               
    91     if (_param._predictor_0_have_bht)
    92     delete signal_PREDICT_PREDICTOR_0_BHT_HISTORY;
    93     if (_param._predictor_0_have_pht)
    94     delete signal_PREDICT_PREDICTOR_0_PHT_HISTORY;
    95     if (_param._predictor_0_have_bht)
    96     delete signal_PREDICT_PREDICTOR_1_BHT_HISTORY;
    97     if (_param._predictor_1_have_pht)
    98     delete signal_PREDICT_PREDICTOR_1_PHT_HISTORY;
    99       }                                           
    100     if (_param._predictor_2_have_bht)
    101     delete signal_PREDICT_PREDICTOR_2_BHT_HISTORY;
    102     if (_param._predictor_2_have_pht)
    103     delete signal_PREDICT_PREDICTOR_2_PHT_HISTORY;
    104 
    105     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    106       {
    107         if (_param._have_meta_predictor)
    108           {                                                                                                                   
    109         delete signal_BRANCH_COMPLETE_PREDICTOR_0_ACK         [i];
    110         delete signal_BRANCH_COMPLETE_PREDICTOR_1_ACK         [i];
    111         delete signal_BRANCH_COMPLETE_PREDICTOR_2_VAL         [i];
    112         delete signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION   [i];
    113           }
    114         delete signal_BRANCH_COMPLETE_PREDICTOR_2_ACK         [i];
    115 
    116         if (_param._have_meta_predictor)
    117           {                                                                                                                   
    118         if (_param._predictor_0_have_bht)
    119         delete signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i];
    120         if (_param._predictor_0_have_pht)
    121         delete signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i];
    122         if (_param._predictor_1_have_bht)
    123         delete signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i];
    124         if (_param._predictor_1_have_pht)
    125         delete signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i];
    126           }
    127         if (_param._predictor_2_have_bht)
    128         delete signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i];
    129         if (_param._predictor_2_have_pht)
    130         delete signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i];
    131       }
    132 
    133     if (_param._have_meta_predictor)
    134       {
    135     delete signal_BRANCH_COMPLETE_PREDICTOR_0_ACK         ;
    136     delete signal_BRANCH_COMPLETE_PREDICTOR_1_ACK         ;
    137     delete signal_BRANCH_COMPLETE_PREDICTOR_2_VAL         ;
    138     delete signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION   ;
    139       }
    140     delete signal_BRANCH_COMPLETE_PREDICTOR_2_ACK         ;
    141 
    142     if (_param._have_meta_predictor)
    143       {                                                                                                               
    144     if (_param._predictor_0_have_bht)
    145     delete signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY;
    146     if (_param._predictor_0_have_pht)
    147     delete signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY;
    148     if (_param._predictor_0_have_bht)
    149     delete signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY;
    150     if (_param._predictor_1_have_pht)
    151     delete signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY;
    152       }                                           
    153     if (_param._predictor_2_have_bht)
    154     delete signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY;
    155     if (_param._predictor_2_have_pht)
    156     delete signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY;
     30    delete []  in_BRANCH_COMPLETE_VAL        ;
     31    delete [] out_BRANCH_COMPLETE_ACK        ;
     32    delete []  in_BRANCH_COMPLETE_ADDRESS    ;
     33    delete []  in_BRANCH_COMPLETE_HISTORY    ;
     34    delete []  in_BRANCH_COMPLETE_DIRECTION  ;
    15735
    15836    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     
    16543    delete component_Two_Level_Branch_Predictor_2;
    16644    delete component_Meta_Predictor_Glue         ;
    167 
     45    delete _component;
    16846
    16947    log_printf(FUNC,Meta_Predictor,"deallocation","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/src/Meta_Predictor_vhdl.cpp

    r5 r44  
    2020  {
    2121    log_printf(FUNC,Meta_Predictor,"vhdl","Begin");
    22     Vhdl vhdl (_name);
    2322
    24     vhdl.set_library_work (_name + "_Pack");
    25     vhdl.set_library_work (_name + "_Meta_Predictor_Glue_Pack");
    26     if (_param._have_meta_predictor)
    27       {
    28     vhdl.set_library_work (_name + "_Two_Level_Branch_Predictor_0_Pack");
    29     vhdl.set_library_work (_name + "_Two_Level_Branch_Predictor_1_Pack");
    30       }
    31     vhdl.set_library_work (_name + "_Two_Level_Branch_Predictor_2_Pack");
     23    Vhdl * vhdl = new Vhdl (_name);
    3224
    33     vhdl_port        (vhdl);
     25    _interfaces->set_port     (vhdl);
     26    _component ->vhdl_instance(vhdl);
     27
    3428    vhdl_declaration (vhdl);
    3529    vhdl_body        (vhdl);
    3630
    37     vhdl.generate_file();
     31    vhdl->generate_file();
     32
     33    delete vhdl;
     34
    3835    log_printf(FUNC,Meta_Predictor,"vhdl","End");
    3936
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/src/Meta_Predictor_vhdl_body.cpp

    r15 r44  
    1616
    1717
    18   void Meta_Predictor::vhdl_body (Vhdl & vhdl)
     18  void Meta_Predictor::vhdl_body (Vhdl * & vhdl)
    1919  {
    2020    log_printf(FUNC,Meta_Predictor,"vhdl_body","Begin");
    21     vhdl.set_body ("");
    22 
    23     list<string> list_port_map;
    24 
    25     // =====[ component_Meta_Predictor_Glue ]=============================
    26    
    27     list_port_map.clear();
    28     log_printf(INFO,Meta_Predictor,"vhdl_body","Instanciation : component_Meta_Predictor_Glue");
    29    
    30     // Instantiation
    31 
    32     // Interface Predict
    33     for (uint32_t i=0; i<_param._nb_prediction; i++)
    34       {
    35         if (_param._have_meta_predictor)
    36           {
    37         vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_0_ACK_"+toString(i)+"               ", "signal_PREDICT_PREDICTOR_0_ACK_"+toString(i));
    38         vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_1_ACK_"+toString(i)+"               ", "signal_PREDICT_PREDICTOR_1_ACK_"+toString(i));
    39           }                                                                                                                   
    40         vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_2_ACK_"+toString(i)+"               ", "signal_PREDICT_PREDICTOR_2_ACK_"+toString(i));
    41         vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+"                           ", "   out_PREDICT_ACK_"+toString(i));
    42         if (_param._have_meta_predictor)
    43           {                                                                                                                   
    44         if (_param._predictor_0_have_bht)
    45         vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i)+"       ", "signal_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i));
    46         if (_param._predictor_0_have_pht)
    47         vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i)+"       ", "signal_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i));
    48         if (_param._predictor_1_have_bht)
    49         vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i)+"       ", "signal_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i));
    50         if (_param._predictor_1_have_pht)
    51         vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i)+"       ", "signal_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i));
    52           }                                                                                                                   
    53         if (_param._predictor_2_have_bht)
    54         vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i)+"       ", "signal_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i));
    55         if (_param._predictor_2_have_pht)
    56         vhdl.set_body_component_port_map (list_port_map," in_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i)+"       ", "signal_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i));
    57         vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_HISTORY_"+toString(i)+"                       ", "   out_PREDICT_HISTORY_"+toString(i));
    58         vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_DIRECTION_"+toString(i)+"                     ", "   out_PREDICT_DIRECTION_"+toString(i));
    59       }
    60 
    61     // Interface Branch_complete
    62    
    63     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    64       {
    65         if (_param._have_meta_predictor)
    66           {
    67         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+"                    ", "    in_BRANCH_COMPLETE_VAL_"+toString(i));
    68         vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_2_VAL_"+toString(i)+"        ", "signal_BRANCH_COMPLETE_PREDICTOR_2_VAL_"+toString(i));
    69 
    70         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PREDICTOR_0_ACK_"+toString(i)+"        ", "signal_BRANCH_COMPLETE_PREDICTOR_0_ACK_"+toString(i));
    71         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PREDICTOR_1_ACK_"+toString(i)+"        ", "signal_BRANCH_COMPLETE_PREDICTOR_1_ACK_"+toString(i));
    72           }                                     
    73         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PREDICTOR_2_ACK_"+toString(i)+"        ", "signal_BRANCH_COMPLETE_PREDICTOR_2_ACK_"+toString(i));
    74         vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+"                    ", "   out_BRANCH_COMPLETE_ACK_"+toString(i));
    75                                                
    76         if (_param._have_meta_predictor)       
    77           {                                     
    78         if (_param._predictor_0_have_bht)
    79         vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY_"+toString(i));
    80         if (_param._predictor_0_have_pht)
    81         vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY_"+toString(i));
    82         if (_param._predictor_1_have_bht)
    83         vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY_"+toString(i));
    84         if (_param._predictor_1_have_pht)
    85         vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY_"+toString(i));
    86           }                                     
    87         if (_param._predictor_2_have_bht)
    88         vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY_"+toString(i));
    89         if (_param._predictor_2_have_pht)
    90         vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY_"+toString(i));
    91         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_HISTORY_"+toString(i)+"                ", "    in_BRANCH_COMPLETE_HISTORY_"+toString(i));
    92         if (_param._have_meta_predictor)       
    93           {
    94         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"              ", "    in_BRANCH_COMPLETE_DIRECTION_"+toString(i));
    95         vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION_"+toString(i)+"  ", "signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION_"+toString(i));
    96           }
    97       }
    98 
    99     vhdl.set_body_component ("component_Meta_Predictor_Glue",_name+"_Meta_Predictor_Glue",list_port_map);
    100 
    101     // =====[ component_Two_Level_Branch_Predictor_2 ]====================   
    102 
    103     list_port_map.clear();
    104     log_printf(INFO,Meta_Predictor,"vhdl_body","Instanciation : component_Two_Level_Branch_Predictor_2");
    105    
    106     // Instantiation
    107     vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK ");
    108     vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");
    109    
    110     for (uint32_t i=0; i<_param._nb_prediction; i++)
    111       {
    112         vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+"                ", "    in_PREDICT_VAL_"+toString(i));
    113         vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+"                ", "signal_PREDICT_PREDICTOR_2_ACK_"+toString(i));
    114         vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+"            ", "    in_PREDICT_ADDRESS_"+toString(i));
    115         if (_param._predictor_2_have_bht)                                                                                     
    116         vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_BHT_HISTORY_"+toString(i)+"        ", "signal_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i));
    117         if (_param._predictor_2_have_pht)
    118         vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_PHT_HISTORY_"+toString(i)+"        ", "signal_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i));
    119       }
    120    
    121     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    122       {
    123         if (_param._have_meta_predictor)
    124         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+"        ", "signal_BRANCH_COMPLETE_PREDICTOR_2_VAL_"+toString(i));
    125         else
    126         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+"        ", "    in_BRANCH_COMPLETE_VAL_"+toString(i));
    127         vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+"        ", "signal_BRANCH_COMPLETE_PREDICTOR_2_ACK_"+toString(i));
    128         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+"    ", "    in_BRANCH_COMPLETE_ADDRESS_"+toString(i));
    129         if (_param._predictor_2_have_bht)                                                                                       
    130         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY_"+toString(i));
    131         if (_param._predictor_2_have_pht)                                                                                       
    132         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY_"+toString(i));
    133         if (_param._have_meta_predictor)
    134         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"  ", "signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION_"+toString(i));
    135         else
    136         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"  ", "    in_BRANCH_COMPLETE_DIRECTION_"+toString(i));     
    137       }
    138 
    139     vhdl.set_body_component ("component_Two_Level_Branch_Predictor_2",_name+"_Two_Level_Branch_Predictor_2",list_port_map);
    140 
    141     if (_param._have_meta_predictor)
    142       {
    143     // =====[ component_Two_Level_Branch_Predictor_1 ]====================   
    144 
    145     list_port_map.clear();
    146     log_printf(INFO,Meta_Predictor,"vhdl_body","Instanciation : component_Two_Level_Branch_Predictor_1");
    147    
    148     // Instantiation
    149     vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK ");
    150     vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");
    151    
    152     for (uint32_t i=0; i<_param._nb_prediction; i++)
    153       {
    154         vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+"                ", "    in_PREDICT_VAL_"+toString(i));
    155         vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+"                ", "signal_PREDICT_PREDICTOR_1_ACK_"+toString(i));
    156         vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+"            ", "    in_PREDICT_ADDRESS_"+toString(i));
    157         if (_param._predictor_1_have_bht)                                                                                     
    158         vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_BHT_HISTORY_"+toString(i)+"        ", "signal_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i));
    159         if (_param._predictor_1_have_pht)
    160         vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_PHT_HISTORY_"+toString(i)+"        ", "signal_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i));
    161       }
    162    
    163     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    164       {
    165         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+"        ", "    in_BRANCH_COMPLETE_VAL_"+toString(i));
    166         vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+"        ", "signal_BRANCH_COMPLETE_PREDICTOR_1_ACK_"+toString(i));
    167         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+"    ", "    in_BRANCH_COMPLETE_ADDRESS_"+toString(i));
    168         if (_param._predictor_1_have_bht)                                                                                       
    169         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY_"+toString(i));
    170         if (_param._predictor_1_have_pht)                                                                                       
    171         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY_"+toString(i));
    172         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"  ", "    in_BRANCH_COMPLETE_DIRECTION_"+toString(i));     
    173       }
    174 
    175     vhdl.set_body_component ("component_Two_Level_Branch_Predictor_1",_name+"_Two_Level_Branch_Predictor_1",list_port_map);
    176 
    177     // =====[ component_Two_Level_Branch_Predictor_0 ]====================   
    178 
    179     list_port_map.clear();
    180     log_printf(INFO,Meta_Predictor,"vhdl_body","Instanciation : component_Two_Level_Branch_Predictor_0");
    181    
    182     // Instantiation
    183     vhdl.set_body_component_port_map (list_port_map,"in_CLOCK ","in_CLOCK ");
    184     vhdl.set_body_component_port_map (list_port_map,"in_NRESET","in_NRESET");
    185    
    186     for (uint32_t i=0; i<_param._nb_prediction; i++)
    187       {
    188         vhdl.set_body_component_port_map (list_port_map," in_PREDICT_VAL_"+toString(i)+"                ", "    in_PREDICT_VAL_"+toString(i));
    189         vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_ACK_"+toString(i)+"                ", "signal_PREDICT_PREDICTOR_0_ACK_"+toString(i));
    190         vhdl.set_body_component_port_map (list_port_map," in_PREDICT_ADDRESS_"+toString(i)+"            ", "    in_PREDICT_ADDRESS_"+toString(i));
    191         if (_param._predictor_0_have_bht)                                                                                     
    192         vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_BHT_HISTORY_"+toString(i)+"        ", "signal_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i));
    193         if (_param._predictor_0_have_pht)
    194         vhdl.set_body_component_port_map (list_port_map,"out_PREDICT_PHT_HISTORY_"+toString(i)+"        ", "signal_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i));
    195       }
    196    
    197     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    198       {
    199         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_VAL_"+toString(i)+"        ", "    in_BRANCH_COMPLETE_VAL_"+toString(i));
    200         vhdl.set_body_component_port_map (list_port_map,"out_BRANCH_COMPLETE_ACK_"+toString(i)+"        ", "signal_BRANCH_COMPLETE_PREDICTOR_0_ACK_"+toString(i));
    201         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+"    ", "    in_BRANCH_COMPLETE_ADDRESS_"+toString(i));
    202         if (_param._predictor_0_have_bht)                                                                                       
    203         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY_"+toString(i));
    204         if (_param._predictor_0_have_pht)                                                                                       
    205         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i)+"", "signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY_"+toString(i));
    206         vhdl.set_body_component_port_map (list_port_map," in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"  ", "    in_BRANCH_COMPLETE_DIRECTION_"+toString(i));     
    207       }
    208 
    209     vhdl.set_body_component ("component_Two_Level_Branch_Predictor_0",_name+"_Two_Level_Branch_Predictor_0",list_port_map);
    210       }
    21121
    21222    log_printf(FUNC,Meta_Predictor,"vhdl_body","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/src/Meta_Predictor_vhdl_declaration.cpp

    r5 r44  
    1616
    1717
    18   void Meta_Predictor::vhdl_declaration (Vhdl & vhdl)
     18  void Meta_Predictor::vhdl_declaration (Vhdl * & vhdl)
    1919  {
    2020    log_printf(FUNC,Meta_Predictor,"vhdl_declaration","Begin");
    21 
    22     for (uint32_t i=0; i<_param._nb_prediction; i++)
    23       {
    24         if (_param._have_meta_predictor)
    25           {                                                                                                                   
    26         vhdl.set_signal("signal_PREDICT_PREDICTOR_0_ACK_"+toString(i)+"", 1);
    27         vhdl.set_signal("signal_PREDICT_PREDICTOR_1_ACK_"+toString(i)+"", 1);
    28           }
    29         vhdl.set_signal("signal_PREDICT_PREDICTOR_2_ACK_"+toString(i)+"", 1);
    30 
    31         if (_param._have_meta_predictor)
    32           {                                                                                                                   
    33         if (_param._predictor_0_have_bht)
    34         vhdl.set_signal("signal_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i)+"", _param._predictor_0_bht_size_shifter);
    35         if (_param._predictor_0_have_pht)
    36         vhdl.set_signal("signal_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i)+"", _param._predictor_0_pht_size_counter);
    37         if (_param._predictor_1_have_bht)
    38         vhdl.set_signal("signal_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i)+"", _param._predictor_1_bht_size_shifter);
    39         if (_param._predictor_1_have_pht)
    40         vhdl.set_signal("signal_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i)+"", _param._predictor_1_pht_size_counter);
    41           }
    42         if (_param._predictor_2_have_bht)
    43         vhdl.set_signal("signal_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i)+"", _param._predictor_2_bht_size_shifter);
    44         if (_param._predictor_2_have_pht)
    45         vhdl.set_signal("signal_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i)+"", _param._predictor_2_pht_size_counter);
    46       }
    47 
    48     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    49       {
    50         if (_param._have_meta_predictor)
    51           {                                                                                                                   
    52         vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_0_ACK_"+toString(i)+"      ", 1);
    53         vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_1_ACK_"+toString(i)+"      ", 1);
    54         vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_2_VAL_"+toString(i)+"      ", 1);
    55         vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION_"+toString(i)+"", 1);
    56           }
    57         vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_2_ACK_"+toString(i)+"      ", 1);
    58 
    59         if (_param._have_meta_predictor)
    60           {                                                                                                                   
    61         if (_param._predictor_0_have_bht)
    62         vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY_"+toString(i)+"", _param._predictor_0_bht_size_shifter);
    63         if (_param._predictor_0_have_pht)
    64         vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY_"+toString(i)+"", _param._predictor_0_pht_size_counter);
    65         if (_param._predictor_1_have_bht)
    66         vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY_"+toString(i)+"", _param._predictor_1_bht_size_shifter);
    67         if (_param._predictor_1_have_pht)
    68         vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY_"+toString(i)+"", _param._predictor_1_pht_size_counter);
    69           }
    70         if (_param._predictor_2_have_bht)
    71         vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY_"+toString(i)+"", _param._predictor_2_bht_size_shifter);
    72         if (_param._predictor_2_have_pht)
    73         vhdl.set_signal("signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY_"+toString(i)+"", _param._predictor_2_pht_size_counter);
    74       }
    75 
    7621
    7722    log_printf(FUNC,Meta_Predictor,"vhdl_declaration","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/src/Meta_Predictor_vhdl_testbench_transition.cpp

    r15 r44  
    2020    log_printf(FUNC,Meta_Predictor,"vhdl_testbench_transition","Begin");
    2121
    22     // Evaluation before read the ouput signal
    23     sc_start(0);
     22//  sc_start(0);
    2423
    25     // In order with file Meta_Predictor_vhdl_testbench_port.cpp
    26     // Warning : if a output depend of a subcomponent, take directly the port of subcomponent
    27     // (because we have no control on the ordonnancer's policy)
    28 
    29     _vhdl_testbench->add_input (PORT_READ( in_NRESET));
    30 
    31     for (uint32_t i=0; i<_param._nb_prediction; i++)
    32       {
    33         _vhdl_testbench->add_input (PORT_READ( in_PREDICT_VAL                          [i]));
    34         _vhdl_testbench->add_output(PORT_READ(out_PREDICT_ACK                          [i]));
    35         _vhdl_testbench->add_input (PORT_READ( in_PREDICT_ADDRESS                      [i]));
    36         _vhdl_testbench->add_output(PORT_READ(out_PREDICT_HISTORY                      [i]));
    37         _vhdl_testbench->add_output(PORT_READ(out_PREDICT_DIRECTION                    [i]));
    38       }
    39 
    40     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
    41       {
    42         _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_VAL                  [i]));
    43         _vhdl_testbench->add_output(PORT_READ(out_BRANCH_COMPLETE_ACK                  [i]));
    44         _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_ADDRESS              [i]));
    45         _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_HISTORY              [i]));
    46         _vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_DIRECTION            [i]));
    47       }
    48    
    49     // add_test :
    50     //  - True  : the cycle must be compare with the output of systemC
    51     //  - False : no test
    52     _vhdl_testbench->add_test(true);
    53 
    54     _vhdl_testbench->new_cycle (); // always at the end
     24    _interfaces->testbench();
    5525
    5626    log_printf(FUNC,Meta_Predictor,"vhdl_testbench_transition","End");
Note: See TracChangeset for help on using the changeset viewer.