source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/src/Statistics_print.cpp @ 2

Last change on this file since 2 was 2, checked in by kane, 17 years ago

Import Morpheo

File size: 1.7 KB
Line 
1#ifdef STATISTICS
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Statistics.h"
10
11#include <sstream>
12using namespace std;
13
14namespace morpheo {
15namespace behavioural {
16namespace stage_1_ifetch {
17namespace predictor {
18namespace meta_predictor {
19namespace two_level_branch_predictor {
20namespace pattern_history_table {
21
22
23  string Statistics::print (uint32_t depth ,
24                            string component_stat)
25  {
26    log_printf(FUNC,Pattern_History_Table,"print","Begin");
27
28    string        tab = string(depth,'\t');
29    ostringstream msg;
30
31    msg << tab << "<pattern_history_table name=\"" << _name << "\" >" << endl
32        << print_body(depth+1)
33        << component_stat
34        << tab << "</pattern_history_table>" << endl;
35   
36    log_printf(FUNC,Pattern_History_Table,"print","End");
37
38    return msg.str();
39  };
40
41  string Statistics::print (uint32_t depth)
42  {
43    string        tab = string(depth,'\t');
44    ostringstream msg;
45
46    msg << tab << "<pattern_history_table name=\"" << _name << "\" >" << endl
47        << print_body(depth+1) << endl
48        << tab << "</pattern_history_table>" << endl;
49   
50    return msg.str();
51  };
52
53  ostream& operator<< (ostream& output_stream ,
54                       morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::pattern_history_table::Statistics & x)
55  {
56    output_stream << x.print(0);
57
58    return output_stream;
59  };
60
61}; // end namespace pattern_history_table
62}; // end namespace two_level_branch_predictor
63}; // end namespace meta_predictor
64}; // end namespace predictor
65}; // end namespace stage_1_ifetch
66
67}; // end namespace behavioural
68}; // end namespace morpheo             
69#endif
Note: See TracBrowser for help on using the repository browser.