source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_binary_tree_valid.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: 708 bytes
Line 
1// #ifdef STATISTICS
2#include "Behavioural/include/Stat_binary_tree.h"
3
4namespace morpheo {
5namespace behavioural {
6
7  bool Stat_binary_tree::valid (void)
8  {
9    if (_data_type == NONE)
10      return false;
11
12    if ((_data_type == VARIABLE) or
13        (_data_type == CONSTANT))
14      return ((_left  == NULL) and
15              (_right == NULL) );
16   
17    if (_data_type == OPERATOR_UNARY)
18      return ((_right == NULL) and
19              (_left  != NULL) and
20              (_left->valid()));
21
22    if (_data_type == OPERATOR_BINARY)
23      return ((_left  != NULL ) and
24              (_left ->valid()) and
25              (_right != NULL ) and
26              (_right->valid()));
27
28    return false;
29  }
30
31};
32};
33// #endif
Note: See TracBrowser for help on using the repository browser.