1 | /* |
---|
2 | * $Id: Parameters_msg_error.cpp 111 2009-02-27 18:37:40Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/include/Types.h" |
---|
9 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h" |
---|
10 | #include <sstream> |
---|
11 | |
---|
12 | namespace morpheo { |
---|
13 | namespace behavioural { |
---|
14 | namespace core { |
---|
15 | namespace multi_front_end { |
---|
16 | namespace front_end { |
---|
17 | namespace prediction_unit { |
---|
18 | namespace direction { |
---|
19 | namespace meta_predictor { |
---|
20 | namespace two_level_branch_predictor { |
---|
21 | |
---|
22 | |
---|
23 | #undef FUNCTION |
---|
24 | #define FUNCTION "Two_Level_Branch_Predictor::msg_error" |
---|
25 | Parameters_test Parameters::msg_error(void) |
---|
26 | { |
---|
27 | log_begin(Two_Level_Branch_Predictor,FUNCTION); |
---|
28 | |
---|
29 | Parameters_test test ("Two_Level_Branch_Predictor"); |
---|
30 | |
---|
31 | if ((_have_bht or _have_pht) == false) |
---|
32 | test.error(_("They have no Branch History Table and no Pattern History Table. You need a less of a BHT or a PHT\n")); |
---|
33 | |
---|
34 | if ( _have_bht and (_size_address < _bht_size_address)) |
---|
35 | test.error(_("The address's size must to large to the number of shifter in the Branch History Table.\n")); |
---|
36 | |
---|
37 | if (_have_pht and (_size_address < _pht_size_address)) |
---|
38 | test.error(_("The address's size must to large to the number of counter in the Pattern History Table.\n")); |
---|
39 | |
---|
40 | if (_have_pht and _have_bht and (_bht_size_address > _pht_nb_counter)) |
---|
41 | test.error (_("The size of shifter don't must too large that the number of counter in the Pattern History Table.\n")); |
---|
42 | |
---|
43 | if (_have_pht and _have_bht and (_pht_size_address_share > _bht_size_shifter)) |
---|
44 | test.error (_("The size of address share don't must too large that the size of shifter in the Branch History Table.\n")); |
---|
45 | |
---|
46 | log_end(Two_Level_Branch_Predictor,FUNCTION); |
---|
47 | |
---|
48 | return test; |
---|
49 | }; |
---|
50 | |
---|
51 | }; // end namespace two_level_branch_predictor |
---|
52 | }; // end namespace meta_predictor |
---|
53 | }; // end namespace direction |
---|
54 | }; // end namespace prediction_unit |
---|
55 | }; // end namespace front_end |
---|
56 | }; // end namespace multi_front_end |
---|
57 | }; // end namespace core |
---|
58 | |
---|
59 | }; // end namespace behavioural |
---|
60 | }; // end namespace morpheo |
---|