Changeset 86 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom
- Timestamp:
- May 14, 2008, 7:08:56 PM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/include/Encryption.h
r81 r86 45 45 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t * reg, 46 46 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t * param); 47 48 private : static void decod_encrypt (morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::decod_instruction_t * inst, 49 morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::decod_param_t * param); 50 private : static void decod_decrypt (morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::decod_instruction_t * inst, 51 morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::decod_param_t * param); 47 52 }; 48 53 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/src/Encryption.cpp
r81 r86 37 37 custom_decod_t * Encryption::get_custom_decod (Toperation_t operation) 38 38 { 39 // TODO !!!!! 40 return NULL; 39 if (operation == _operation_encrypt) 40 return &(morpheo::behavioural::custom::encryption::Encryption::decod_encrypt); 41 if (operation == _operation_decrypt) 42 return &(morpheo::behavioural::custom::encryption::Encryption::decod_decrypt); 43 44 return &(morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::instruction_illegal); // unimplemented function 41 45 } 42 46 … … 82 86 83 87 // Result 84 85 88 op->_timing = morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_timing_t(rool, rool); 86 89 op->_data_rd = data; … … 118 121 }; 119 122 123 void Encryption::decod_encrypt (morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::decod_instruction_t * inst, 124 morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::decod_param_t * param) 125 { 126 log_printf(TRACE,Decod,"decod_encrypt"," * instruction : encrypt"); 127 128 inst->_has_immediat = 0; 129 // inst->_immediat = ; 130 inst->_read_ra = 1; 131 inst->_num_reg_ra = range<Tgeneral_address_t>(inst->_instruction,20,16); 132 inst->_read_rb = 0; 133 // inst->_num_reg_rb = ; 134 inst->_read_rc = 0; 135 // inst->_num_reg_rc = ; 136 inst->_write_rd = 1; 137 inst->_num_reg_rd = range<Tgeneral_address_t>(inst->_instruction,25,21); 138 inst->_write_re = 0; 139 // inst->_num_reg_re = ; 140 inst->_exception_use = EXCEPTION_USE_NONE; 141 inst->_event_type = EVENT_TYPE_NONE; 142 } 143 144 void Encryption::decod_decrypt (morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::decod_instruction_t * inst, 145 morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::decod_param_t * param) 146 { 147 log_printf(TRACE,Decod,"decod_decrypt"," * instruction : decrypt"); 148 149 inst->_has_immediat = 0; 150 // inst->_immediat = ; 151 inst->_read_ra = 1; 152 inst->_num_reg_ra = range<Tgeneral_address_t>(inst->_instruction,20,16); 153 inst->_read_rb = 0; 154 // inst->_num_reg_rb = ; 155 inst->_read_rc = 0; 156 // inst->_num_reg_rc = ; 157 inst->_write_rd = 1; 158 inst->_num_reg_rd = range<Tgeneral_address_t>(inst->_instruction,25,21); 159 inst->_write_re = 0; 160 // inst->_num_reg_re = ; 161 inst->_exception_use = EXCEPTION_USE_NONE; 162 inst->_event_type = EVENT_TYPE_NONE; 163 } 164 120 165 }; // end namespace encryption 121 166 }; // end namespace custom
Note: See TracChangeset
for help on using the changeset viewer.