Ignore:
Timestamp:
Jul 5, 2007, 5:50:19 PM (17 years ago)
Author:
rosiere
Message:

Modification des classes d'encapsulation des interfaces :

  • gère les signaux à écrire dans le vhdl
  • les traces pour le testbench
  • la génération des vhdl structurelles

-> test sur la Pattern History Table

File:
1 edited

Legend:

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

    r2 r42  
    1818
    1919
    20   void Two_Level_Branch_Predictor_Glue::vhdl_body (Vhdl & vhdl)
     20  void Two_Level_Branch_Predictor_Glue::vhdl_body (Vhdl * & vhdl)
    2121  {
    2222    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_body","Begin");
    2323
    24     vhdl.set_body ("-- ack output");
     24    vhdl->set_body ("-- ack output");
    2525    for (uint32_t i=0; i<_param._nb_prediction; i++)
    2626      {
     
    2828
    2929        if (_param._have_bht)
    30           bht_ack = "in_PREDICT_BHT_ACK_"+toString(i);
     30          bht_ack = "in_PREDICT_"+toString(i)+"_BHT_ACK";
    3131        else
    3232          bht_ack = "'1'";
    3333
    3434        if (_param._have_pht)
    35           pht_ack = "in_PREDICT_PHT_ACK_"+toString(i);
     35          pht_ack = "in_PREDICT_"+toString(i)+"_PHT_ACK";
    3636        else
    3737          pht_ack = "'1'";
    3838
    39         vhdl.set_body ("out_PREDICT_ACK_"+toString(i)+"         <= "+bht_ack+" and "+pht_ack+";");
     39        vhdl->set_body ("out_PREDICT_"+toString(i)+"_ACK         <= "+bht_ack+" and "+pht_ack+";");
    4040      }
    4141
     
    4545
    4646        if (_param._have_bht)
    47           bht_ack = "in_BRANCH_COMPLETE_BHT_ACK_"+toString(i);
     47          bht_ack = "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_ACK";
    4848        else
    4949          bht_ack = "'1'";
    5050
    5151        if (_param._have_pht)
    52           pht_ack = "in_BRANCH_COMPLETE_PHT_ACK_"+toString(i);
     52          pht_ack = "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_ACK";
    5353        else
    5454          pht_ack = "'1'";
    5555
    56         vhdl.set_body ("out_BRANCH_COMPLETE_ACK_"+toString(i)+" <= "+bht_ack+" and "+pht_ack+";");
     56        vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_ACK <= "+bht_ack+" and "+pht_ack+";");
    5757      }
    5858   
    59     vhdl.set_body ("");
    60     vhdl.set_body ("-- address output");
     59    vhdl->set_body ("");
     60    vhdl->set_body ("-- address output");
    6161
    6262    for (uint32_t i=0; i<_param._nb_prediction; i++)
     
    6464        // The address is higher than the address size of bht
    6565        if (_param._have_bht)
    66           vhdl.set_body ("out_PREDICT_BHT_ADDRESS_"+toString(i)+" <= in_PREDICT_ADDRESS_"+toString(i)+std_logic_range(_param._bht_size_address)+";");
     66          vhdl->set_body ("out_PREDICT_"+toString(i)+"_BHT_ADDRESS <= in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._bht_size_address)+";");
    6767
    6868        if (_param._have_pht)
     
    9393                  {
    9494                    min = _param._pht_size_address_shift;
    95                     vhdl.set_body ("out_PREDICT_PHT_ADDRESS_"+toString(i)+std_logic_range(min) + " <=  in_PREDICT_BHT_HISTORY_"+toString(i)+std_logic_range(min)+";");
     95                    vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(min) + " <=  in_PREDICT_"+toString(i)+"_BHT_HISTORY"+std_logic_range(min)+";");
    9696                  }
    9797
     
    9999                  {
    100100                    max = _param._bht_size_history;
    101                     vhdl.set_body ("out_PREDICT_PHT_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address-1,max) + " <=  in_PREDICT_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address-1-_param._pht_size_address_shift, _param._pht_size_address_share)+";");
     101                    vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(_param._pht_size_address-1,max) + " <=  in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address-1-_param._pht_size_address_shift, _param._pht_size_address_share)+";");
    102102                  }
    103103               
    104104                // intersection
    105105                if (_param._pht_size_address_share > 0)
    106                   vhdl.set_body ("out_PREDICT_PHT_ADDRESS_"+toString(i)+std_logic_range(max-1,min) + " <=  in_PREDICT_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address_share-1,0)+" xor in_PREDICT_BHT_HISTORY_"+toString(i)+std_logic_range(max-1,min)+";");
     106                  vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(max-1,min) + " <=  in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address_share-1,0)+" xor in_PREDICT_"+toString(i)+"_BHT_HISTORY"+std_logic_range(max-1,min)+";");
    107107              }
    108108            else
    109               vhdl.set_body ("out_PREDICT_PHT_ADDRESS_"+toString(i)+" <=  in_PREDICT_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address)+";");
     109              vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS <=  in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address)+";");
    110110          }
    111111      }
     
    115115        // The address is higher than the address size of bht
    116116        if (_param._have_bht)
    117           vhdl.set_body ("out_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i)+" <= in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+std_logic_range(_param._bht_size_address)+";");
     117          vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_BHT_ADDRESS <= in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._bht_size_address)+";");
    118118
    119119        if (_param._have_pht)
     
    129129                  {
    130130                    min = _param._pht_size_address_shift;
    131                     vhdl.set_body ("out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+std_logic_range(min) + " <=  in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+std_logic_range(min)+";");
     131                    vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(min) + " <=  in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY"+std_logic_range(min)+";");
    132132                  }
    133133
     
    135135                  {
    136136                    max = _param._bht_size_history;
    137                     vhdl.set_body ("out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address-1,max) + " <=  in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address-1-_param._pht_size_address_shift, _param._pht_size_address_share)+";");
     137                    vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(_param._pht_size_address-1,max) + " <=  in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address-1-_param._pht_size_address_shift, _param._pht_size_address_share)+";");
    138138                  }
    139139               
    140140                // intersection
    141141                if (_param._pht_size_address_share > 0)
    142                   vhdl.set_body ("out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+std_logic_range(max-1,min) + " <=  in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address_share-1,0)+" xor in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+std_logic_range(max-1,min)+";");
     142                  vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(max-1,min) + " <=  in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address_share-1,0)+" xor in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY"+std_logic_range(max-1,min)+";");
    143143              }
    144144            else
    145               vhdl.set_body ("out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+" <=  in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address)+";");
     145              vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS <=  in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address)+";");
    146146          }
    147147      }
Note: See TracChangeset for help on using the changeset viewer.