- Timestamp:
- Feb 16, 2010, 1:35:48 PM (14 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Parameters.h
r112 r137 21 21 { 22 22 //-----[ fields ]------------------------------------------------------------ 23 public : constuint32_t _size_data ;24 public : constuint32_t _nb_port ;25 public : constuint32_t _shift_value ; // 0 = external shifter's value26 public : constrotate_t _rotate ;27 public : constdirection_t _direction ;28 public : c onst carry_t _carry ;29 public : constuint32_t _size_data_completion;30 public : constbool _type_completion_bool;23 public : uint32_t _size_data ; 24 public : uint32_t _nb_port ; 25 public : uint32_t _shift_value ; // 0 = external shifter's value 26 public : rotate_t _rotate ; 27 public : direction_t _direction ; 28 public : carry_t _carry ; 29 public : uint32_t _size_data_completion; 30 public : bool _type_completion_bool; 31 31 32 public : constuint32_t _size_shift ;32 public : uint32_t _size_shift ; 33 33 34 public : constbool _internal_direction;35 public : constbool _internal_type ;36 public : constbool _internal_carry ;34 public : bool _internal_direction; 35 public : bool _internal_type ; 36 public : bool _internal_carry ; 37 37 38 public : constbool _have_shift_logic_left ;39 public : constbool _have_shift_logic_right ;40 public : constbool _have_shift_logic ;41 public : constbool _have_shift_arithmetic_left ;42 public : constbool _have_shift_arithmetic_right ;43 public : constbool _have_shift_arithmetic ;44 public : constbool _have_shift ;45 public : constbool _have_rotate_left ;46 public : constbool _have_rotate_right ;47 public : constbool _have_rotate ;38 public : bool _have_shift_logic_left ; 39 public : bool _have_shift_logic_right ; 40 public : bool _have_shift_logic ; 41 public : bool _have_shift_arithmetic_left ; 42 public : bool _have_shift_arithmetic_right ; 43 public : bool _have_shift_arithmetic ; 44 public : bool _have_shift ; 45 public : bool _have_rotate_left ; 46 public : bool _have_rotate_right ; 47 public : bool _have_rotate ; 48 48 49 public : constbool _have_direction_left ;50 public : constbool _have_direction_right ;49 public : bool _have_direction_left ; 50 public : bool _have_direction_right ; 51 51 52 52 //-----[ methods ]----------------------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters.cpp
r112 r137 20 20 direction_t direction , 21 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), 22 bool type_completion_bool) 23 { 24 _size_data = size_data ; 25 _nb_port = nb_port ; 26 _shift_value = shift_value ; 27 _rotate = rotate ; 28 _direction = direction ; 29 _carry = carry ; 30 _size_data_completion = (carry != external_completion)?0:((_shift_value==0)?size_data:_shift_value); 31 _type_completion_bool = type_completion_bool; 31 32 32 _size_shift (static_cast<uint32_t>(ceil(log2(_size_data)))), 33 _size_shift = static_cast<uint32_t>(ceil(log2(_size_data))); 34 35 _internal_direction = (direction == internal_right_shift)?_right :_left ; 36 _internal_type = (rotate == internal_rotate )?_rotate:_shift ; 37 _internal_carry = (carry == internal_logic )?_logic :_arithmetic; 33 38 34 _internal_direction ((direction == internal_right_shift)?_right :_left ), 35 _internal_type ((rotate == internal_rotate )?_rotate:_shift ), 36 _internal_carry ((carry == internal_logic )?_logic :_arithmetic), 39 _have_shift_logic_left = ((rotate != internal_rotate) && 40 (((carry == external_carry ) || 41 (carry == external_completion) || 42 (carry == internal_logic )) && 43 ((direction == external_direction ) || 44 (direction == internal_left_shift)))); 45 _have_shift_logic_right = ((rotate != internal_rotate) && 46 (((carry == external_carry ) || 47 (carry == external_completion) || 48 (carry == internal_logic )) && 49 ((direction == external_direction ) || 50 (direction == internal_right_shift)))); 51 _have_shift_logic = _have_shift_logic_left || _have_shift_logic_right; 37 52 38 _have_shift_logic_left ((rotate != internal_rotate) && 39 (((carry == external_carry ) || 40 (carry == external_completion) || 41 (carry == internal_logic )) && 42 ((direction == external_direction ) || 43 (direction == internal_left_shift)))), 44 _have_shift_logic_right ((rotate != internal_rotate) && 45 (((carry == external_carry ) || 46 (carry == external_completion) || 47 (carry == internal_logic )) && 48 ((direction == external_direction ) || 49 (direction == internal_right_shift)))), 50 _have_shift_logic (_have_shift_logic_left || _have_shift_logic_right), 53 _have_shift_arithmetic_left = ((rotate != internal_rotate) && 54 (((carry == external_carry ) || 55 (carry == internal_arithmetic )) && 56 ((direction == external_direction ) || 57 (direction == internal_left_shift)))); 58 _have_shift_arithmetic_right = ((rotate != internal_rotate) && 59 (((carry == external_carry ) || 60 (carry == internal_arithmetic )) && 61 ((direction == external_direction ) || 62 (direction == internal_right_shift)))); 63 _have_shift_arithmetic = _have_shift_arithmetic_left || _have_shift_arithmetic_right; 51 64 52 _have_shift_arithmetic_left ((rotate != internal_rotate) && 53 (((carry == external_carry ) || 54 (carry == internal_arithmetic )) && 55 ((direction == external_direction ) || 56 (direction == internal_left_shift)))), 57 _have_shift_arithmetic_right ((rotate != internal_rotate) && 58 (((carry == external_carry ) || 59 (carry == internal_arithmetic )) && 60 ((direction == external_direction ) || 61 (direction == internal_right_shift)))), 62 _have_shift_arithmetic (_have_shift_arithmetic_left || _have_shift_arithmetic_right), 65 _have_shift = _have_shift_logic || _have_shift_arithmetic; 63 66 64 _have_shift (_have_shift_logic || _have_shift_arithmetic), 67 _have_rotate_left = ((rotate != without_rotate) && 68 ((direction == external_direction ) || 69 (direction == internal_left_shift))); 70 _have_rotate_right = ((rotate != without_rotate) && 71 ((direction == external_direction ) || 72 (direction == internal_right_shift))); 73 _have_rotate = _have_rotate_left || _have_rotate_right; 74 75 _have_direction_left = (_have_shift_logic_left || 76 _have_shift_arithmetic_left || 77 _have_rotate_left ); 78 _have_direction_right = (_have_shift_logic_right || 79 _have_shift_arithmetic_right || 80 _have_rotate_right ); 65 81 66 _have_rotate_left ((rotate != without_rotate) &&67 ((direction == external_direction ) ||68 (direction == internal_left_shift))),69 _have_rotate_right ((rotate != without_rotate) &&70 ((direction == external_direction ) ||71 (direction == internal_right_shift))),72 _have_rotate ( _have_rotate_left || _have_rotate_right),73 74 _have_direction_left (_have_shift_logic_left ||75 _have_shift_arithmetic_left ||76 _have_rotate_left ),77 _have_direction_right (_have_shift_logic_right ||78 _have_shift_arithmetic_right ||79 _have_rotate_right )80 {81 82 test(); 82 83 };
Note: See TracChangeset
for help on using the changeset viewer.