[2] | 1 | /* |
---|
| 2 | * $Id: Parameters.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Generic/Shifter/include/Parameters.h" |
---|
| 9 | |
---|
| 10 | namespace morpheo { |
---|
| 11 | namespace behavioural { |
---|
| 12 | namespace generic { |
---|
| 13 | namespace shifter { |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | Parameters::Parameters (uint32_t size_data , |
---|
| 17 | uint32_t nb_port , |
---|
| 18 | uint32_t shift_value , |
---|
| 19 | rotate_t rotate , |
---|
| 20 | direction_t direction , |
---|
| 21 | carry_t carry , |
---|
| 22 | bool type_completion_bool): |
---|
| 23 | _size_data (size_data ), |
---|
| 24 | _nb_port (nb_port ), |
---|
| 25 | _shift_value (shift_value ), |
---|
| 26 | _rotate (rotate ), |
---|
| 27 | _direction (direction ), |
---|
| 28 | _carry (carry ), |
---|
| 29 | _size_data_completion ((carry != external_completion)?0:((_shift_value==0)?size_data:_shift_value)), |
---|
| 30 | _type_completion_bool (type_completion_bool), |
---|
| 31 | |
---|
| 32 | _internal_direction ((direction == internal_right_shift)?_right :_left ), |
---|
| 33 | _internal_type ((rotate == internal_rotate )?_rotate:_shift ), |
---|
| 34 | _internal_carry ((carry == internal_logic )?_logic :_arithmetic), |
---|
| 35 | |
---|
| 36 | _have_shift_logic_left ((rotate != internal_rotate) && |
---|
| 37 | (((carry == external_carry ) || |
---|
| 38 | (carry == external_completion) || |
---|
| 39 | (carry == internal_logic )) && |
---|
| 40 | ((direction == external_direction ) || |
---|
| 41 | (direction == internal_left_shift)))), |
---|
| 42 | _have_shift_logic_right ((rotate != internal_rotate) && |
---|
| 43 | (((carry == external_carry ) || |
---|
| 44 | (carry == external_completion) || |
---|
| 45 | (carry == internal_logic )) && |
---|
| 46 | ((direction == external_direction ) || |
---|
| 47 | (direction == internal_right_shift)))), |
---|
| 48 | _have_shift_logic (_have_shift_logic_left || _have_shift_logic_right), |
---|
| 49 | |
---|
| 50 | _have_shift_arithmetic_left ((rotate != internal_rotate) && |
---|
| 51 | (((carry == external_carry ) || |
---|
| 52 | (carry == internal_arithmetic )) && |
---|
| 53 | ((direction == external_direction ) || |
---|
| 54 | (direction == internal_left_shift)))), |
---|
| 55 | _have_shift_arithmetic_right ((rotate != internal_rotate) && |
---|
| 56 | (((carry == external_carry ) || |
---|
| 57 | (carry == internal_arithmetic )) && |
---|
| 58 | ((direction == external_direction ) || |
---|
| 59 | (direction == internal_right_shift)))), |
---|
| 60 | _have_shift_arithmetic (_have_shift_arithmetic_left || _have_shift_arithmetic_right), |
---|
| 61 | |
---|
| 62 | _have_shift (_have_shift_logic || _have_shift_arithmetic), |
---|
| 63 | |
---|
| 64 | _have_rotate_left ((rotate != without_rotate) && |
---|
| 65 | ((direction == external_direction ) || |
---|
| 66 | (direction == internal_left_shift))), |
---|
| 67 | _have_rotate_right ((rotate != without_rotate) && |
---|
| 68 | ((direction == external_direction ) || |
---|
| 69 | (direction == internal_right_shift))), |
---|
| 70 | _have_rotate ( _have_rotate_left || _have_rotate_right), |
---|
| 71 | |
---|
| 72 | _have_direction_left (_have_shift_logic_left || |
---|
| 73 | _have_shift_arithmetic_left || |
---|
| 74 | _have_rotate_left ), |
---|
| 75 | _have_direction_right (_have_shift_logic_right || |
---|
| 76 | _have_shift_arithmetic_right || |
---|
| 77 | _have_rotate_right ) |
---|
| 78 | { |
---|
| 79 | test(); |
---|
| 80 | }; |
---|
| 81 | |
---|
[88] | 82 | // Parameters::Parameters (Parameters & param): |
---|
| 83 | // _size_data (param._size_data ), |
---|
| 84 | // _nb_port (param._nb_port ), |
---|
| 85 | // _shift_value (param._shift_value ), |
---|
| 86 | // _rotate (param._rotate ), |
---|
| 87 | // _direction (param._direction ), |
---|
| 88 | // _carry (param._carry ), |
---|
| 89 | // _size_data_completion (param._size_data_completion ), |
---|
| 90 | // _type_completion_bool (param._type_completion_bool ), |
---|
[2] | 91 | |
---|
[88] | 92 | // _internal_direction (param._internal_direction ), |
---|
| 93 | // _internal_type (param._internal_type ), |
---|
| 94 | // _internal_carry (param._internal_carry ), |
---|
[2] | 95 | |
---|
[88] | 96 | // _have_shift_logic_left (param._have_shift_logic_left ), |
---|
| 97 | // _have_shift_logic_right (param._have_shift_logic_right ), |
---|
| 98 | // _have_shift_logic (param._have_shift_logic ), |
---|
| 99 | // _have_shift_arithmetic_left (param._have_shift_arithmetic_left ), |
---|
| 100 | // _have_shift_arithmetic_right (param._have_shift_arithmetic_right ), |
---|
| 101 | // _have_shift_arithmetic (param._have_shift_arithmetic ), |
---|
| 102 | // _have_shift (param._have_shift ), |
---|
| 103 | // _have_rotate_left (param._have_rotate_left ), |
---|
| 104 | // _have_rotate_right (param._have_rotate_right ), |
---|
| 105 | // _have_rotate (param._have_rotate ), |
---|
[2] | 106 | |
---|
[88] | 107 | // _have_direction_left (param._have_direction_left ), |
---|
| 108 | // _have_direction_right (param._have_direction_right ) |
---|
[2] | 109 | |
---|
[88] | 110 | // { |
---|
| 111 | // test(); |
---|
| 112 | // }; |
---|
| 113 | |
---|
| 114 | Parameters::~Parameters () |
---|
[2] | 115 | { |
---|
| 116 | }; |
---|
| 117 | |
---|
[88] | 118 | void Parameters::copy (void) |
---|
| 119 | { |
---|
| 120 | }; |
---|
[2] | 121 | |
---|
| 122 | }; // end namespace shifter |
---|
| 123 | }; // end namespace generic |
---|
| 124 | }; // end namespace behavioural |
---|
| 125 | }; // end namespace morpheo |
---|