source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_statistics_allocation.cpp @ 141

Last change on this file since 141 was 141, checked in by rosiere, 14 years ago

Add statistics in stage IFETCH, DECODE and COMMIT (insert, retire and commit)

  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1#ifdef STATISTICS
2/*
3 * $Id: Ifetch_queue_statistics_allocation.cpp 141 2010-08-02 18:56:05Z rosiere $
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/include/Ifetch_queue.h"
10
11namespace morpheo {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace ifetch_unit {
17namespace ifetch_queue {
18
19
20#undef  FUNCTION
21#define FUNCTION "Ifetch_queue::statistics_allocation"
22  void Ifetch_queue::statistics_allocation (morpheo::behavioural::Parameters_Statistics * param_statistics)
23  {
24    log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
25
26    _stat = new Stat (static_cast<std::string>(_name),
27                      "Ifetch_queue",
28                      param_statistics);
29
30    _sum_transaction_address      = _stat->create_variable("sum_transaction_address");
31
32    _sum_use_queue                = _stat->create_variable("sum_use_queue");
33    _sum_use_queue_wait_rsp       = _stat->create_variable("sum_use_queue_wait_rsp");
34    _sum_use_queue_have_rsp       = _stat->create_variable("sum_use_queue_have_rsp");
35    _sum_use_queue_error_wait_rsp = _stat->create_variable("sum_use_queue_error_wait_rsp");
36
37    _stat->create_expr                 ("sum_use_queue"             ,"+ + sum_use_queue_wait_rsp sum_use_queue_have_rsp sum_use_queue_error_wait_rsp");
38    _stat->create_expr_average_by_cycle("average_use_queue"               ,"sum_use_queue"               ,"","Average occupation of ifetch queue");
39    _stat->create_expr_percent         ("percent_use_queue"               ,"average_use_queue"           ,toString(_param->_nb_instruction_in_queue),"Percent of occupation of ifetch queue");
40    _stat->create_expr_percent         ("percent_use_queue_wait_rsp"      ,"sum_use_queue_wait_rsp"      ,"sum_use_queue","Part of ifetch queue that wait the respons icache");
41    _stat->create_expr_percent         ("percent_use_queue_have_rsp"      ,"sum_use_queue_have_rsp"      ,"sum_use_queue","Part of ifetch queue that wait the decod");
42    _stat->create_expr_percent         ("percent_use_queue_error_wait_rsp","sum_use_queue_error_wait_rsp","sum_use_queue","Part of ifetch queue that have an error and wait the respons icache");
43
44    _stat->create_expr_average         ("average_miss_icache"             ,"+ sum_use_queue_wait_rsp sum_use_queue_error_wait_rsp", "sum_transaction_address", "", "Average Miss Instruction Cache");
45
46    _stat_nb_inst_fetch     = _stat->create_counters("nb_inst_fetch",_param->_nb_instruction,"",
47                                                     _("Number bundle with %d instruction(s)."),
48                                                     _("Percent of bundle with %d instruction(s)."),
49                                                     _("Average instruction in a bundle.")
50                                                     );
51
52    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
53  };
54
55}; // end namespace ifetch_queue
56}; // end namespace ifetch_unit
57}; // end namespace front_end
58}; // end namespace multi_front_end
59}; // end namespace core
60
61}; // end namespace behavioural
62}; // end namespace morpheo             
63#endif
Note: See TracBrowser for help on using the repository browser.