1 | #ifdef STATISTICS |
---|
2 | /* |
---|
3 | * $Id: RegisterFile_Multi_Banked_statistics_declaration.cpp 137 2010-02-16 12:35:48Z rosiere $ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace generic { |
---|
14 | namespace registerfile { |
---|
15 | namespace registerfile_multi_banked { |
---|
16 | |
---|
17 | #undef FUNCTION |
---|
18 | #define FUNCTION "RegisterFile_Multi_Banked::statistics_declaration" |
---|
19 | void RegisterFile_Multi_Banked::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics) |
---|
20 | { |
---|
21 | log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"Begin"); |
---|
22 | |
---|
23 | _stat = new Stat (static_cast<std::string>(_name), |
---|
24 | "RegisterFile_Multi_Banked", |
---|
25 | param_statistics); |
---|
26 | |
---|
27 | // _stat_nb_read = _stat->create_variable("nb_read" ); |
---|
28 | // _stat_nb_write = _stat->create_variable("nb_write"); |
---|
29 | // _stat_nb_conflict_on_read = _stat->create_variable("nb_conflict_on_read" ); |
---|
30 | // _stat_nb_conflict_on_write = _stat->create_variable("nb_conflict_on_write"); |
---|
31 | |
---|
32 | _stat_nb_read = _stat->create_counter("nb_read" ,"",""); |
---|
33 | _stat_nb_write = _stat->create_counter("nb_write" ,"",""); |
---|
34 | _stat_nb_conflict_on_read = _stat->create_counter("nb_conflict_on_read" ,"",""); |
---|
35 | _stat_nb_conflict_on_write = _stat->create_counter("nb_conflict_on_write","",""); |
---|
36 | |
---|
37 | _stat->create_expr_average_by_cycle("average_read" , "nb_read" , "", _("Average read by cycle" )); |
---|
38 | _stat->create_expr_average_by_cycle("average_write", "nb_write", "", _("Average write by cycle")); |
---|
39 | |
---|
40 | _stat->create_expr_percent ("percent_conflict_on_read" , "nb_conflict_on_read" , "+ nb_read nb_conflict_on_read" , _("Percent conflit on read port" )); |
---|
41 | _stat->create_expr_percent ("percent_conflict_on_write", "nb_conflict_on_write", "+ nb_write nb_conflict_on_write", _("Percent conflit on write port")); |
---|
42 | |
---|
43 | log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"End"); |
---|
44 | }; |
---|
45 | |
---|
46 | }; // end namespace registerfile_multi_banked |
---|
47 | }; // end namespace registerfile |
---|
48 | }; // end namespace generic |
---|
49 | |
---|
50 | }; // end namespace behavioural |
---|
51 | }; // end namespace morpheo |
---|
52 | #endif |
---|