source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters_msg_error.cpp @ 81

Last change on this file since 81 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.8 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/Shifter/include/Parameters.h"
9#include "Behavioural/Generic/Shifter/include/Types.h"
10#include <sstream>
11
12namespace morpheo {
13namespace behavioural {
14namespace generic {
15namespace shifter {
16
17  std::string Parameters::msg_error(void)
18  {
19    std::string msg = "";
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";
43        msg += "    * rotate                          : " + toString(_rotate) + "\n";
44        msg += "    * carry                           : " + toString(_carry ) + "\n";
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.