source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_binary_tree_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:executable set to *
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1// #ifdef STATISTICS
2#include "Behavioural/include/Stat_binary_tree.h"
3#include "Common/include/Tabulation.h"
4
5namespace morpheo {
6namespace behavioural {
7
8  void Stat_binary_tree::print (uint32_t depth)
9  {
10    std::string tab = morpheo::tab(depth);
11    std::string sep = " ";
12    if (_data_type == NONE)
13      {
14        std::cout << tab << "<node> NONE (error)" << std::endl;
15
16        if (_left  != NULL)
17          _left ->print(depth+1);
18        if (_right != NULL)
19          _right->print(depth+1);
20      }
21
22    if ((_data_type == VARIABLE) or
23        (_data_type == CONSTANT))
24      {
25        std::cout << tab << "<leaf>"
26                  << " "
27                  << ((_left   == NULL)?"left  == NULL        ":"left  != NULL (error)")
28                  << " "
29                  << ((_right  == NULL)?"right == NULL        ":"right != NULL (error)")
30                  << std::endl;
31
32        if (_left  != NULL)
33          _left ->print(depth+1);
34        if (_right != NULL)
35          _right->print(depth+1);
36      }
37   
38    if (_data_type == OPERATOR_UNARY)
39      {
40        std::cout << tab << "<unary>"
41                  << " "
42                  << ((_left   == NULL)?"left  == NULL (error)":"left  != NULL        ")
43                  << " "
44                  << ((_right  == NULL)?"right == NULL        ":"right != NULL (error)")
45                  << std::endl;
46       
47        if (_left  != NULL)
48          _left ->print(depth+1);
49        if (_right != NULL)
50          _right->print(depth+1);
51      }
52
53    if (_data_type == OPERATOR_BINARY)
54      {
55        std::cout << tab << "<binary>"
56                  << " "
57                  << ((_left   == NULL)?"left  == NULL (error)":"left  != NULL        ")
58                  << " "
59                  << ((_right  == NULL)?"right == NULL (error)":"right != NULL        ")
60                  << std::endl;
61
62        if (_left  != NULL)
63          _left ->print(depth+1);
64        if (_right != NULL)
65          _right->print(depth+1);
66      }
67  }
68
69};
70};
71// #endif
Note: See TracBrowser for help on using the repository browser.