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

Last change on this file since 48 was 48, checked in by rosiere, 17 years ago

Modification des Makefile : pas de creation inutile de shell

File size: 2.3 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
10#include "Common/include/BitManipulation.h"
11
12namespace morpheo                    {
13namespace behavioural {
14namespace core {
15namespace multi_front_end {
16namespace front_end {
17namespace prediction_unit {
18namespace direction {
19
20namespace meta_predictor {
21namespace meta_predictor_glue {
22
23  void Meta_Predictor_Glue::genMealy_branch_complete_history (void)
24  {
25    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_branch_complete_history","Begin");
26   
27    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
28      {
29        Thistory_t     history = PORT_READ(in_BRANCH_COMPLETE_HISTORY [i]);
30
31        if (_param._have_meta_predictor)
32          {
33        if (_param._predictor_0_have_bht) 
34        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));
35        if (_param._predictor_0_have_pht)
36        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));
37          }
38
39        if (_param._predictor_1_have_bht)
40        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));
41        if (_param._predictor_1_have_pht)
42        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));
43
44        if (_param._predictor_2_have_bht)
45        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));
46        if (_param._predictor_2_have_pht)
47        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));
48      }
49
50    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_branch_complete_history","End");
51  };
52
53}; // end namespace meta_predictor_glue
54}; // end namespace meta_predictor
55
56}; // end namespace core
57}; // end namespace multi_front_end
58}; // end namespace front_end
59}; // end namespace prediction_unit
60}; // end namespace direction
61
62}; // end namespace behavioural
63}; // end namespace morpheo             
64#endif
Note: See TracBrowser for help on using the repository browser.