Last change
on this file since 138 was
81,
checked in by rosiere, 16 years ago
|
- Finish Environment (and test)
- Continue predictor_unit
- Add external tools
- svn keyword "Id" set
|
-
Property svn:keywords set to
Id
|
File size:
1.3 KB
|
Line | |
---|
1 | /* |
---|
2 | * $Id: Parameters_msg_error.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Parameters.h" |
---|
9 | #include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Types.h" |
---|
10 | #include <sstream> |
---|
11 | |
---|
12 | namespace morpheo { |
---|
13 | namespace behavioural { |
---|
14 | namespace generic { |
---|
15 | namespace victim { |
---|
16 | namespace victim_pseudo_lru { |
---|
17 | |
---|
18 | Parameters_test Parameters::msg_error(void) |
---|
19 | { |
---|
20 | Parameters_test test ("Victime_Pseudo_LRU"); |
---|
21 | |
---|
22 | if (_nb_entity < 2) |
---|
23 | test.error("nb_entity must be >= 2"); |
---|
24 | |
---|
25 | if (is_positive(log2(_nb_entity)) == false) |
---|
26 | test.error("nb_entity is not a power of 2"); |
---|
27 | |
---|
28 | if (_nb_access < 1) |
---|
29 | test.error("nb_access must be >= 1"); |
---|
30 | |
---|
31 | if (_size_table < 1) |
---|
32 | test.error("size_table must be >= 1"); |
---|
33 | |
---|
34 | if (is_between_inclusive (static_cast<uint32_t>(log2(_nb_entity)),0 ,(8*sizeof(Tentity_t))) == false) |
---|
35 | test.error("type \"Tentity_t\" is too little to the size defined by nb_entity"); |
---|
36 | |
---|
37 | if (is_between_inclusive (static_cast<uint32_t>(log2(_size_table)),0 ,(8*sizeof(Taddress_t))) == false) |
---|
38 | test.error("type \"Taddress_t\" is too little to the size defined by size_table"); |
---|
39 | |
---|
40 | return test; |
---|
41 | }; |
---|
42 | |
---|
43 | }; // end namespace victim_pseudo_lru |
---|
44 | }; // end namespace victim |
---|
45 | }; // end namespace generic |
---|
46 | |
---|
47 | }; // end namespace behavioural |
---|
48 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.