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

Last change on this file since 88 was 88, checked in by rosiere, 15 years ago

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1#ifdef STATISTICS
2/*
3 * $Id: Decod_queue_statistics_allocation.cpp 88 2008-12-10 18:31:39Z 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_use_queue = _stat->create_variable ("use_queue");
32    _stat_nb_inst   = new counter_t * [_param->_nb_context];
33
34    std::string expr_average_inst = "";
35
36    for (uint32_t i=0; i<_param->_nb_context; i++)
37      {
38        _stat_nb_inst [i] = _stat->create_variable("nb_inst_"+toString(i));
39       
40        _stat->create_expr_average_by_cycle("average_inst_"+toString(i), "nb_inst_"+toString(i), "", toString(_("Average instruction number in decod_queue by cycle (context %d)"),i));
41        _stat->create_expr_percent         ("percent_use_inst_"+toString(i) , "average_inst_"+toString(i), toString(_param->_size_queue), toString(_("Percent decod_queue's occupation (context %d)"),i));
42       
43        if (i == 0)
44          expr_average_inst = "nb_inst_"+toString(i);
45        else
46          expr_average_inst = "+ nb_inst_"+toString(i) + " " +expr_average_inst;
47      }
48
49    _stat->create_expr_average_by_cycle("average_inst", expr_average_inst, "", _("Average instruction number in decod_queue by cycle (all context)"));
50    _stat->create_expr_percent         ("percent_use_inst" , "average_inst", toString(_param->_size_queue), _("Percent decod_queue's occupation (all context)"));
51   
52    _stat->create_expr_average_by_cycle("average_use_queue", "use_queue", "", _("Average slot decod_queue occupation by cycle."));
53    _stat->create_expr_percent         ("percent_use_queue", "average_use_queue", toString(_param->_size_queue), _("Percent slot decod_queue occupation."));
54   
55    log_end(Decod_queue,FUNCTION);
56  };
57
58}; // end namespace decod_queue
59}; // end namespace decod_unit
60}; // end namespace front_end
61}; // end namespace multi_front_end
62}; // end namespace core
63
64}; // end namespace behavioural
65}; // end namespace morpheo             
66#endif
Note: See TracBrowser for help on using the repository browser.