source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_statistics_declaration.cpp @ 71

Last change on this file since 71 was 71, checked in by rosiere, 16 years ago

Modification of Statisctics
Add a new systemC component : Load_Store_Queue (tested with one benchmark and one configuration). Store don't supported the Data Buss Error (Load is supported)

File size: 1.7 KB
Line 
1#ifdef STATISTICS
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
10
11namespace morpheo                    {
12namespace behavioural                {
13namespace generic                    {
14namespace registerfile               {
15namespace registerfile_monolithic    {
16
17  void RegisterFile_Monolithic::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics)
18  {
19    _stat = new Stat (static_cast<string>(_name),
20                      "RegisterFile_Monolithic",
21                      param_statistics);
22
23    _stat_nb_read           = _stat->create_variable("nb_read" );
24    _stat_nb_write          = _stat->create_variable("nb_write");
25   
26    _stat_average_read      = _stat->create_counter("average_read" , "", "Average read by cycle");
27    _stat_average_write     = _stat->create_counter("average_write", "", "Average write by cycle");
28
29    _stat_percent_use_read  = _stat->create_counter("percent_use_read" , "%", "Read port usage");
30    _stat_percent_use_write = _stat->create_counter("percent_use_write", "%", "Write port usage");
31
32    _stat->create_expr("average_read" , "/ nb_read  cycle", false);
33    _stat->create_expr("average_write", "/ nb_write cycle", false);
34
35    _stat->create_expr("percent_use_read" , "/ * average_read  100 " + toString(_param->_nb_port_read +_param->_nb_port_read_write), false);
36    _stat->create_expr("percent_use_write", "/ * average_write 100 " + toString(_param->_nb_port_write+_param->_nb_port_read_write), false);
37
38  };
39
40}; // end namespace registerfile_monolithic
41}; // end namespace registerfile
42}; // end namespace generic
43}; // end namespace behavioural         
44}; // end namespace morpheo             
45#endif
Note: See TracBrowser for help on using the repository browser.