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

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

1) OOO_egine : add stat to depiste low perf source
2) Commit : add stat
3) LSU_Pointer : retire - always ack (else combinatory loop). insert - max nb_inst_memory
4) TopLevel? : add debug_idle_time to stop combinatory loop.
5) Issue_queue : add reexecute_queue, new implementation (routage after issue_queue)
6) Decod / Predictor : add "can_continue"

  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1#ifdef STATISTICS
2/*
3 * $Id: Decod_queue_statistics_allocation.cpp 110 2009-02-19 16:31:47Z 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_sum_transaction_decod_in = _stat->create_variable("sum_transaction_decod_in");
32    _stat_sum_inst_enable          = _stat->create_variable("sum_inst_enable");
33    _stat_average_occupation_bundle= _stat->create_counter ("average_occupation_bundle", "", "Occupation average of instruction's bundle.");
34
35    _stat->create_expr                 ("average_occupation_bundle" ,"/ sum_inst_enable sum_transaction_decod_in");
36    _stat->create_expr_percent         ("percent_occupation_bundle" ,"average_occupation_bundle", toString(_param->_nb_inst_decod),"Percent of instruction's bundle occupation.");
37
38    _stat_use_queue = _stat->create_variable ("use_queue");
39    _stat_nb_inst   = new counter_t * [_param->_nb_context];
40
41    std::string expr_average_inst = "";
42
43    for (uint32_t i=0; i<_param->_nb_context; i++)
44      {
45        _stat_nb_inst [i] = _stat->create_variable("nb_inst_"+toString(i));
46       
47        _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));
48        _stat->create_expr_percent         ("percent_use_inst_"+toString(i) , "average_inst_"+toString(i), toString(_param->_nb_instruction_in_queue), toString(_("Percent decod_queue's occupation (context %d)"),i));
49       
50        if (i == 0)
51          expr_average_inst = "nb_inst_"+toString(i);
52        else
53          expr_average_inst = "+ nb_inst_"+toString(i) + " " +expr_average_inst;
54      }
55
56    _stat->create_expr_average_by_cycle("average_inst", expr_average_inst, "", _("Average instruction number in decod_queue by cycle (all context)"));
57    _stat->create_expr_percent         ("percent_use_inst" , "average_inst", toString(_param->_nb_instruction_in_queue), _("Percent decod_queue's occupation (all context)"));
58   
59    _stat->create_expr_average_by_cycle("average_use_queue", "use_queue", "", _("Average slot decod_queue occupation by cycle."));
60    _stat->create_expr_percent         ("percent_use_queue", "average_use_queue", toString(_param->_nb_instruction_in_queue), _("Percent slot decod_queue occupation."));
61   
62    log_end(Decod_queue,FUNCTION);
63  };
64
65}; // end namespace decod_queue
66}; // end namespace decod_unit
67}; // end namespace front_end
68}; // end namespace multi_front_end
69}; // end namespace core
70
71}; // end namespace behavioural
72}; // end namespace morpheo             
73#endif
Note: See TracBrowser for help on using the repository browser.