source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_branch_complete_history.cpp @ 45

Last change on this file since 45 was 45, checked in by rosiere, 17 years ago
  • Documentation : specification d'un cache de donnée non bloquant
  • Modification de l'aborescence
File size: 2.2 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
10#include "Common/include/BitManipulation.h"
11
12namespace morpheo                    {
13namespace behavioural {
14namespace stage_1_ifetch {
15namespace predictor {
16namespace meta_predictor {
17namespace meta_predictor_glue {
18
19  void Meta_Predictor_Glue::genMealy_branch_complete_history (void)
20  {
21    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_branch_complete_history","Begin");
22   
23    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
24      {
25        Thistory_t     history = PORT_READ(in_BRANCH_COMPLETE_HISTORY [i]);
26
27        if (_param._have_meta_predictor)
28          {
29        if (_param._predictor_0_have_bht) 
30        PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i], (history >> _param._shift_0) & gen_mask<Tbht_history_t>(_param._predictor_0_bht_size_shifter));
31        if (_param._predictor_0_have_pht)
32        PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i], (history >> _param._shift_1) & gen_mask<Tpht_history_t>(_param._predictor_0_pht_size_counter));
33          }
34
35        if (_param._predictor_1_have_bht)
36        PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i], (history >> _param._shift_2) & gen_mask<Tbht_history_t>(_param._predictor_1_bht_size_shifter));
37        if (_param._predictor_1_have_pht)
38        PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i], (history >> _param._shift_3) & gen_mask<Tpht_history_t>(_param._predictor_1_pht_size_counter));
39
40        if (_param._predictor_2_have_bht)
41        PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i], (history >> _param._shift_4) & gen_mask<Tbht_history_t>(_param._predictor_2_bht_size_shifter));
42        if (_param._predictor_2_have_pht)
43        PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i], (history >> _param._shift_5) & gen_mask<Tpht_history_t>(_param._predictor_2_pht_size_counter));
44      }
45
46    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_branch_complete_history","End");
47  };
48
49}; // end namespace meta_predictor_glue
50}; // end namespace meta_predictor
51}; // end namespace predictor
52}; // end namespace stage_1_ifetch
53}; // end namespace behavioural
54}; // end namespace morpheo             
55#endif
Note: See TracBrowser for help on using the repository browser.