source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters_print.cpp @ 146

Last change on this file since 146 was 146, checked in by rosiere, 13 years ago

1) Integration of RegisterFile_Internal_Banked in RegisterFile?
2) Erase "read_write" interface in RegisterFile_Monolithic component
3) Add smith predictor parameters in Load_store_pointer_unit.
4) Fix not statistics flags

  • Property svn:keywords set to Id
File size: 6.7 KB
Line 
1/*
2 * $Id: Parameters_print.cpp 146 2011-02-01 20:57:54Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Parameters.h"
9#include "Behavioural/include/XML.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace prediction_unit {
17
18
19#undef  FUNCTION
20#define FUNCTION "Prediction_unit::print"
21  std::string Parameters::print (uint32_t depth)
22  {
23    log_printf(FUNC,Prediction_unit,FUNCTION,"Begin");
24
25    XML xml ("prediction_unit");
26
27    xml.balise_open("prediction_unit");
28    xml.singleton_begin("nb_context                            "); xml.attribut("value",toString(_nb_context                            )); xml.singleton_end();
29    xml.singleton_begin("nb_decod_unit                         "); xml.attribut("value",toString(_nb_decod_unit                         )); xml.singleton_end();
30    xml.singleton_begin("size_address                          "); xml.attribut("value",toString(_size_address                          )); xml.singleton_end();
31    xml.singleton_begin("nb_inst_branch_predict                "); xml.attribut("value",toString(_nb_inst_branch_predict                )); xml.singleton_end();
32    xml.singleton_begin("nb_inst_branch_decod                  "); xml.attribut("value",toString(_nb_inst_branch_decod                  )); xml.singleton_end();
33    xml.singleton_begin("nb_inst_branch_update                 "); xml.attribut("value",toString(_nb_inst_branch_update                 )); xml.singleton_end();
34    xml.singleton_begin("nb_inst_branch_complete               "); xml.attribut("value",toString(_nb_inst_branch_complete               )); xml.singleton_end();
35    xml.singleton_begin("btb_size_queue                        "); xml.attribut("value",toString(_btb_size_queue                        )); xml.singleton_end();
36    xml.singleton_begin("btb_associativity                     "); xml.attribut("value",toString(_btb_associativity                     )); xml.singleton_end();
37    xml.singleton_begin("btb_size_counter                      "); xml.attribut("value",toString(_btb_size_counter                      )); xml.singleton_end();
38    xml.singleton_begin("btb_victim_scheme                     "); xml.attribut("value",toString(_btb_victim_scheme                     )); xml.singleton_end();
39    xml.singleton_begin("dir_predictor_scheme                  "); xml.attribut("value",toString(_dir_predictor_scheme                  )); xml.singleton_end();
40    xml.comment("predictor_scheme : ");
41    xml.comment(" * predictor_never_take  : don't use \"predictor_{0,1,2}\" parameters.");
42    xml.comment(" * predictor_always_take : don't use \"predictor_{0,1,2}\" parameters.");
43    xml.comment(" * predictor_static      : don't use \"predictor_{0,1,2}\" parameters.");
44    xml.comment(" * predictor_last_take   : don't use \"predictor_{0,1,2}\" parameters.");
45    xml.comment(" * predictor_counter     :       use \"predictor_0\"       parameters.");
46    xml.comment(" * predictor_local       :       use \"predictor_0\"       parameters.");
47    xml.comment(" * predictor_global      :       use \"predictor_0\"       parameters.");
48    xml.comment(" * predictor_meta        :       use \"predictor_{0,1,2}\" parameters.");
49    xml.comment(" * predictor_custom      :       use \"predictor_{0,1,2}\" parameters.");
50    for (uint32_t i=0; i<3; i++)
51      {
52        xml.singleton_begin("dir_predictor_"+toString(i)+"_have_bht              "); xml.attribut("value",toString(_dir_have_bht               [i])); xml.singleton_end();
53        xml.singleton_begin("dir_predictor_"+toString(i)+"_bht_size_shifter      "); xml.attribut("value",toString(_dir_bht_size_shifter       [i])); xml.singleton_end();
54        xml.singleton_begin("dir_predictor_"+toString(i)+"_bht_nb_shifter        "); xml.attribut("value",toString(_dir_bht_nb_shifter         [i])); xml.singleton_end();
55        xml.singleton_begin("dir_predictor_"+toString(i)+"_have_pht              "); xml.attribut("value",toString(_dir_have_pht               [i])); xml.singleton_end();
56        xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_size_counter      "); xml.attribut("value",toString(_dir_pht_size_counter       [i])); xml.singleton_end();
57        xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_nb_counter        "); xml.attribut("value",toString(_dir_pht_nb_counter         [i])); xml.singleton_end();
58        xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_size_address_share"); xml.attribut("value",toString(_dir_pht_size_address_share [i])); xml.singleton_end();
59        xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_scheme            "); xml.attribut("value",toString(_dir_pht_scheme             [i])); xml.singleton_end();
60      }
61
62    for (uint32_t i=0;i<_nb_context; i++)
63      {
64        xml. balise_open_begin("component");
65        xml.  attribut("type","context");
66        xml.  attribut("id"  ,toString(i));
67        xml. balise_open_end();
68        xml.  singleton_begin("nb_instruction                        "); xml.attribut("value",toString(_nb_instruction                     [i])); xml.singleton_end();
69        xml.  singleton_begin("ras_size_queue                        "); xml.attribut("value",toString(_ras_size_queue                     [i])); xml.singleton_end();
70        xml.  singleton_begin("upt_size_queue                        "); xml.attribut("value",toString(_upt_size_queue                     [i])); xml.singleton_end();
71        xml.  singleton_begin("ufpt_size_queue                       "); xml.attribut("value",toString(_ufpt_size_queue                    [i])); xml.singleton_end();
72        xml. balise_close();
73      }
74
75    for (uint32_t i=0;i<_nb_decod_unit; i++)
76      {
77        xml. balise_open_begin("component");
78        xml.  attribut("type","decod_unit");
79        xml.  attribut("id"  ,toString(i));
80        xml. balise_open_end();
81        xml.  singleton_begin("nb_inst_decod                         "); xml.attribut("value",toString(_nb_inst_decod                      [i])); xml.singleton_end();
82        xml. balise_close();
83      }
84
85
86    xml.balise_close();
87
88    log_printf(FUNC,Prediction_unit,FUNCTION,"End");
89   
90    return xml.get_body(depth);
91  };
92
93#undef  FUNCTION
94#define FUNCTION "Prediction_unit::operator<<"
95  std::ostream& operator<< (std::ostream& output_stream ,
96                            morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Parameters & x)
97  {
98    log_printf(FUNC,Prediction_unit,FUNCTION,"Begin");
99
100    output_stream << x.print(0);
101   
102    log_printf(FUNC,Prediction_unit,FUNCTION,"End");
103
104    return output_stream;
105  };
106
107}; // end namespace prediction_unit
108}; // end namespace front_end
109}; // end namespace multi_front_end
110}; // end namespace core
111
112}; // end namespace behavioural
113}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.