Changeset 42 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_declaration.cpp
- Timestamp:
- Jul 5, 2007, 5:50:19 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_declaration.cpp
r2 r42 15 15 16 16 17 void Shifter::vhdl_declaration (Vhdl & vhdl)17 void Shifter::vhdl_declaration (Vhdl * & vhdl) 18 18 { 19 19 uint32_t log2_size_data = static_cast<uint32_t>(ceil(log2(_param._size_data))); 20 20 21 vhdl .set_constant("cst_is_direction_left ",1,_left );22 vhdl .set_constant("cst_is_direction_right ",1,_right );23 vhdl .set_constant("cst_is_type_shift ",1,_shift );24 vhdl .set_constant("cst_is_type_rotate ",1,_rotate );25 vhdl .set_constant("cst_is_carry_arithmetic",1,_arithmetic);26 vhdl .set_constant("cst_is_carry_logic ",1,_logic );27 vhdl .set_constant("cst_completion ",_param._size_data,"(others => '1')");21 vhdl->set_constant("cst_is_direction_left ",1,_left ); 22 vhdl->set_constant("cst_is_direction_right ",1,_right ); 23 vhdl->set_constant("cst_is_type_shift ",1,_shift ); 24 vhdl->set_constant("cst_is_type_rotate ",1,_rotate ); 25 vhdl->set_constant("cst_is_carry_arithmetic",1,_arithmetic); 26 vhdl->set_constant("cst_is_carry_logic ",1,_logic ); 27 vhdl->set_constant("cst_completion ",_param._size_data,"(others => '1')"); 28 28 29 29 for (uint32_t i=0; i<_param._nb_port; i++) 30 30 { 31 31 if (_param._shift_value != 0) 32 vhdl .set_constant("shift_"+toString(i),log2_size_data, _param._shift_value);32 vhdl->set_constant("shift_"+toString(i),log2_size_data, _param._shift_value); 33 33 else 34 vhdl .set_alias ("shift_"+toString(i),std_logic(log2_size_data), "in_SHIFTER_SHIFT_"+toString(i),std_logic_range(log2_size_data));34 vhdl->set_alias ("shift_"+toString(i),std_logic(log2_size_data), "in_SHIFTER_"+toString(i)+"_SHIFT",std_logic_range(log2_size_data)); 35 35 36 36 if (_param._size_data_completion > 0) 37 37 { 38 vhdl .set_signal ("shifter_completion_left_"+toString(i)+" ",_param._size_data);39 vhdl .set_signal ("shifter_completion_right_"+toString(i)+"",_param._size_data);40 vhdl .set_signal ("mask_completion_left_"+toString(i)+" ",_param._size_data);41 vhdl .set_signal ("mask_completion_right_"+toString(i)+" ",_param._size_data);38 vhdl->set_signal ("shifter_completion_left_"+toString(i)+" ",_param._size_data); 39 vhdl->set_signal ("shifter_completion_right_"+toString(i)+"",_param._size_data); 40 vhdl->set_signal ("mask_completion_left_"+toString(i)+" ",_param._size_data); 41 vhdl->set_signal ("mask_completion_right_"+toString(i)+" ",_param._size_data); 42 42 } 43 43 44 44 //-----[ Shift logic Left ]-------------------------------------------- 45 45 if (_param._have_shift_logic_left) 46 vhdl .set_signal ("shift_logic_left_"+toString(i)+" ",_param._size_data);46 vhdl->set_signal ("shift_logic_left_"+toString(i)+" ",_param._size_data); 47 47 48 48 //-----[ Shift logic Right ]------------------------------------------- 49 49 if (_param._have_shift_logic_right) 50 vhdl .set_signal ("shift_logic_right_"+toString(i)+" ",_param._size_data);50 vhdl->set_signal ("shift_logic_right_"+toString(i)+" ",_param._size_data); 51 51 52 52 //-----[ Shift arithmetic Left ]--------------------------------------- 53 53 if (_param._have_shift_arithmetic_left) 54 vhdl .set_signal ("shift_arithmetic_left_"+toString(i)+" ",_param._size_data);54 vhdl->set_signal ("shift_arithmetic_left_"+toString(i)+" ",_param._size_data); 55 55 56 56 //-----[ Shift arithmetic Right ]-------------------------------------- 57 57 if (_param._have_shift_arithmetic_right) 58 vhdl .set_signal ("shift_arithmetic_right_"+toString(i)+"",_param._size_data);58 vhdl->set_signal ("shift_arithmetic_right_"+toString(i)+"",_param._size_data); 59 59 60 60 //-----[ Rotate Left ]------------------------------------------------- 61 61 if (_param._have_rotate_left) 62 vhdl .set_signal ("rotate_left_"+toString(i)+" ",_param._size_data);62 vhdl->set_signal ("rotate_left_"+toString(i)+" ",_param._size_data); 63 63 64 64 //-----[ Rotate Right ]------------------------------------------------ 65 65 if (_param._have_rotate_right) 66 vhdl .set_signal ("rotate_right_"+toString(i)+" ",_param._size_data);66 vhdl->set_signal ("rotate_right_"+toString(i)+" ",_param._size_data); 67 67 } 68 68 };
Note: See TracChangeset
for help on using the changeset viewer.