source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Parameters_print.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: 6.7 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h"
9#include "Behavioural/include/XML.h"
10using namespace std;
11
12namespace morpheo                    {
13namespace behavioural {
14namespace core {
15namespace multi_front_end {
16namespace front_end {
17namespace prediction_unit {
18namespace direction {
19
20namespace meta_predictor {
21
22
23  string Parameters::print (uint32_t depth)
24  {
25    log_printf(FUNC,Meta_Predictor,"print","Begin");
26
27    uint32_t size_predictor_0 = _predictor_0_bht_size_shifter*_predictor_0_bht_nb_shifter+_predictor_0_pht_size_counter*_predictor_0_pht_nb_counter;
28    uint32_t size_predictor_1 = _predictor_1_bht_size_shifter*_predictor_1_bht_nb_shifter+_predictor_1_pht_size_counter*_predictor_1_pht_nb_counter;
29    uint32_t size_predictor_2 = _predictor_2_bht_size_shifter*_predictor_2_bht_nb_shifter+_predictor_2_pht_size_counter*_predictor_2_pht_nb_counter;
30    uint32_t size_predictor   = size_predictor_0+size_predictor_1+size_predictor_2;
31
32    XML xml ("meta_predictor");
33    xml.balise_open("meta_predictor");
34
35    xml.  text("");
36    xml.  comment("size predictor   : "+toString(size_predictor  )+" bits");
37    xml.  comment("size predictor_0 : "+toString(size_predictor_0)+" bits");
38    xml.  comment("size predictor_1 : "+toString(size_predictor_1)+" bits");
39    xml.  comment("size predictor_2 : "+toString(size_predictor_2)+" bits");
40    xml.  text("");
41
42    xml.  singleton_begin("have_meta_predictor               ");               
43    xml.    attribut("value",toString(_have_meta_predictor               ));
44    xml.  singleton_end();
45
46    xml.  singleton_begin("predictor_0_have_bht              ");               
47    xml.    attribut("value",toString(_predictor_0_have_bht              ));
48    xml.  singleton_end();
49    xml.  singleton_begin("predictor_0_bht_size_shifter      ");       
50    xml.    attribut("value",toString(_predictor_0_bht_size_shifter      ));
51    xml.  singleton_end();
52    xml.  singleton_begin("predictor_0_bht_nb_shifter        ");       
53    xml.    attribut("value",toString(_predictor_0_bht_nb_shifter        ));
54    xml.  singleton_end();
55    xml.  singleton_begin("predictor_0_have_pht              ");             
56    xml.    attribut("value",toString(_predictor_0_have_pht              ));
57    xml.  singleton_end();
58    xml.  singleton_begin("predictor_0_pht_size_counter      ");     
59    xml.    attribut("value",toString(_predictor_0_pht_size_counter      ));
60    xml.  singleton_end();
61    xml.  singleton_begin("predictor_0_pht_nb_counter        ");       
62    xml.    attribut("value",toString(_predictor_0_pht_nb_counter        ));
63    xml.  singleton_end();
64    xml.  singleton_begin("predictor_0_pht_size_address_share");
65    xml.    attribut("value",toString(_predictor_0_pht_size_address_share));
66    xml.  singleton_end();
67
68    xml.  singleton_begin("predictor_1_have_bht              ");               
69    xml.    attribut("value",toString(_predictor_1_have_bht              ));
70    xml.  singleton_end();
71    xml.  singleton_begin("predictor_1_bht_size_shifter      ");       
72    xml.    attribut("value",toString(_predictor_1_bht_size_shifter      ));
73    xml.  singleton_end();
74    xml.  singleton_begin("predictor_1_bht_nb_shifter        ");       
75    xml.    attribut("value",toString(_predictor_1_bht_nb_shifter        ));
76    xml.  singleton_end();
77    xml.  singleton_begin("predictor_1_have_pht              ");             
78    xml.    attribut("value",toString(_predictor_1_have_pht              ));
79    xml.  singleton_end();
80    xml.  singleton_begin("predictor_1_pht_size_counter      ");     
81    xml.    attribut("value",toString(_predictor_1_pht_size_counter      ));
82    xml.  singleton_end();
83    xml.  singleton_begin("predictor_1_pht_nb_counter        ");       
84    xml.    attribut("value",toString(_predictor_1_pht_nb_counter        ));
85    xml.  singleton_end();
86    xml.  singleton_begin("predictor_1_pht_size_address_share");
87    xml.    attribut("value",toString(_predictor_1_pht_size_address_share));
88    xml.  singleton_end();
89   
90    xml.  singleton_begin("predictor_2_have_bht              ");               
91    xml.    attribut("value",toString(_predictor_2_have_bht              ));
92    xml.  singleton_end();
93    xml.  singleton_begin("predictor_2_bht_size_shifter      ");       
94    xml.    attribut("value",toString(_predictor_2_bht_size_shifter      ));
95    xml.  singleton_end();
96    xml.  singleton_begin("predictor_2_bht_nb_shifter        ");       
97    xml.    attribut("value",toString(_predictor_2_bht_nb_shifter        ));
98    xml.  singleton_end();
99    xml.  singleton_begin("predictor_2_have_pht              ");             
100    xml.    attribut("value",toString(_predictor_2_have_pht              ));
101    xml.  singleton_end();
102    xml.  singleton_begin("predictor_2_pht_size_counter      ");     
103    xml.    attribut("value",toString(_predictor_2_pht_size_counter      ));
104    xml.  singleton_end();
105    xml.  singleton_begin("predictor_2_pht_nb_counter        ");       
106    xml.    attribut("value",toString(_predictor_2_pht_nb_counter        ));
107    xml.  singleton_end();
108    xml.  singleton_begin("predictor_2_pht_size_address_share");
109    xml.    attribut("value",toString(_predictor_2_pht_size_address_share));
110    xml.  singleton_end();
111       
112    xml.  singleton_begin("size_address                      ");                     
113    xml.    attribut("value",toString(_size_address          ));
114    xml.  singleton_end();
115    xml.  singleton_begin("nb_prediction                     ");                     
116    xml.    attribut("value",toString(_nb_prediction         ));
117    xml.  singleton_end();
118    xml.  singleton_begin("nb_branch_complete                ");               
119    xml.    attribut("value",toString(_nb_branch_complete    ));
120    xml.  singleton_end();
121   
122    if (_have_meta_predictor)
123      {
124    xml.  text(_param_two_level_branch_predictor_0->print(depth+1));
125    xml.  text(_param_two_level_branch_predictor_1->print(depth+1));
126      }
127    xml.  text(_param_two_level_branch_predictor_2->print(depth+1));
128    xml.  text(_param_meta_predictor_glue         ->print(depth+1));
129
130    xml.balise_close();
131
132    log_printf(FUNC,Meta_Predictor,"print","End");
133   
134    return xml.get_body(depth);
135  };
136
137  ostream& operator<< (ostream& output_stream ,
138                       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters & x)
139  {
140    output_stream << x.print(0);
141   
142    return output_stream;
143  };
144
145}; // end namespace meta_predictor
146
147}; // end namespace core
148}; // end namespace multi_front_end
149}; // end namespace front_end
150}; // end namespace prediction_unit
151}; // end namespace direction
152
153}; // end namespace behavioural
154}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.