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

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

namespace morpheo {
namespace behavioural {
namespace core {
namespace multi_front_end {
namespace front_end {


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

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

    for (uint32_t i=0; i<_param->_nb_context; ++i)
    _stat->add_stat(_component_ifetch_unit    [i] ->_stat);
    _stat->add_stat(_component_prediction_unit    ->_stat);
    _stat->add_stat(_component_context_state      ->_stat);
    for (uint32_t i=0; i<_param->_nb_decod_unit; ++i)
    _stat->add_stat(_component_decod_unit     [i] ->_stat);
    _stat->add_stat(_component_glue               ->_stat);

    
    log_end(Front_end,FUNCTION);
  };

}; // end namespace front_end
}; // end namespace multi_front_end
}; // end namespace core

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