#ifdef STATISTICS
/*
 * $Id: Core_statistics_allocation.cpp 88 2008-12-10 18:31:39Z rosiere $
 *
 * [ Description ]
 * 
 */

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

namespace morpheo {
namespace behavioural {
namespace core {


#undef  FUNCTION
#define FUNCTION "Core::statistics_allocation"
  void Core::statistics_allocation (morpheo::behavioural::Parameters_Statistics * param_statistics)
  {
    log_begin(Core,FUNCTION);

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

    for (uint32_t i=0; i<_param->_nb_front_end; ++i)
    _stat->add_stat(_component_front_end [i]->_stat);
    for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i)
    _stat->add_stat(_component_ooo_engine [i]->_stat);
    for (uint32_t i=0; i<_param->_nb_execute_loop; ++i)
    _stat->add_stat(_component_execute_loop [i]->_stat);
    _stat->add_stat(_component_icache_access->_stat);
    _stat->add_stat(_component_dcache_access->_stat);
    _stat->add_stat(_component_glue->_stat);
    
    log_end(Core,FUNCTION);
  };

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