Ignore:
Timestamp:
Jul 30, 2010, 4:47:27 PM (14 years ago)
Author:
rosiere
Message:
  • Add test for all configuration
  • RAT : add rat scheme (depth_save)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat.cpp

    r138 r139  
    55namespace behavioural {
    66
    7   Stat::Stat (std::string name_instance,
    8               std::string name_component,
     7  Stat::Stat (std::string             name_instance,
     8              std::string             name_component,
    99              Parameters_Statistics * param):
    1010    _name_instance         (name_instance),
     
    1616    _generate_file = true;
    1717
    18     _list_operand  = new std::map<std::string, var_t>;
    19     _list_expr     = new std::list<expr_t>;
    20     _list_stat     = new std::list<Stat *>;
    21     _list_counters = new std::list<counters_t *>;
     18    _list_operand         = new std::map<std::string, var_t>;
     19    _list_expr_per_cycle  = new std::list<expr_t>;
     20    _list_expr_per_period = new std::list<expr_t>;
     21    _list_stat            = new std::list<Stat *>;
     22    _list_counters        = new std::list<counters_t *>;
    2223
    23     _cycle         = create_variable("cycle");
    24 //  _cycle         = create_counter("cycle","","");
    25     *_cycle        = 0; // for the first period
     24    _cycle                = create_variable("cycle");
     25//  _cycle                = create_counter("cycle","","");
     26    *_cycle               = 0; // for the first period
    2627  }
    2728
    2829  Stat::Stat (std::string name_instance,
    2930              std::string name_component,
    30               cycle_t nb_cycle_before_begin,
    31               cycle_t period):
     31              cycle_t     nb_cycle_before_begin,
     32              cycle_t     period):
    3233    _name_instance         (name_instance),
    3334    _name_component        (name_component),
     
    3839    _generate_file = true;
    3940
    40     _list_operand  = new std::map<std::string, var_t>;
    41     _list_expr     = new std::list<expr_t>;
    42     _list_stat     = new std::list<Stat *>;
    43     _list_counters = new std::list<counters_t *>;
     41    _list_operand         = new std::map<std::string, var_t>;
     42    _list_expr_per_cycle  = new std::list<expr_t>;
     43    _list_expr_per_period = new std::list<expr_t>;
     44    _list_stat            = new std::list<Stat *>;
     45    _list_counters        = new std::list<counters_t *>;
    4446
    45     _cycle         = create_variable("cycle");
    46 //  _cycle         = create_counter("cycle","","");
    47     *_cycle        = 0; // for the first period
     47    _cycle                = create_variable("cycle");
     48//  _cycle                = create_counter("cycle","","");
     49    *_cycle               = 0; // for the first period
    4850  }
    4951
     
    6365
    6466    // parcourir la liste et desallouer les arbres
    65     for (std::list<expr_t>::iterator i=_list_expr->begin();
    66          i!= _list_expr->end();
     67    for (std::list<expr_t>::iterator i=_list_expr_per_cycle->begin();
     68         i!= _list_expr_per_cycle->end();
    6769         ++i)
    6870      {
    6971        delete i->expression;
    7072      }
    71     delete _list_expr;
     73    delete _list_expr_per_cycle;
     74
     75    for (std::list<expr_t>::iterator i=_list_expr_per_period->begin();
     76         i!= _list_expr_per_period->end();
     77         ++i)
     78      {
     79        delete i->expression;
     80      }
     81    delete _list_expr_per_period;
    7282
    7383    // parcourir la liste et desallouer les arbres
Note: See TracChangeset for help on using the changeset viewer.