Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

ECE 511 - PROJECT

MSP430 ASSEMBLY LANGUAGE IMPLEMENTATION

Function: MIXWORD

Dr. JENS-PETER KAPS

By: MANINDER PAL SINGH G00539336

Task: Convert the assigned C function to MSP430 assembly language and optimize it to execute faster by reducing the resources and clock cycles of operation.

Tools: IAR Embedded Workbench IDE for MSP430 v.5.20 Evaluation version.

Function: MIX_WORD(sph_u32 u, sph_u32 v).

Function Description: MixWord is a linear permutation of two words in Luffa. Initial Assembly Code 136 Optimized Assemly Code 84

Clock Count

Clock count is only the number of cycles taken for completing the function execution and does not consider the cycles taken up for calling the function from main function and returning the value to main function. To optimize the number of clock cycles all the redundant assembly language commands were removed and the care was taken to match the final values of the registers being used.

Result: The optimized code is 1.6 times faster than the initial Assembly code.

References: 1) MSP430 Users Guide. 2) IAR Embedded Workbench IDE user guide. 3)Hash function Luffa , Specification Ver. 2.0.1, Christophe De Canniere, ESAT COSIC, Katholieke Universiteit Leuven, Hisayoshi Sato, Dai Watanabe, Systems Development Laboratory, Hitachi, Ltd, 2 October 2009.

You might also like