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_predict_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: 1.6 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_predict_pht_address (void)
25  {
26    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_predict_address","Begin");
27
28    if (_param._have_pht)
29      for (uint32_t i=0; i<_param._nb_prediction; i++)
30        {
31          // Address
32          Taddress_t address = PORT_READ(in_PREDICT_ADDRESS [i]);
33          Tbht_history_t history = 0;
34         
35          if (_param._have_bht)
36            {
37              history = PORT_READ (in_PREDICT_BHT_HISTORY [i]);
38              address = address << _param._pht_size_address_shift;
39            }
40         
41          PORT_WRITE (out_PREDICT_PHT_ADDRESS [i], (history xor address) & gen_mask<Taddress_t>(_param._pht_size_address));
42        }
43   
44    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_predict_address","End");
45  };
46
47}; // end namespace two_level_branch_predictor_glue
48}; // end namespace two_level_branch_predictor
49}; // end namespace meta_predictor
50
51}; // end namespace core
52}; // end namespace multi_front_end
53}; // end namespace front_end
54}; // end namespace prediction_unit
55}; // end namespace direction
56
57}; // end namespace behavioural
58}; // end namespace morpheo             
59#endif
Note: See TracBrowser for help on using the repository browser.