Last change
on this file since 75 was
75,
checked in by rosiere, 16 years ago
|
Update all component (except front_end) to :
- new statistics model
- no namespace std
|
File size:
1.8 KB
|
Rev | Line | |
---|
[2] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Generic/Shifter/include/Parameters.h" |
---|
| 9 | #include "Behavioural/Generic/Shifter/include/Types.h" |
---|
| 10 | #include <sstream> |
---|
| 11 | |
---|
| 12 | namespace morpheo { |
---|
| 13 | namespace behavioural { |
---|
| 14 | namespace generic { |
---|
| 15 | namespace shifter { |
---|
| 16 | |
---|
[75] | 17 | std::string Parameters::msg_error(void) |
---|
[2] | 18 | { |
---|
[75] | 19 | std::string msg = ""; |
---|
[2] | 20 | |
---|
| 21 | if (_size_data < 2) |
---|
| 22 | { |
---|
| 23 | msg += " - size_data must be > 1\n"; |
---|
| 24 | msg += " * size_data : " + toString(_size_data) + "\n"; |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | if (is_positive(_nb_port) == false) |
---|
| 28 | { |
---|
| 29 | msg += " - nb_port must be > 0\n"; |
---|
| 30 | msg += " * nb_port : " + toString(_nb_port) + "\n"; |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | if (_shift_value > _size_data) |
---|
| 34 | { |
---|
| 35 | msg += " - shift_value must be < size_data\n"; |
---|
| 36 | msg += " * shift_value : " + toString(_shift_value) + "\n"; |
---|
| 37 | msg += " * size_data : " + toString(_size_data) + "\n"; |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | if ( (_rotate == internal_rotate) && (_carry != internal_logic)) |
---|
| 41 | { |
---|
| 42 | msg += " - Incompatible parameters : internal_rotate have never carry (must be set at \"internal_logic\"\n"; |
---|
[75] | 43 | msg += " * rotate : " + toString(_rotate) + "\n"; |
---|
| 44 | msg += " * carry : " + toString(_carry ) + "\n"; |
---|
[2] | 45 | } |
---|
| 46 | |
---|
| 47 | if (_type_completion_bool && (_size_data_completion != 1)) |
---|
| 48 | { |
---|
| 49 | msg += " - Incompatible parameters : you can't have the type of port in_SHIFTER_COMPLETION at bool. Because, This port must be more bits\n"; |
---|
| 50 | msg += " * size_data_completion : " + toString (_size_data_completion) + "\n"; |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | return msg; |
---|
| 54 | }; |
---|
| 55 | |
---|
| 56 | }; // end namespace shifter |
---|
| 57 | }; // end namespace generic |
---|
| 58 | }; // end namespace behavioural |
---|
| 59 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.