1 | #ifndef morpheo_behavioural_Parameters_h |
---|
2 | #define morpheo_behavioural_Parameters_h |
---|
3 | |
---|
4 | /* |
---|
5 | * $Id$ |
---|
6 | * |
---|
7 | * [ Description ] |
---|
8 | * |
---|
9 | */ |
---|
10 | |
---|
11 | #include <stdint.h> |
---|
12 | #include <iostream> |
---|
13 | #include <math.h> |
---|
14 | #include "Behavioural/Constant/Constant_OpenRISC.h" |
---|
15 | #include "Behavioural/include/Environnement.h" |
---|
16 | #include "Include/ErrorMorpheo.h" |
---|
17 | #include "Include/ToString.h" |
---|
18 | |
---|
19 | using namespace morpheo::behavioural::constant; |
---|
20 | using namespace std; |
---|
21 | |
---|
22 | namespace morpheo { |
---|
23 | namespace behavioural { |
---|
24 | |
---|
25 | // Virtual Class - Interface of each component |
---|
26 | class Parameters |
---|
27 | { |
---|
28 | // -----[ fields ]---------------------------------------------------- |
---|
29 | // Constant |
---|
30 | public : const uint32_t _size_condition; |
---|
31 | public : const uint32_t _size_instruction; |
---|
32 | public : const uint32_t _size_instruction_log2; |
---|
33 | |
---|
34 | // -----[ methods ]--------------------------------------------------- |
---|
35 | public : Parameters (void); |
---|
36 | public : virtual ~Parameters (); |
---|
37 | |
---|
38 | // methods to print and test parameters |
---|
39 | public : virtual string print (uint32_t depth) = 0; |
---|
40 | public : virtual string msg_error (void) = 0; |
---|
41 | |
---|
42 | // methods to generate configuration file |
---|
43 | |
---|
44 | |
---|
45 | // methods to test |
---|
46 | public : void test (void); |
---|
47 | public : bool is_natural (double val ); |
---|
48 | public : bool is_positive (double val ); |
---|
49 | public : bool is_multiple (uint32_t val1, |
---|
50 | uint32_t val2); |
---|
51 | public : bool is_between_inclusive (uint32_t val, |
---|
52 | uint32_t min, |
---|
53 | uint32_t max); |
---|
54 | public : bool is_between_exclusive (uint32_t val, |
---|
55 | uint32_t min, |
---|
56 | uint32_t max); |
---|
57 | }; |
---|
58 | |
---|
59 | }; // end namespace behavioural |
---|
60 | }; // end namespace morpheo |
---|
61 | |
---|
62 | #endif |
---|