source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_pht_address.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.0 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/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_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 two_level_branch_predictor {
22namespace two_level_branch_predictor_glue {
23
24  void Two_Level_Branch_Predictor_Glue::genMealy_branch_complete_pht_address (void)
25  {
26    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_branch_complete_address","Begin");
27
28    if (_param._have_pht)
29      for (uint32_t i=0; i<_param._nb_branch_complete; i++)
30        {
31          // Address
32          Taddress_t     address = PORT_READ(in_BRANCH_COMPLETE_ADDRESS [i]);
33          Tbht_history_t history = 0;
34         
35          if (_param._have_bht)
36            {
37              history = PORT_READ (in_BRANCH_COMPLETE_BHT_HISTORY [i]);
38              address = address << _param._pht_size_address_shift;
39            }
40
41          Taddress_t     pht_address = (history ^ address) & gen_mask<Taddress_t>(_param._pht_size_address);
42
43          log_printf(TRACE,Two_Level_Branch_Predictor_Glue,"genMealy_branch_complete_address","out_BRANCH_COMPLETE_PHT_ADDRESS [%d]= %.8x xor %.8x<<%d = %.8x",i,history,PORT_READ(in_BRANCH_COMPLETE_ADDRESS [i]),_param._pht_size_address_shift, pht_address);
44         
45          PORT_WRITE (out_BRANCH_COMPLETE_PHT_ADDRESS [i], pht_address);
46        }
47   
48    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_branch_complete_address","End");
49  };
50
51}; // end namespace two_level_branch_predictor_glue
52}; // end namespace two_level_branch_predictor
53}; // end namespace meta_predictor
54
55}; // end namespace core
56}; // end namespace multi_front_end
57}; // end namespace front_end
58}; // end namespace prediction_unit
59}; // end namespace direction
60
61}; // end namespace behavioural
62}; // end namespace morpheo             
63#endif
Note: See TracBrowser for help on using the repository browser.