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

Last change on this file since 95 was 95, checked in by rosiere, 15 years ago

1) Update Prediction Table - New architecture (systemC) done (and tested) -> need change interface in top level
2) Change documentation on VHDL generation
3) Change VHDL constant (case std_logic and std_logic_vector)

  • Property svn:keywords set to Id
File size: 6.5 KB
Line 
1/*
2 * $Id: Parameters_print.cpp 95 2008-12-16 16:24:26Z 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      }
60
61    for (uint32_t i=0;i<_nb_context; i++)
62      {
63        xml. balise_open_begin("component");
64        xml.  attribut("type","context");
65        xml.  attribut("id"  ,toString(i));
66        xml. balise_open_end();
67        xml.  singleton_begin("nb_instruction                        "); xml.attribut("value",toString(_nb_instruction                     [i])); xml.singleton_end();
68        xml.  singleton_begin("ras_size_queue                        "); xml.attribut("value",toString(_ras_size_queue                     [i])); xml.singleton_end();
69        xml.  singleton_begin("upt_size_queue                        "); xml.attribut("value",toString(_upt_size_queue                     [i])); xml.singleton_end();
70        xml.  singleton_begin("ufpt_size_queue                       "); xml.attribut("value",toString(_ufpt_size_queue                    [i])); xml.singleton_end();
71        xml. balise_close();
72      }
73
74    for (uint32_t i=0;i<_nb_decod_unit; i++)
75      {
76        xml. balise_open_begin("component");
77        xml.  attribut("type","decod_unit");
78        xml.  attribut("id"  ,toString(i));
79        xml. balise_open_end();
80        xml.  singleton_begin("nb_inst_decod                         "); xml.attribut("value",toString(_nb_inst_decod                      [i])); xml.singleton_end();
81        xml. balise_close();
82      }
83
84
85    xml.balise_close();
86
87    log_printf(FUNC,Prediction_unit,FUNCTION,"End");
88   
89    return xml.get_body(depth);
90  };
91
92#undef  FUNCTION
93#define FUNCTION "Prediction_unit::operator<<"
94  std::ostream& operator<< (std::ostream& output_stream ,
95                            morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Parameters & x)
96  {
97    log_printf(FUNC,Prediction_unit,FUNCTION,"Begin");
98
99    output_stream << x.print(0);
100   
101    log_printf(FUNC,Prediction_unit,FUNCTION,"End");
102
103    return output_stream;
104  };
105
106}; // end namespace prediction_unit
107}; // end namespace front_end
108}; // end namespace multi_front_end
109}; // end namespace core
110
111}; // end namespace behavioural
112}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.