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

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

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1/*
2 * $Id: Parameters_print.cpp 88 2008-12-10 18:31:39Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/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 {
17namespace direction {
18
19
20#undef  FUNCTION
21#define FUNCTION "Direction::print"
22  std::string Parameters::print (uint32_t depth)
23  {
24    log_printf(FUNC,Direction,FUNCTION,"Begin");
25
26    XML xml ("direction");
27
28    xml.balise_open("direction");
29    xml.singleton_begin("predictor_scheme                  "); xml.attribut("value",toString(_predictor_scheme)); xml.singleton_end();
30    xml.singleton_begin("nb_inst_predict                   "); xml.attribut("value",toString(_nb_inst_predict )); xml.singleton_end();
31    xml.singleton_begin("nb_inst_update                    "); xml.attribut("value",toString(_nb_inst_update  )); xml.singleton_end();
32//  xml.singleton_begin("size_address                      "); xml.attribut("value",toString(_size_address    )); xml.singleton_end();
33
34    xml.comment("predictor_scheme : ");
35    xml.comment(" * predictor_never_take  : don't use \"predictor_{0,1,2}\" parameters.");
36    xml.comment(" * predictor_always_take : don't use \"predictor_{0,1,2}\" parameters.");
37    xml.comment(" * predictor_static      : don't use \"predictor_{0,1,2}\" parameters.");
38    xml.comment(" * predictor_last_take   : don't use \"predictor_{0,1,2}\" parameters.");
39    xml.comment(" * predictor_counter     :       use \"predictor_0\"       parameters.");
40    xml.comment(" * predictor_local       :       use \"predictor_0\"       parameters.");
41    xml.comment(" * predictor_global      :       use \"predictor_0\"       parameters.");
42    xml.comment(" * predictor_meta        :       use \"predictor_{0,1,2}\" parameters.");
43    xml.comment(" * predictor_custom      :       use \"predictor_{0,1,2}\" parameters.");
44    for (uint32_t i=0; i<3; i++)
45      {
46        xml.singleton_begin("predictor_"+toString(i)+"_have_bht              "); xml.attribut("value",toString(_have_bht               [i])); xml.singleton_end();
47        xml.singleton_begin("predictor_"+toString(i)+"_bht_size_shifter      "); xml.attribut("value",toString(_bht_size_shifter       [i])); xml.singleton_end();
48        xml.singleton_begin("predictor_"+toString(i)+"_bht_nb_shifter        "); xml.attribut("value",toString(_bht_nb_shifter         [i])); xml.singleton_end();
49        xml.singleton_begin("predictor_"+toString(i)+"_have_pht              "); xml.attribut("value",toString(_have_pht               [i])); xml.singleton_end();
50        xml.singleton_begin("predictor_"+toString(i)+"_pht_size_counter      "); xml.attribut("value",toString(_pht_size_counter       [i])); xml.singleton_end();
51        xml.singleton_begin("predictor_"+toString(i)+"_pht_nb_counter        "); xml.attribut("value",toString(_pht_nb_counter         [i])); xml.singleton_end();
52        xml.singleton_begin("predictor_"+toString(i)+"_pht_size_address_share"); xml.attribut("value",toString(_pht_size_address_share [i])); xml.singleton_end();
53      }
54    xml.balise_close();
55
56    log_printf(FUNC,Direction,FUNCTION,"End");
57   
58    return xml.get_body(depth);
59  };
60
61#undef  FUNCTION
62#define FUNCTION "Direction::operator<<"
63  std::ostream& operator<< (std::ostream& output_stream ,
64                            morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::Parameters & x)
65  {
66    log_printf(FUNC,Direction,FUNCTION,"Begin");
67
68    output_stream << x.print(0);
69   
70    log_printf(FUNC,Direction,FUNCTION,"End");
71
72    return output_stream;
73  };
74
75}; // end namespace direction
76}; // end namespace prediction_unit
77}; // end namespace front_end
78}; // end namespace multi_front_end
79}; // end namespace core
80
81}; // end namespace behavioural
82}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.