source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_statistics_allocation.cpp @ 82

Last change on this file since 82 was 82, checked in by rosiere, 16 years ago
  • support locale (now must "just" translate)
  • update all component with new test format
  • update all component with usage
  • New component : decod queue and prediction_unit
  • Property svn:keywords set to Id
File size: 1.9 KB
Line 
1#ifdef STATISTICS
2/*
3 * $Id: Decod_queue_statistics_allocation.cpp 82 2008-05-01 16:48:45Z rosiere $
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Decod_queue.h"
10
11namespace morpheo {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace decod_unit {
17namespace decod_queue {
18
19
20#undef  FUNCTION
21#define FUNCTION "Decod_queue::statistics_allocation"
22  void Decod_queue::statistics_allocation (morpheo::behavioural::Parameters_Statistics * param_statistics)
23  {
24    log_begin(Decod_queue,FUNCTION);
25
26
27    _stat = new Stat (static_cast<std::string>(_name),
28                      "Decod_queue",
29                      param_statistics);
30
31    _stat_nb_inst = new counter_t * [_param->_nb_context];
32
33    std::string expr_average_inst = "";
34
35    for (uint32_t i=0; i<_param->_nb_context; i++)
36      {
37        _stat_nb_inst [i] = _stat->create_variable("nb_inst_"+toString(i));
38       
39        _stat->create_expr_average_by_cycle("average_inst_"+toString(i), "nb_inst_"+toString(i), "", toString(_("Average instruction by cycle (context %d)"),i));
40        _stat->create_expr_percent         ("percent_use_inst_"+toString(i) , "average_inst_"+toString(i), toString(_param->_size_queue), toString(_("Percent instruction by cycle (context %d)"),i));
41
42        if (i == 0)
43          expr_average_inst = "nb_inst_"+toString(i);
44        else
45          expr_average_inst = "+ nb_inst_"+toString(i) + " " +expr_average_inst;
46      }
47
48    _stat->create_expr_average_by_cycle("average_inst", expr_average_inst, "", _("Average instruction by cycle (all context)"));
49    _stat->create_expr_percent         ("percent_use_inst" , "average_inst", toString(_param->_size_queue), _("Percent instruction by cycle (all context)"));
50   
51    log_end(Decod_queue,FUNCTION);
52  };
53
54}; // end namespace decod_queue
55}; // end namespace decod_unit
56}; // end namespace front_end
57}; // end namespace multi_front_end
58}; // end namespace core
59
60}; // end namespace behavioural
61}; // end namespace morpheo             
62#endif
Note: See TracBrowser for help on using the repository browser.