#ifdef STATISTICS
/*
 * $Id: Execute_loop_statistics_declaration.cpp 81 2008-04-15 18:40:01Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Execute_loop.h"

namespace morpheo {
namespace behavioural {
namespace core {
namespace multi_execute_loop {
namespace execute_loop {


#undef  FUNCTION
#define FUNCTION "Execute_loop::statistics_declaration"
  void Execute_loop::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics)
  {
    log_printf(FUNC,Execute_loop,FUNCTION,"Begin");

    _stat = new Stat (static_cast<std::string>(_name),
		      "Execute_loop",
		      param_statistics);

     for (uint32_t i=0; i<_param->_nb_read_unit; i++)
       _stat->add_stat(_component_read_unit        [i]->_stat);
     for (uint32_t i=0; i<_param->_nb_functionnal_unit; i++)
       _stat->add_stat(_component_functionnal_unit [i]->_stat);
     for (uint32_t i=0; i<_param->_nb_load_store_unit; i++)
       _stat->add_stat(_component_load_store_unit  [i]->_stat);
     for (uint32_t i=0; i<_param->_nb_write_unit; i++)
       _stat->add_stat(_component_write_unit       [i]->_stat);
     _stat->add_stat(_component_read_unit_to_execution_unit ->_stat);
     _stat->add_stat(_component_execution_unit_to_write_unit->_stat);
     _stat->add_stat(_component_register_unit               ->_stat);

    log_printf(FUNC,Execute_loop,FUNCTION,"End");
  };

}; // end namespace execute_loop
}; // end namespace multi_execute_loop
}; // end namespace core

}; // end namespace behavioural
}; // end namespace morpheo              
#endif
