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

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

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

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

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

    for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
      {
	_stat->add_stat(component_gpr       [i]->_stat);
	_stat->add_stat(component_gpr_status[i]->_stat);
	_stat->add_stat(component_spr       [i]->_stat);
	_stat->add_stat(component_spr_status[i]->_stat);
      }
    _stat->add_stat(component_glue->_stat);

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

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

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